Hacker News new | ask | show | jobs
by samsquire 1096 days ago
Thank you syntheweave for an interesting reply.

You're right about the buffers with a truth value in a buffer. I actually use a style of promises or my own count down latch.

I am inspired by Prolog and Drools, a rule engine. I want to "fire" and "retract" facts and the state machine shall work out what to do next.

Here's something that I find especially useful about the formulation: the state machine only moves in one direction, from left to right, but there are multiple transition signals available (facts/atoms) that can be fired to cause the state machine to move forwards.

If you define multiple independent state machines it should be possible to detect "stuck states" where it is impossible for the state machine to continue progressing! This is useful for liveness analysis.

I want the state machine formulation to be useful in designing distributed systems such as Raft.