The WEST package provides an automated way to generate regular expressions1 describing the set of all satisfying computations to Mission-time Linear Temporal Logic formulas (i.e., that describe the valuations, or the rows of the 'truth table', of a given MLTL formula that satisfy it), as well as a GUI to visualize them and the scripts and data sets used for testing this tool during its development. For a more detailed description of how the algorithms were designed and implemented, please refer to our paper here.
Requirements: c++ compiler with make, Python 3.10+, pip
- Go to WEST folder by running
cd WEST
- Build binaries by running
cd src ; make ; cd ..
- Create a python virtual enviroment by running
python3 -m venv west_env
- Activate the virtual environment by running
- on Windows:
./west_env/Scripts/activate
- on Unix or MacOS:
source west_env/bin/activate
- on Windows:
- Install required libraries by running
pip install -r ./requirements.txt
- If needed, update pip by running
python3 -m pip install --upgrade pip
- If needed, update pip by running
- Launch the graphic user interface by running
python3 gui.py
To run the WEST tool from the terminal line, please refer to the document ./Documentation/WESTREADME.md
.
Simple examples involving each of the operators are as follows:
- Propositional variable:
p0
- And:
p0 & p1
- Or:
p0 | p1
- Logical implication:
p0 -> p1
- Negation:
p0 & !p1
- Globally:
G[0,3] p1
- Future:
F[0,3] p1
- Until:
p0 U[0,3] p1
- Release:
p0 R[0,3] p1
As a more complex example, consider the formula
To examine this formula on the WEST-GUI tool, we need to input it as ((p0 & G[0,3]p1)->p2)
.
This is what the WEST tool outputs when we select this same formula from the subformulae options. A brief explanation for each labeled part of the user interface is detailed below:
- Input a new MLTL formula.
- Option to optimize bits (not needed in most cases).
- Apply REST, the regular expression simplification theorem (not needed in most cases).
- Negation Normal Form of the formula.
- A list of subformulas the user can visualize.
- Set of trace regular expressions for the selected formula.
- Toggle truth values of atomic propositions at different time steps.
- String representation of the trace.
- The formula is highlighted in green if the trace satisfies the formula.
- The formula is highlighted in red if the trace does not satisfy the formula.
- Import trace from file or by manually typing in a string.
- Export trace to a csv file.
- Reset all variables to false.
- Randomly generate a satisfying trace.
- Randomly generate a randomly unsatisfying trace.
- Click a specific regular expression to randomly generate a satisfying trace that matches the regular expression.
- Backbone analysis gives the assignment of atomic propositions that must hold in every satisfying trace of the formula.
This project began as part of the 2022 Iowa State Math REU with mentors Kristin Yvonne Rozier and Laura Gamboa Guzmán.
WEST is an acronym for the last names of the undergraduate mathematicians who collaborated on this project: Zili Wang, Jenna Elwing, Jeremy Sorkin, and Chiara Travesset.
Below is the context-free grammar that a well-formed MLTL formula must follow. This is optional reading, and only included for the interested reader.
Context-Free Grammar for a MLTL well-formed formula (wff).
'True', 'False', 'Negation', 'Or', 'And', 'If and only if', and 'Implies' are represented by the symbols:
'true', 'false', '~', '|', '&', '=', and '->' respectively.
‘Eventually’, ‘Always’, ‘Until’, and ‘Release’ are represented by the symbols:
‘F’, ‘G’, ‘U’, and ‘R’ respectively.
Alphabet = { ‘0’, ‘1’, …, ‘9’, ‘p’, ‘(‘, ‘)’, ‘[’, ‘]’, ‘,’ ,
‘true’, ‘false’,
‘~’, ‘|’, ‘&’, ‘=’, ‘->’,
‘F’, ‘G’, ‘U’, ‘R’ }
Digit -> ‘0’ | ‘1’ | … |’9’
Num -> Digit Num | Digit
Interval -> ‘[’ Num ‘,’ Num ‘]’
Prop_var -> ‘p’ Num
Prop_cons -> ‘true’ | ‘false’
Unary_Prop_conn -> ‘~’
Binary_Prop_conn -> ‘|’ | ‘&’ | ‘=’ | ‘->’
Assoc_Prop_conn -> ‘|’ | ‘&’ | ‘=’
Array_entry -> Wff ‘,’ Array_entry | Wff
Unary_Temp_conn -> ‘F’ | ‘G’
Binary_Temp_conn -> ‘U’ | ‘R’
Wff -> Prop_var | Prop_cons
| Unary_Prop_conn Wff
| Unary_Temp_conn Interval Wff
| ‘(‘ Assoc_Prop_conn ‘[‘ Array_entry ‘]’ ‘)’
| ‘(‘ Wff Binary_Prop_conn Wff ‘)’
| ‘(‘ Wff Binary_Temp_conn Interval Wff ‘)
Ensure that all time intervals use ',' to separate the bounds.
Ensure that all binary and associative connectives have parentheses surrounding them.
Ensure that for each propositional variable, its corresponding natural number immediately follows the 'p', and that there isn't a '_' or space in between.
Ensure that all unary connectives do NOT have parentheses surrounding them.
Footnotes
-
We use this term in a rather liberal way, since we only deal with regular languages containing strings of a fixed length and we use the character
s
as a shorthand for0 or 1
, although it is technically not an element of the formal alphabet. ↩