libcspm-1.0.0: A library providing a parser, type checker and evaluator for CSPM.

Safe HaskellNone

CSPM.Evaluator.Dot

Synopsis

Documentation

combineDots :: Value -> Value -> EvaluationMonad ValueSource

Takes two values and dots then together appropriately.

extensions :: Value -> EvaluationMonad [Value]Source

Takes a datatype or a channel value and then computes all x such that ev.x is a full datatype/event. Each of the returned values is guaranteed to be a VDot.

oneFieldExtensions :: Value -> EvaluationMonad [Value]Source

Returns an x such that ev.x has been extended by exactly one atomic field. This could be inside a subfield or elsewhere.

productions :: Value -> EvaluationMonad [Value]Source

Takes a datatype or a channel value and computes v.x for all x that complete the value.

splitIntoFields :: Bool -> Name -> ValueSet -> EvaluationMonad [ValueSet]Source

Takes a set of dotted values (i.e. a set of VDot _) and returns a list of sets such that the cartesian product is equal to the original set.

This throws an error if the set cannot be decomposed.

compressIntoEnumeratedSet :: ValueSet -> EvaluationMonad (Maybe [Value])Source

Takes a set and returns a list of values xs such that Union({productions(x) | x <- xs}) == xs. For example, if c is a channel of type {0,1} then {c.0, c.1} would return [c].

This is primarily used for display purposes.