LTLf2DFA
LTLf2DFA is a simple tool that processes an LTLf formula (with past or future operators) and generates the corresponding minimized DFA (Deterministic Finite state Automaton) using MONA. This tool is written in Python 3.6.
It is tested on Linux Ubuntu 16.04 and on macOS 10.13.6.
Getting Started
Requirements
This tool uses MONA for the generation of the DFA. Hence, you should first install MONA with all its dependencies on your OS following the instructions here.
This tool is also based on the following libraries:
They are automatically added while installing LTLf2DFA.
How To Install It
- From PyPI:
pip install ltlf2dfa
- From this repository:
pip install git+https://github.com/Francesco17/LTLf2DFA@distribution#egg=ltlf2dfa
How To Use It
- Simply parse an LTLf formula with past or future operators:
from ltlf2dfa.Parser import MyParser
formula = "G(a->Xb)"
parser = MyParser()
parsed_formula = parser(formula)
print(parsed_formula)
- Translate an LTLf formula to the corresponding DFA automaton:
from ltlf2dfa.Translator import Translator
from ltlf2dfa.DotHandler import DotHandler
formula = "G(a->Xb)"
declare_flag = False #True if you want to compute DECLARE assumption for the formula
translator = Translator(formula)
translator.formula_parser()
translator.translate()
translator.createMonafile(declare_flag) #it creates automa.mona file
translator.invoke_mona() #it returns an intermediate automa.dot file
dotHandler = DotHandler()
dotHandler.modify_dot()
dotHandler.output_dot() #it returns the final automa.dot file
Syntax
The syntax accepted by LTLf2DFA is the following:
| OPERATOR | SYMBOL |
|---|---|
| TRUE | T |
| FALSE | F |
| AND | & |
| OR | | |
| NOT | ~ |
| IMPLICATION | -> |
| D-IMPLICATION | <-> |
| NEXT | X |
| UNTIL | U |
| EVENTUALLY | E |
| GLOBALLY | G |
| YESTERDAY (*) | Y |
| SINCE (*) | S |
| ONCE (*) | O |
| GLOBALLY (*) | H |
(*) are PAST operators.
Also parentheses ( and ) can be used.
NOTE: LTLf2DFA accepts ONLY separated formulas, i.e. formulas that have only past, only future or none operators.
Author
License
This project is licensed under the MIT License - see the LICENSE file for details
Contacts
If, for any reason, you are interested in feel free to contact me by email.
Metadata
Release files for ltlf2dfa 0.2.0.post1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ltlf2dfa-0.2.0.post1.tar.gz | 173.8 kB | Without provenance | Details for ltlf2dfa-0.2.0.post1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ltlf2dfa-0.2.0.post1-py3-none-any.whl | Python 3 | none | any | Details for ltlf2dfa-0.2.0.post1-py3-none-any.whl |
Total release size: 347.1 kB
Release files / ltlf2dfa-0.2.0.post1.tar.gz
| Download URL | ltlf2dfa-0.2.0.post1.tar.gz |
|---|---|
| Size | 173.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9a2fb19169a618fade7fad28ce0b93fd72cd5c92925c4a0cfaa233632494fbbc
|
|
BLAKE2b-256 checksum How to use checksums |
a30818ee58c2efdf3bec41bb2e8ba9ff294afb7e936cdf3a14aa1ac461a09c54
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5
|
Release files / ltlf2dfa-0.2.0.post1-py3-none-any.whl
| Download URL | ltlf2dfa-0.2.0.post1-py3-none-any.whl |
|---|---|
| Size | 173.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cbb15a7372d15cb36751216ec8b2f1552f53dec99ccc5b7778d0652a00e190ff
|
|
BLAKE2b-256 checksum How to use checksums |
bf7072230ddef95d1fba46e5c184ee22c07b4c8e403c87ce3ed8d919a6266b20
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5
|
Security for ltlf2dfa 0.2.0.post1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.