{"id":21348846,"url":"https://github.com/runmingl/ltl-explainability","last_synced_at":"2026-01-02T23:06:21.396Z","repository":{"id":188110648,"uuid":"561885463","full_name":"runmingl/ltl-explainability","owner":"runmingl","description":"Linear Temporal Logic to Timeline","archived":false,"fork":false,"pushed_at":"2023-08-29T03:31:05.000Z","size":17583,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-22T16:49:44.227Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TeX","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/runmingl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-04T18:02:46.000Z","updated_at":"2024-10-20T03:48:47.000Z","dependencies_parsed_at":"2023-09-06T20:46:04.026Z","dependency_job_id":null,"html_url":"https://github.com/runmingl/ltl-explainability","commit_stats":null,"previous_names":["eulir/ltl-explainability","runmingl/ltl-explainability"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runmingl%2Fltl-explainability","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runmingl%2Fltl-explainability/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runmingl%2Fltl-explainability/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runmingl%2Fltl-explainability/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/runmingl","download_url":"https://codeload.github.com/runmingl/ltl-explainability/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243823842,"owners_count":20353744,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-22T02:38:36.739Z","updated_at":"2026-01-02T23:06:21.320Z","avatar_url":"https://github.com/runmingl.png","language":"TeX","readme":"# Overview\n\nLTL2TL is a tool which generates timeline visualizations for Linear temporal logic (LTL) formulas. It provides two utilities:\n- `ltl2timeline`, for translating LTL formulas to timeline graphic images; and\n- `ltl2regex`, for translating LTL formulas to regular expressions representing the solution set of the formula.\n\nThe tool works by transforming LTL formulae to Büchi automata (provided by [SPOT](https://spot.lre.epita.fr/)) and subsequently to $\\omega$-regular expressions and timeline graphics. It is intended for validating software system specification formulas written in LTL.\n\nThe paper describing the tool is available [here](https://www.andrew.cmu.edu/user/runmingl/paper/ltl.pdf).\n\nInstallation, usage and examples are provided below.\n\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.8244783.svg)](https://doi.org/10.5281/zenodo.8244783)\n\n# Install\n## Option 1: Docker Image\n (Recommended for trials and artifact evaluation: this method can be used on any systems with Docker installed)\n\n - Make sure you have [Docker](https://docs.docker.com/get-docker/) installed\n - Pull the docker image from Docker Hub\n ```\n    $ docker pull runmingl/ltl\n ```\n- Run the docker image\n ```\n    $ docker run -it runmingl/ltl\n ```\n- Run the tool\n ```\n    $ cd opt/ltl-explainability/src\n    $ python3 main.py ltl2timeline 'G(p xor X p)' --filename 'example' --output_format 'png'\n ```\n This will generate a timeline image `example.gv.png` in the current directory.\n\n - You can copy the generated images to your local machine via\n ```\n    $ docker cp \u003ccontainerId\u003e:/opt/ltl-explainability/src/example.gv.png .\n ```\n where `\u003ccontainerId\u003e` is the id of the docker container you just ran.\n\n## Option 2: Local Installation\n(Recommended for development: this method requires a Unix-like system with Python 3.10+ installed)\n\nDownload the following dependencies:\n### Dependencies\n- SPOT (Download [here](https://spot.lre.epita.fr/install.html) and use the following command in the root directory of your installation)\n```\n$ ./configure --prefix ~/.local \u0026\u0026 make \u0026\u0026 sudo make install\n```\n- Graphviz\n```\n$ brew install graphviz\n```\n- Python 3.10+\n- Other packages\n```\n$ pip install -r requirements.txt\n```\n\nAfter installing dependencies, update git submodule via\n```bash\n$ git submodule init\n$ git submodule update\n```\n\n# Usage\nWe provide 2 command-line tools:\n- ltl2regex\n```\nNAME\n    main.py ltl2regex\n\nSYNOPSIS\n    main.py ltl2regex FORMULA\n\nPOSITIONAL ARGUMENTS\n    FORMULA\n        Type: str\n```\n- ltl2timeline\n```\nNAME\n    main.py ltl2timeline\n\nSYNOPSIS\n    main.py ltl2timeline FORMULA \u003cflags\u003e\n\nPOSITIONAL ARGUMENTS\n    FORMULA\n        Type: str\n\nFLAGS\n    --filename=FILENAME\n        Type: str\n        Default: 'ltl'\n    --output_format=OUTPUT_FORMAT\n        Type: str\n        Default: 'pdf'\n        Supported values: ['pdf', 'png', 'svg', 'latex']\n```\n\n## Examples\nLTL Formulas are inputted following the same syntax as [SPOT](https://spot.lre.epita.fr/app/). For example,\n\n```\npython3 main.py ltl2timeline 'G(p xor X p)'\n```\ngenerates the following timeline\n\n![timeline](paper/examples/ex2/ex2.png)\n\nSome example formulas are provided in the [ltl-formulas](./ltl-formulas/) directory. For example, in [ltl-formulas/AAC_Communication_Protocol.ltl](./ltl-formulas/AAC_Communication_Protocol.ltl), we have the following formula:\n```\n(G (aircraft_request -\u003e (F (! aircraft_request))))\n```\nwhich can be visualized by the tool using\n```\npython3 main.py ltl2timeline '(G (aircraft_request -\u003e (F (! aircraft_request))))' --filename 'example' --output_format 'png'\n```\nin which case a timeline image named `example.gv.png` will be generated in the current directory.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frunmingl%2Fltl-explainability","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frunmingl%2Fltl-explainability","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frunmingl%2Fltl-explainability/lists"}