test.carly.world

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?

(end-of-line? world)

Determine whether the worldline has ended.

initialize

(initialize model pending)

Initialize a new world state given the initial model and a map of pending operations.

next-steps

(next-steps world)

Compute all possible valid next steps for the world, returning a sequence of new world states.

step

(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.

visit-key

(visit-key world)

Return the key used to compare worlds which are equivalent nodes in the graph of possible futures.