Expand description
TLA+ Parser module
This module implements the parse for TLA+ specification files. You can find
more information on the supported syntax under ./docs/tla-to-ta.md
ModulesΒ§
- integer_
exprs π - Module declaring helper functions to parse expressions over integers, including boolean expressions over integers
StructsΒ§
- PestTLA
Parser π - TLAParser
- Parser for supported subset of TLA+
- TLAParsing
Context π - Helper context for storing information such as declared integer macros during parsing
EnumsΒ§
ConstantsΒ§
- LOCATIONS_
SET π - Variable that is used to specify the set of locations
- N_
CORR_ πPROC - Constant for specifying the number of correct processes
- PROC_
SET π - Constant for representing set of processes
- _PEST_
GRAMMAR_ πPestTLA Parser
FunctionsΒ§
- new_
parsing_ πerror - Generate a new parsing error
- new_
parsing_ πerror_ with_ ctx - Generate a new parsing error and add context
- parse_
identifier_ πlist_ to_ t - Parse a list of identifiers into a vector of objects of type T
- parse_
identifier_ πto_ t - Parse an identifier into an object of type T
- parse_
initial_ πloc_ constr - Parse a constraint over
ProcessesLocationsinto the set of initial locations - parse_
map_ πentry_ into_ map_ ident_ and_ proc_ ident - Parses a
map_entryinto the name of the map and the identifier of the element used as an index in the map - parse_
map_ πupdate_ to_ target_ location - Parse a map update / map redefinition to the target location of a rule
- parse_
next_ πexpr - Parse all rule ids appearing in a
Nextexpression - parse_
rule_ πbody_ exprs - Parse all rule body expressions
- parse_
rule_ πident_ to_ id_ and_ proc_ ident - Parse the rule id out of the rule name and collect the name of the identifier used for specifying the process identifier
- parse_
set_ πof_ locations - Parse the location declaration in βTypeOkβ or in βInitβ into a set of locations
- split_
conjunct_ πbool_ expr - Split a conjunction of boolean expressions into a vector
- try_
parse_ πmap_ entry_ constr_ loc - Parses a
map_boolean_exprinto a [Location] - try_
parse_ πmap_ redef_ to_ target_ loc - Helper function to parse_map_update_to_target_location
- validate_
and_ πadd_ n_ corr_ proc_ constr - Validate and remove constraints on special parameter N_CORR_PROC