Liking cljdoc? Tell your friends :D

knossos.wgl

An implementation of the Wing and Gong linearizability checker, plus Lowe's
extensions, as described in

http://www.cs.cmu.edu/~wing/publications/WingGong93.pdf
http://www.cs.ox.ac.uk/people/gavin.lowe/LinearizabiltyTesting/paper.pdf
https://arxiv.org/pdf/1504.00204.pdf
raw docstring

analysisclj

(analysis model history)
(analysis model history opts)

Given an initial model state and a history, checks to see if the history is linearizable. Returns a map with a :valid? bool and additional debugging information.

Can also take an options map: {:time-limit ms} Duration to wait before returning with result :unknown

Given an initial model state and a history, checks to see if the history is
linearizable. Returns a map with a :valid? bool and additional debugging
information.

Can also take an options map:
{:time-limit ms} Duration to wait before returning with result :unknown
sourceraw docstring

bitset-highest-contiguous-linearizedclj

(bitset-highest-contiguous-linearized b)

What's the highest entry-id this BitSet has linearized, such that every lower entry ID is also linearized? -1 if nothing linearized.

What's the highest entry-id this BitSet has linearized, such that every
lower entry ID is also linearized? -1 if nothing linearized.
sourceraw docstring

cache-configclj

(cache-config linearized model op)
source

checkclj

(check model history state)
source

concurrent-ops-atclj

(concurrent-ops-at history target-op)

Given a history and a particular operation in that history, computes the set of invoke operations concurrent with that particular operation.

Given a history and a particular operation in that history, computes the set
of invoke operations concurrent with that particular operation.
sourceraw docstring

configurations-which-linearized-up-toclj

(configurations-which-linearized-up-to entry-id configs)

Filters a collection of configurations to only those which linearized every operation up to and including the given entry id.

Filters a collection of configurations to only those which linearized every
operation up to and including the given entry id.
sourceraw docstring

final-pathsclj

(final-paths history pair-index final-op configs indices)

We have a raw history, a final ok op which was nonlinearizable, and a collection of cache configurations. We're going to compute the set of potentially concurrent calls at the nonlinearizable ok operation.

Then we'll filter the configurations to those which got the furthest into the history. Each config tells us the state of the system after linearizing a set of operations. We take that state and apply all concurrent operations to it, in every possible order, ending with the final op which broke linearizability.

We have a raw history, a final ok op which was nonlinearizable, and a
collection of cache configurations. We're going to compute the set of
potentially concurrent calls at the nonlinearizable ok operation.

Then we'll filter the configurations to those which got the furthest into the
history. Each config tells us the state of the system after linearizing a set
of operations. We take that state and apply all concurrent operations to it,
in every possible order, ending with the final op which broke
linearizability.
sourceraw docstring

highest-contiguous-linearized-entry-idclj

(highest-contiguous-linearized-entry-id configs)

Finds the highest linearized entry id given a set of CacheConfigs. -1 if no entries linearized. Because our search is speculative, we may actually try linearizing random high entry IDs even though we can't linearize smaller ones. For that reason, we use the highest contiguous entry ID.

Finds the highest linearized entry id given a set of CacheConfigs. -1 if no
entries linearized. Because our search is speculative, we may actually try
linearizing random high entry IDs even though we can't linearize smaller
ones. For that reason, we use the highest *contiguous* entry ID.
sourceraw docstring

history-without-linearizedclj

(history-without-linearized history linearized)

Takes a history and a linearized bitset, and constructs a sequence over that history with already linearized operations removed.

Takes a history and a linearized bitset, and constructs a sequence over that
history with already linearized operations removed.
sourceraw docstring

invalid-analysisclj

(invalid-analysis history configs state)

Constructs an analysis of an invalid terminal state.

Constructs an analysis of an invalid terminal state.
sourceraw docstring

invoke-and-ok-for-entry-idclj

(invoke-and-ok-for-entry-id history entry-id)

Given a history and an entry ID, finds the [invocation completion] operation for that entry ID.

Given a history and an entry ID, finds the [invocation completion] operation
for that entry ID.
sourceraw docstring

linearizedclj

(linearized c)
source

map->Opclj

(map->Op m)

Construct an Op from a map.

Construct an Op from a map.
sourceraw docstring

max-entry-idclj

(max-entry-id history)

What's the highest entry ID in this history?

What's the highest entry ID in this history?
sourceraw docstring

Op->mapclj

(Op->map op)

Turns an Op back into a plain old map, stripping its entry ids.

Turns an Op back into a plain old map, stripping its entry ids.
sourceraw docstring

render-opclj

(render-op indices op)

Prepares an op to be returned by converting it to a plain old map and reassigning its external index

Prepares an op to be returned by converting it to a plain old map and reassigning its
external index
sourceraw docstring

start-analysisclj

(start-analysis model history)

Spawn a thread to check a history. Returns a Search.

Spawn a thread to check a history. Returns a Search.
sourceraw docstring

with-entry-idsclj

(with-entry-ids history)

Assigns a sequential :entry-id to every invocation and completion. We're going to pick these ids in a sort of subtle way, because when it comes time to identify the point where we got stuck in the search, we want to be able to look at a linearized bitset and quickly identify the highest OK operation we linearized. To that end, we assign ok invocations the range 0..c, and crashed operations c+1..n, such that contiguous ranges of linearized ops represent progress through every required OK operation in the history.

Assigns a sequential :entry-id to every invocation and completion. We're
going to pick these ids in a sort of subtle way, because when it comes time
to identify the point where we got stuck in the search, we want to be able to
look at a linearized bitset and quickly identify the highest OK operation we
linearized. To that end, we assign ok invocations the range 0..c, and crashed
operations c+1..n, such that contiguous ranges of linearized ops represent
progress through every required OK operation in the history.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close