{"id":19714360,"url":"https://github.com/jaleelb/dfa-analyzer","last_synced_at":"2026-06-10T03:31:08.169Z","repository":{"id":155556778,"uuid":"626220669","full_name":"JaleelB/dfa-analyzer","owner":"JaleelB","description":" A C++ library to create, load, and analyze Deterministic Finite Automata (DFA) with up to 10 states and lowercase letter alphabets. Offers file loading, state modification, and string acceptance checks.","archived":false,"fork":false,"pushed_at":"2023-04-21T00:34:22.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-27T21:41:44.091Z","etag":null,"topics":["automata-theory","cplusplus-library","deterministic-finite-automata","dfa","dfa-construction","state-machine"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JaleelB.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-11T03:16:22.000Z","updated_at":"2023-11-18T07:25:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"1e157168-c873-43bf-9ec8-d248e078e513","html_url":"https://github.com/JaleelB/dfa-analyzer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JaleelB/dfa-analyzer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JaleelB%2Fdfa-analyzer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JaleelB%2Fdfa-analyzer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JaleelB%2Fdfa-analyzer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JaleelB%2Fdfa-analyzer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JaleelB","download_url":"https://codeload.github.com/JaleelB/dfa-analyzer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JaleelB%2Fdfa-analyzer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34136112,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["automata-theory","cplusplus-library","deterministic-finite-automata","dfa","dfa-construction","state-machine"],"created_at":"2024-11-11T22:31:12.183Z","updated_at":"2026-06-10T03:31:08.147Z","avatar_url":"https://github.com/JaleelB.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DFA Analyzer\nDFA-Analyzer is a C++ library that allows you to create, load, and analyze Deterministic Finite Automata (DFA). The library is designed to work with DFAs where the number of states is between 1 and 10, and the alphabet is a subset of lowercase English letters.\n\n## Features\n- Load DFAs from text files with a specific format\n- Set and modify start and accept states of the DFA\n- Check if a given input string is accepted by the DFA\n- Convert the DFA's transition table to a string representation\n\n## Usage\nInclude the header file DFA.h in your project and create an instance of the DFAnalyzer class.\n```\n#include \"DFA.h\"\n\nint main() {\n    DFAnalyzer analyzer;\n    analyzer.Load(\"M1.txt\");\n    analyzer.ModifyAcceptState('0');\n    analyzer.ModifyAcceptState('3');\n    analyzer.ModifyAcceptState('3');\n    analyzer.SetStartState('1');\n    \n    std::cout \u003c\u003c analyzer.IsAccepted(\"aab\") \u003c\u003c std::endl;\n    std::cout \u003c\u003c analyzer.IsAccepted(\"aba\") \u003c\u003c std::endl;\n    std::cout \u003c\u003c analyzer.IsAccepted(\"bab\") \u003c\u003c std::endl;\n    std::cout \u003c\u003c analyzer.IsAccepted(\"bbb\") \u003c\u003c std::endl;\n    \n    return 0;\n}\n```\n\n## Getting Started\nThese instructions will help you compile and run the project on your local machine.\n\n### Prerequisites\n- A C++ compiler that supports C++11 standard\n- The source code files: main.cpp, DFAnalyzer.h, and any input files containing DFA instructions\n\n### Compiling the Project\nTo compile the project, navigate to the directory containing the source code files and run the following command:\n```g++ -std=c++11 -o dfa main.cpp```\nThis command tells the compiler to use the C++11 standard, which is necessary because of the for-each loop used in the project. The -o dfa flag indicates that the output executable should be named \"dfa\".\n\n### Running the Executable\nAfter compiling the project, you can run the \"dfa\" executable by entering the following command:\n`./dfa`\n\n## Input File Format\nThe input file should contain instructions for the DFA's transitions, with one instruction per line. Each instruction should be in the following format:\n\n`state[symbol]+state`\n\nwhere `state` is a digit character and `symbol` is a lowercase letter character. An instruction should be a string of at least one lowercase letter enclosed between two digit characters. Spaces between characters should be ignored, but other characters should make the instruction set invalid.\n\nFollow any prompts in the program to load a DFA from a file, set the start state, modify accept states, and check if input strings are accepted by the DFA.\n\n## DFA Input File Example\n```\n1a3\n1b0\n0a2\n0b1\n2a0\n2b3\n3a1\n3b2\n```\n\n## Author\n👤  Jaleel Bennett\n\n## Show your support\nGive a ⭐️ if this project helped you!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaleelb%2Fdfa-analyzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaleelb%2Fdfa-analyzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaleelb%2Fdfa-analyzer/lists"}