Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arsenic-atg/finite-automata
A simple C++ library to simulate Finite Automata.
https://github.com/arsenic-atg/finite-automata
cplusplus cpp cpp-library finite-automata finite-state-machine hacktoberfest library
Last synced: 25 days ago
JSON representation
A simple C++ library to simulate Finite Automata.
- Host: GitHub
- URL: https://github.com/arsenic-atg/finite-automata
- Owner: Arsenic-ATG
- License: mit
- Created: 2021-12-12T11:18:40.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-10-25T11:23:49.000Z (over 2 years ago)
- Last Synced: 2024-11-17T15:52:43.831Z (3 months ago)
- Topics: cplusplus, cpp, cpp-library, finite-automata, finite-state-machine, hacktoberfest, library
- Language: C++
- Homepage: https://arsenic-atg.github.io/Finite-Automata/
- Size: 3.04 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.org
- License: LICENSE
Awesome Lists containing this project
README
* Finite Automata
:PROPERTIES:
:CUSTOM_ID: finite-automata
:END:
A simple C++ library to simulate finite automata.The library mostly operates upon a object of class =finite_automata= which is by definition a 5 tuple (Q, Σ, δ, q0, F)
1. Q = finite set of states the automata can operate on.
2. Σ = Finte set of input aphabet symbols
3. δ = transition functions ( )
4. q0 = initial state
5. F = finite set of final states
one can create an object of type =finite_automata= like this :#+begin_src cpp
auto nfa_transitions = (fa::transition_table) { {{1,'a'},{1}} ,
{{1,'b'},{2}} ,
{{2,'a'},{2,1}} ,
{{2,'b'},{3}} ,
{{3,'a'},{3}} ,
{{3,'b'},{3}}};auto nfa = fa::finite_automata ({1,2,3},
{'a','b'},
{3},
1,
nfa_transitions);#+end_src
learn more about the API in the docs.
** Prerequisites ( to build from source )
- [[https://gcc.gnu.org][standard C++ compiler]]
- [[https://www.gnu.org/software/make/][GNU Make]]
** How to use it ?1. Go to src/ diectory.
2. Run =make install= to build the static library in =./binaries=.3. for any query/bug report, feel free to open an [[https://github.com/Arsenic-ATG/Finite-Automata/issues][issue]] regarding the same.
** Examplescheck out [[file:testsuite/fa-basic.tests/convertor.cpp][this example]] which demonstrates the use of =fa::convert_to_dfa ()= to convert an NFA to corresponding DFA.
* For the Devs
[WIP]
* License
[[file:LICENSE][MIT License]]
Copyright 2022 © [[https://github.com/Arsenic-ATG][Ankur Saini]]