Metadata-Version: 2.1
Name: ltlf2dfa
Version: 1.0.0
Summary: LTLf and PLTLf to Deterministic Finite-state Automata (DFA)
Home-page: https://github.com/whitemech/ltlf2dfa.git
Author: Francesco Fuggitti
Author-email: fuggitti@eecs.yorku.ca
License: GNU Lesser General Public License v3 or later (LGPLv3+)
Description: # LTL<sub>f</sub>2DFA
        [![](https://img.shields.io/pypi/v/ltlf2dfa.svg)](https://pypi.python.org/pypi/ltlf2dfa)
        [![](https://img.shields.io/pypi/pyversions/ltlf2dfa.svg)](https://pypi.python.org/pypi/ltlf2dfa)
        [![LTLf2DFA CI pipeline](
          https://github.com/whitemech/LTLf2DFA/workflows/LTLf2DFA%20CI%20pipeline./badge.svg)](
          https://github.com/whitemech/LTLf2DFA/actions?query=workflow%3A%22LTLf2DFA+CI+pipeline.%22)
        [![](https://img.shields.io/badge/docs-mkdocs-9cf)](https://www.mkdocs.org/)
        [![](https://img.shields.io/badge/status-development-orange.svg)](https://img.shields.io/badge/status-development-orange.svg)
        [![codecov](https://codecov.io/gh/whitemech/LTLf2DFA/branch/master/graph/badge.svg)](https://codecov.io/gh/whitemech/LTLf2DFA)
        [![](https://img.shields.io/badge/flake8-checked-blueviolet)](https://img.shields.io/badge/flake8-checked-blueviolet)
        [![](https://img.shields.io/badge/mypy-checked-blue)](https://img.shields.io/badge/mypy-checked-blue)
        [![](https://img.shields.io/badge/license-LGPLv3%2B-blue)](https://img.shields.io/badge/license-LGPLv3%2B-blue)
        
        LTL<sub>f</sub>2DFA is a tool that transforms an LTL<sub>f</sub> or a PLTL<sub>f</sub> formula into a minimal 
        Deterministic Finite state Automaton (DFA) using [MONA](http://www.brics.dk/mona/).
        
        It is also available online at [ltlf2dfa.diag.uniroma1.it](http://ltlf2dfa.diag.uniroma1.it).
        
        ## Prerequisites
        
        This tool uses MONA for the generation of the DFA. Hence, you should first install MONA with all its dependencies on 
        your system following the instructions [here](http://www.brics.dk/mona/download.html).
        
        This tool is also based on the following libraries:
        
        - [lark-parser 0.8.5](https://pypi.org/project/lark-parser/)
        - [sympy 1.5.1](https://pypi.org/project/sympy/)
        
        They are automatically added while installing LTL<sub>f</sub>2DFA.
        
        ## Install
        
        - from [PyPI](https://pypi.org/project/ltlf2dfa/):
        ```
        pip install ltlf2dfa
        ```
        - or, from source (`master` branch):
        ```
        pip install git+https://github.com/whitemech/LTLf2DFA.git
        ```
        
        - or, clone the repository and install:
        ```
        git clone htts://github.com/whitemech/LTLf2DFA.git
        cd ltlf2dfa
        pip install .
        ```
        ## How To Use
        
        - Parse an LTL<sub>f</sub> formula:
        ```python
        from ltlf2dfa.parser.ltlf import LTLfParser
        
        parser = LTLfParser()
        formula_str = "G(a -> X b)"
        formula = parser(formula_str)       # returns an LTLfFormula
        
        print(formula)                      # prints "G(a -> X (b))"
        ```
        - Or, parse a PLTL<sub>f</sub> formula:
        ```python
        from ltlf2dfa.parser.pltlf import PLTLfParser
        
        parser = PLTLfParser()
        formula_str = "H(a -> Y b)"
        formula = parser(formula_str)       # returns a PLTLfFormula
        
        print(formula)                      # prints "H(a -> Y (b))"
        ```
        - Translate a formula to the corresponding DFA automaton:
        ```python
        dfa = formula.to_dfa()
        print(dfa)                          # prints the DFA in DOT format
        ```
        ## Features
        
        * Syntax and parsing support for the following formal languages:
            * Propositional Logic;
            * Linear Temporal Logic on Finite Traces;
            * Pure-Past Linear Temporal Logic on Finite Traces.
        
        * Conversion from LTL<sub>f</sub>/PLTL<sub>f</sub> formula to MONA (First-order Logic)
        
        **NOTE**: LTL<sub>f</sub>2DFA accepts either LTL<sub>f</sub> formulas or PLTL<sub>f</sub> formulas, i.e., formulas that 
        have only past, only future or none operators.
        
        ## Tests
        
        To run tests: `tox`
        
        To run only the code tests: `tox -e py37`
        
        To run only the code style checks: `tox -e flake8`
        
        ## Docs
        
        To build the docs: `mkdocs build`
        
        To view documentation in a browser: `mkdocs serve`
        and then go to [http://localhost:8000](http://localhost:8000)
        
        ## License
        
        LTL<sub>f</sub>2DFA is released under the GNU Lesser General Public License v3.0 or later (LGPLv3+).
        
        Copyright 2018-2020 WhiteMech
        
        ## Author
        
        [Francesco Fuggitti](https://francescofuggitti.github.io/)
        
        
        # History
        
        ## 0.3.0 (2020-05-20)
        
        * Refinement of all the grammars. Extensive improvement of the parsing.
        * Introduce interfaces and class hierarchy for the logic modules.
        * Several bug fixes and introduce testing.
        * Introduce of docs.
        * Introduce Continuous Integration.
        * Refactor translation feature.
        * Replace parsing library PLY with Lark.
        
        ## 0.2.2 (2019-09-25)
        
        * Online version: [http://ltlf2dfa.diag.uniroma1.it/](http://ltlf2dfa.diag.uniroma1.it).
        
        ## 0.2.0 (2019-09-03)
        
        ## 0.1.3 (2018-07-22)
        
        ## 0.1.0 (2018-07-18)
        
        * First release on PyPI.
        
        
Keywords: ltlf2dfa
Platform: UNKNOWN
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Education
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Description-Content-Type: text/markdown
