{"id":22155927,"url":"https://github.com/citiususc/jflap-lib","last_synced_at":"2025-06-29T21:05:55.141Z","repository":{"id":44344576,"uuid":"43243693","full_name":"citiususc/jflap-lib","owner":"citiususc","description":"An improved version of JFLAP 7.0 to be used as a library as well as a command line tool.","archived":false,"fork":false,"pushed_at":"2018-02-05T19:46:03.000Z","size":1955,"stargazers_count":53,"open_issues_count":3,"forks_count":21,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-03T00:04:18.933Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/citiususc.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":"2015-09-27T11:12:12.000Z","updated_at":"2024-12-07T00:17:50.000Z","dependencies_parsed_at":"2022-09-16T08:52:03.755Z","dependency_job_id":null,"html_url":"https://github.com/citiususc/jflap-lib","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/citiususc/jflap-lib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citiususc%2Fjflap-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citiususc%2Fjflap-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citiususc%2Fjflap-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citiususc%2Fjflap-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/citiususc","download_url":"https://codeload.github.com/citiususc/jflap-lib/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citiususc%2Fjflap-lib/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262667299,"owners_count":23345531,"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-12-02T02:33:18.730Z","updated_at":"2025-06-29T21:05:55.066Z","avatar_url":"https://github.com/citiususc.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"jflap-lib\n==============\n\nJflap-lib is an improved version of JFLAP 7.0 to be used as a library and a command line tool, specially useful for building auto-grading tools.\n\n## What is JFLAP?\n\nJFLAP is an extremely useful software for teaching and learning about formal languages. According to [jflap.org](jflap.org), _\"JFLAP is software for experimenting with formal languages topics including nondeterministic finite automata, nondeterministic pushdown automata, multi-tape Turing machines, several types of grammars, parsing, and L-systems\"_. JFLAP is mantained by [Susan H. Rodger](https://users.cs.duke.edu/~rodger/) et al. from the [Department of Computer Science at Duke University](http://www.cs.duke.edu/).\n\n## What is jflap-lib?\n\nThis project is a minor modification of the original JFLAP 7.0 to replace the usage of System.out and System.err by a logger facade (slf4j) plus some code to enhance the current API and to provide command line tools. \n\n## Modules\n\n* **jflaplib-core**: full JFLAP 7.0 code adapted to be used as a library\n* **jflaplib-cli**: command line tool\n\n## Installation\n\nThis project relies on [jitpack.io](https://jitpack.io/#citiususc/jflap-lib/1.0) instead of maven central to deliver artifacts. If you use maven, just add the following snippet to your `pom.xml` file to use the jitpack repository:\n\n```xml\n\u003crepository\u003e\n    \u003cid\u003ejitpack.io\u003c/id\u003e\n    \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n\u003c/repository\u003e\n```\n\nFinally, include jflap-lib as a dependency:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.citiususc\u003c/groupId\u003e\n    \u003cartifactId\u003ejflap-lib\u003c/artifactId\u003e\n    \u003cversion\u003e1.3\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nYou can also download the compiled jars from the [release page](../../releases) or from [jitpack.io](https://jitpack.io/#citiususc/jflap-lib/3.0).\n\n## Example\n\nIt is very easy to use JFLAP programatically. Here is an example of how to load a jff automaton \nand test it with an input:\n\n```java\n// Load an automaton jff file\nFiniteStateAutomaton automaton = (FiniteStateAutomaton)new XMLCodec().decode(new File(\"example.jff\"), null);\n// Load a simulator to test the automaton\nAutomatonSimulator sim = SimulatorFactory.getSimulator(automaton);\nif (sim == null) throw new RuntimeException(\"Cannot load an automaton simulator for \" + automaton.getClass());\n// Test the automaton with an input\nSystem.out.println(sim.simulateInput(\"10010\"));\n```\n\n## Command line tool\n\nThe module `jflaplib-cli` provides a command line tool with basic functionality. A bundle jar can be generated by running `mvn clean package` or it can be downloaded from the [release page](../../releases). Here are some examples:\n\n##### Runs the provided automaton on the input `10110`\n```\n$ java -jar jflaplib-cli-1.3-bundle.jar run /tmp/file.jff 10110\n```\n\n##### Checks if the two FSA accept the same language\n```\n$ java -jar jflaplib-cli-1.3-bundle.jar equivalent /tmp/file1.jff /tmp/file2.jff\n```\n\n##### Converts a FSA to its equivalent regular expression\n```\n$ java -jar jflaplib-cli-1.3-bundle.jar regular /tmp/file1.jff\n```\n\n## JFLAP 7.0 License\n\nThis project contains the original JFLAP 7.0 source code with some modifications to make it suitable for using it as a library. Here is a copy of the original JFLAP 7.0 License:\n\n    JFLAP 7.0 LICENSE\n    \n    Susan H. Rodger\n    Computer Science Department\n    Duke University\n    August 27, 2009\n    \n    Duke University students contributing to JFLAP source include: Thomas Finley,\n    Ryan Cavalcante, Stephen Reading, Bart Bressler, Jinghui Lim, Chris Morgan,\n    Kyung Min (Jason) Lee, Jonathan Su and Henry Qin.\n    \n    Copyright (c) 2002-2009\n    All rights reserved.\n    \n    \n    I)  You are allowed distribute unmodified copies of JFLAP under the following two conditions:\n        1) You must include a copy of this license text.\n        2) You cannot charge a fee for any product that includes any part of JFLAP, in source or binary form.\n    \n    \n    II) You are allowed to distribute modified copies of JFLAP under the following conditions:\n        1) You must include a copy of this license text.\n        2) You cannot charge a fee for any product that includes any part of your modified JFLAP, in source or binary form.\n        3) If you made the changes yourself, you must clearly describe how to contact you.\n           When the maintainer asks you (in any way) for a copy of the modified JFLAP you distributed, you\n           must make your changes, including source code, available to the maintainer without fee.  \n           The maintainer reserves the right to include your changes in the official version of JFLAP. \n           The current maintainer is Susan Rodger \u003cjflap@cs.duke.edu\u003e. If this changes, it will be announced at www.jflap.org.\n           \n    \n    The name of the author may not be used to\n    endorse or promote products derived from this software without\n    specific prior written permission.\n    \n    THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR\n    IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED\n    WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.\n\n## Project License\n\nThis project (except `jflaplib-core` module which contains the original code plus some modifications of JFLAP 7.0) is released under MIT License:\n\n    The MIT License\n    \n    Copyright (c) 2015 Centro de Investigación en Tecnoloxías da Información (CiTIUS), \n    University of Santiago de Compostela (USC).\n    \n    Permission is hereby granted, free of charge, to any person obtaining a copy\n    of this software and associated documentation files (the \"Software\"), to deal\n    in the Software without restriction, including without limitation the rights\n    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n    copies of the Software, and to permit persons to whom the Software is\n    furnished to do so, subject to the following conditions:\n    \n    The above copyright notice and this permission notice shall be included in\n    all copies or substantial portions of the Software.\n    \n    THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n    THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcitiususc%2Fjflap-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcitiususc%2Fjflap-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcitiususc%2Fjflap-lib/lists"}