Record and functions for simulating world states. Each world is represented by an immutable map containing the model state, current history, and map of pending thread operations.
Record and functions for simulating world states. Each world is represented by an immutable map containing the model state, current history, and map of pending thread operations.
(end-of-line? world)
Determine whether the worldline has ended.
Determine whether the worldline has ended.
(initialize model pending)
Initialize a new world state given the initial model and a map of pending operations.
Initialize a new world state given the initial model and a map of pending operations.
(next-steps world)
Compute all possible valid next steps for the world, returning a sequence of new world states.
Compute all possible valid next steps for the world, returning a sequence of new world states.
(step world)
(step world thread-id)
Compute a step by applying the next operation from the identified thread to the world. Returns an updated world state, or nil if the operation result was invalid.
Compute a step by applying the next operation from the identified thread to the world. Returns an updated world state, or nil if the operation result was invalid.
(visit-key world)
Return the key used to compare worlds which are equivalent nodes in the graph of possible futures.
Return the key used to compare worlds which are equivalent nodes in the graph of possible futures.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close