{"id":24332667,"url":"https://github.com/ivandonadello/fuzzy-ltlf-conformance-checking","last_synced_at":"2025-05-01T12:05:45.920Z","repository":{"id":244003915,"uuid":"772472581","full_name":"ivanDonadello/Fuzzy-LTLf-Conformance-Checking","owner":"ivanDonadello","description":"A really fast conformance checker for fuzzy logs with linear temporal logic specifications","archived":false,"fork":false,"pushed_at":"2025-04-28T20:58:33.000Z","size":182,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-01T12:04:52.004Z","etag":null,"topics":["fuzzy-linear-temporal-logic","fuzzy-logic","ltlf","processmining"],"latest_commit_sha":null,"homepage":"","language":"Python","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/ivanDonadello.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2024-03-15T09:03:23.000Z","updated_at":"2025-04-28T20:58:36.000Z","dependencies_parsed_at":"2024-09-13T00:25:02.597Z","dependency_job_id":"6ad88af0-fe13-4222-8202-50d4524d87d6","html_url":"https://github.com/ivanDonadello/Fuzzy-LTLf-Conformance-Checking","commit_stats":null,"previous_names":["ivandonadello/fuzzy-ltlf-conformance-checking"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanDonadello%2FFuzzy-LTLf-Conformance-Checking","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanDonadello%2FFuzzy-LTLf-Conformance-Checking/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanDonadello%2FFuzzy-LTLf-Conformance-Checking/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanDonadello%2FFuzzy-LTLf-Conformance-Checking/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivanDonadello","download_url":"https://codeload.github.com/ivanDonadello/Fuzzy-LTLf-Conformance-Checking/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251871528,"owners_count":21657468,"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":["fuzzy-linear-temporal-logic","fuzzy-logic","ltlf","processmining"],"created_at":"2025-01-18T02:36:46.843Z","updated_at":"2025-05-01T12:05:45.900Z","avatar_url":"https://github.com/ivanDonadello.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fuzzy Linear Temporal Logic on Finite traces\nThe repository implements a fast conformance checker for fuzzy logs against temporal specifications in Fuzzy Linear Temporal Logic on finite traces (FLTLf) as described in the paper \"Conformance Checking of Fuzzy Logs against Declarative Temporal Specifications\".\n\nThis tutorial is structured as follows:\n1. A [**requirements**](#Requirements) section listing the needed software dependencies.\n2. A [**usage**](#Usage) section that explains how to define a fuzzy log, an LTLf formula and running the conformance checker.\n3. An [**LTLf Syntax**](#LTLf-Syntax) section.\n4. A [**running the experiments**](#Running-the-Experiments) section explaining how to reproduce the experiments.\n5. A [**remarks**](#Remarks-A-Fast-Crisp-LTLf-Checker) section and how to [cite](#Reference) this work.\n\n## Requirements\nImplemented with Python 3.8.15, the project requires with the following dependencies:\n```\ntorch==1.13.1\nlark==1.1.9\npandas==2.2.3\n```\n\n## Usage\nOnce the requirements have been installed, a simple fuzzy log can be defined as a list of lists where each trace is a list of events, each event is a list of predicate values. Use the value 0 for predicates that were not logged in an event\n```\ntraces = []\ntraces.append([[0.11, 0.12, 0.13, 0.14], [0.21, 0.22, 0.23, 0.24], [0.31, 0.32,  0.33, 0.34], [0.41, 0.42, 0.43, 0.44]]) \ntraces.append([[0.08, 0.3, 0.1, 0.9], [0.9, 0.9, 0.93, 0.94], [0.91, 0.03, 0.4, 0.72]])\ntraces.append([[0.14, 0.3, 0.4, 0.23], [0.2, 0.07, 0.4, 0.14], [0.2, 0.93, 0.7, 0.82], [0.31, 0.03, 0.42, 0.72], [0.33, 0.03, 0.41, 0.92], [0.12, 0.63, 0.03, 0.41]] )\ntraces.append([[0.2, 1, 0.3, 1], [0.6, 1, 0.43, 1], [0.6, 1, 0.4, 1]])\ntraces.append([[0.3, 0, 0, 0], [0.51, 0.32, 0.89, 0.72]])\n```\nthis fuzzy event log contains 5 traces, the maximum number of events is 6 and there are 4 predicates. Predicates must be declared with a Python list\n```\npredicate_names = [\"cobot_holds\", \"human_holds\", \"human_glues\", \"quality_checking\"]\n```\nThe log then must be converted into a PyTorch tensor, we provide some code for doing that.\n\nThe next step is the definition of an LTLf specification and its parsing\n```\nparser = LTLfParser()\nformula = \"(F(cobot_holds)) \u003e 0.5\" \npyformula = parser(formula)\n```\nthe compliance of the fuzzy log against the LTLf formula can be checked with\n```\ni = 0\nvisitor = core.Visitor()\nvisitor.visit(pyformula, i)\n```\nThis procedure requires the use of two files. The file `input.py` contains the predicates names, the fuzzy traces, the LTLf formula and the instant `i` of the evaluation. Users needs to modify this file according to their own task. The file `main.py` contains the padding and the conversion of the fuzzy traces into a PyTorch tensor and the running of the conformance checker. It is executed by running\n```\npython main.py\n```\n\n## LTLf Syntax\nThe LTLf syntax adopted is the following:\n|        Symbol  |            Meaning            |Example          |\n|----------------|-------------------------------|-----------------|\n|[a-z][a-z0-9_]* |propositions                   |`cobot_holds`    |\n|true            |True                           |`true`           |\n|false           |False                          |`false`          |\n|\u0026, \u0026\u0026           |And                            |`a \u0026\u0026 b`         |\n|\\|, \\|\\|        |Or                             |`a \\|\\| b`       |\n|!, ~            |Not                            |`!a`             |\n|-\u003e, =\u003e          |Implication                    |`a =\u003e b`         |\n|X               |Next                           |`X(a)`           |\n|WX              |Weak Next                      |`WX(a)`          |\n|U               |Until                          |`aUb`            |\n|W               |Weak Until                     |`aWb`            |\n|R               |Release                        |`aRb`            |\n|M               |Strong Release                 |`aMb`            |\n|F               |Finally                        |`F(a)`           |\n|G               |Globally                       |`G(a)`           |\n|\u003c,\u003c=,\u003e,\u003e=,!=,== |Comparison operators           |`((a) \u003e= 0.5)` or `((a) \u003e= (b))`   |\n\n## Running the Experiments\nThe experiments are stress tests measuring the computational running time of the fuzzy conformance checker by varying the number of events, the number of traces in the log, the complexity of the LTLf formula.\n\nThe experiments involving simple LTLf formulas can be executed by running:\n```\npython simple_exp.py\n```\nwhereas experiments involving complex LTLf formulas are executed by running:\n```\npython DECLARE_exp.py\n```\nThe results are saved in the `results` folder.\n\n## Remarks: A Fast Crisp LTLf Checker\nThe implementation uses the Zadeh t-norm and co-norm that are the fuzzy counterparts of the AND and OR symbol in propositional logic. Therefore, the code can be used as a fast checker for LTLf where the truth values of the event log are just 0 or 1.\n\n## Reference\nPlease use the following bibtex entry if you use this code in your work\n```\n@inproceedings{donadello2024conformance,\n  title={Conformance Checking of Fuzzy Logs Against Declarative Temporal Specifications},\n  author={Donadello, Ivan and Felli, Paolo and Innes, Craig and Maggi, Fabrizio Maria and Montali, Marco},\n  booktitle={International Conference on Business Process Management},\n  pages={39--56},\n  year={2024},\n  organization={Springer}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivandonadello%2Ffuzzy-ltlf-conformance-checking","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivandonadello%2Ffuzzy-ltlf-conformance-checking","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivandonadello%2Ffuzzy-ltlf-conformance-checking/lists"}