{"id":37439105,"url":"https://github.com/julianthome/autorex","last_synced_at":"2026-01-16T06:43:18.448Z","repository":{"id":57720635,"uuid":"69098322","full_name":"julianthome/autorex","owner":"julianthome","description":"A dk.brics FSM to regular-expression-string converter","archived":false,"fork":false,"pushed_at":"2020-10-13T20:37:39.000Z","size":2821,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-10T17:05:51.983Z","etag":null,"topics":["automaton","regular-expression","state-elimination","transformations","translation"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/julianthome.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-24T11:31:01.000Z","updated_at":"2025-05-31T01:07:20.000Z","dependencies_parsed_at":"2022-09-26T21:41:21.456Z","dependency_job_id":null,"html_url":"https://github.com/julianthome/autorex","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/julianthome/autorex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julianthome%2Fautorex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julianthome%2Fautorex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julianthome%2Fautorex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julianthome%2Fautorex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/julianthome","download_url":"https://codeload.github.com/julianthome/autorex/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julianthome%2Fautorex/sbom","scorecard":{"id":541992,"data":{"date":"2025-08-11","repo":{"name":"github.com/julianthome/autorex","commit":"368a98bf804ad9de5dfa5bd9fbe9ae07a310f5bb"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/29 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENCE.md:0","Info: FSF or OSI recognized license: MIT License: LICENCE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-j288-q9x7-2f5v"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T08:25:05.459Z","repository_id":57720635,"created_at":"2025-08-20T08:25:05.459Z","updated_at":"2025-08-20T08:25:05.459Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28477916,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["automaton","regular-expression","state-elimination","transformations","translation"],"created_at":"2026-01-16T06:43:18.391Z","updated_at":"2026-01-16T06:43:18.441Z","avatar_url":"https://github.com/julianthome.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# autorex\n\nWith `autorex`, you can convert an automaton back into its regular expression\nstring representation. The translation is based on the state-elimination\nalgorithm which is neatly described in *Sipser, Michael.  Introduction to the\nTheory of Computation.  Vol. 2.  Boston: Thomson Course Technology, 2006,\nChapter 1 (Starting from page 70)*.  The implementation is based on the\n[dk.brics](http://www.brics.dk/automaton/) automaton package.\n\nWith `dk.brics`, you can apply automata operations such as concatenation,\nunion, intersection, *etc.* on *input automata* to derive an *output\nautomaton*. Once a regular expression string has been converted into the\n`dk.brics` automaton representation, `dk.brics` does not offer the functionality\nto convert it back to a \nregular expression String. This package provides tooling that converts\nany `dk.brics` output automaton back to its regular expression string representation.\n\n# Status\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)][licence]\n[![Language](http://img.shields.io/badge/language-java-brightgreen.svg)][language]\n[![Maven](https://maven-badges.herokuapp.com/maven-central/com.github.julianthome/autorex/badge.svg)][maven]\n[![Linux Build Status](https://img.shields.io/travis/julianthome/autorex/master.svg?label=Linux%20build)][travis]\n[![Test Coverage](https://codecov.io/gh/julianthome/autorex/branch/master/graph/badge.svg)][coverage]\n[![Code Climate](https://codeclimate.com/github/julianthome/autorex/badges/issue_count.svg)][codeclimate]\n\n[licence]: https://opensource.org/licenses/mit\n[language]: https://www.java.com\n[maven]: https://maven-badges.herokuapp.com/maven-central/com.github.julianthome/autorex\n[travis]: https://travis-ci.org/julianthome/autorex\n[codeclimate]: https://codeclimate.com/github/julianthome/autorex\n[coverage]: https://codecov.io/gh/julianthome/autorex\n\n# Maven Integration\n\n`autorex` is available on maven central. You can integrate it by using\nthe following dependency in the `pom.xml` file. Note, that the maven releases\ndo not necessarily contain the newest changes that are available in the\nrepository. The maven releases are kept in sync with the tagged\n[releases](https://github.com/julianthome/autorex/releases). The API\ndocumentation for every release is available.\n[here](http://www.javadoc.io/doc/com.github.julianthome/autorex). However,\nthe content of this documentation, in particular the code examples and usage\nscenarios, is always aligned with the master branch of this repository. Hence,\nit might be that the latest `autorex` features are not yet available through\nthe maven package.\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.julianthome\u003c/groupId\u003e\n    \u003cartifactId\u003eautorex\u003c/artifactId\u003e\n    \u003cversion\u003e1.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n# Usage\n\n## State Elimination\n\n`autorex` has a very simple API for state elimination\nprovided by the class `autorex`. The following example gives an intuition how\n`autorex` can be used. After creating some `dk.brics` automata, and after \nperforming a couple of operations on them, the result is stored in the `d` \nautomaton. Afterwards, we can simply invoke the `getRegexFromAutomaton` method\non `d` in order to get the corresponding regular expression string.\n\n```java\nAutomaton a = new RegExp(\"(abc)+[0-9]{1,3}[dg]*\").toAutomaton();\nAutomaton b = new RegExp(\"12345678\").toAutomaton();\nAutomaton c = new RegExp(\".{0,5}\").toAutomaton();\nAutomaton d = a.union(b).intersection(c); // output automaton\n\nString s0 = Autorex.getRegexFromAutomaton(d); // obtain regular expression String\nSystem.out.println(\"Regex String: \" + s0);\n```\n\n`autorex` will give you the following regular expression string which is\nequivalent to the result of the computation (the automaton `d`) in the example\nabove.  \n\n```bash\n(((abc[0-9])([0-9])))|((abc[0-9])((g|d)|.{0}))\n```\n\n## Automaton Transformations\n\n`autorex` can also be used in order to transform a given automaton. At\nthe moment, we support the following transformation from a *source automaton* to\na *target automaton*:\n\n- camel-case automatons that are case insensitive\n- substring automatons that accept all the substring of the *source automaton*\n- suffix automatons that accepts all the suffixes of a given *source automaton*\n\nThe following code snippet shows how the transformation API can be used:\n\n```java\nString s = \"hello my name is Alice\";\nAutomaton a = new RegExp(s).toAutomaton();\nAutomaton ccas = Autorex.getCamelCaseAutomaton(a);\nAutomaton substr = Autorex.getSubstringAutomaton(a);\nAutomaton sfx = Autorex.getSuffixAutomaton(a);\n```\n\nFor more examples, please have a look at the provided test cases or at the javadoc\ndocumentation of the class `autorex`.\n\n# Licence\n\nThe MIT License (MIT)\n\nCopyright (c) 2016 Julian Thome \u003cjulian.thome.de@gmail.com\u003e\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulianthome%2Fautorex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjulianthome%2Fautorex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulianthome%2Fautorex/lists"}