Library for the developement of finite automata
Project description
GOLD-Python
GOLD-Python is a port of the GOLD programming language's Finite Automata features to Python 3.10 for a better developer experience.
How to install
pip install gold-python
Using the library:
def main():
automaton = createAutomaton()
print(automaton.acceptsInput(input("Enter: ")))
automaton.show()
def createAutomaton():
Q = product(between(0, 7), between(0, 1))
E = "01"
Q0 = (0, 0)
F = [(0, 0)]
return DeterministicAutomata(Q, E, Q0, F, delta)
@deltafunc
def delta(x, y, next):
d = int(next)
if (x, y) == (0, 1):
return (0, 1)
elif x==7:
return (0, 0) if (d-y==0) else (0, 1)
else:
return (x+1, (y+d) % 2)
if __name__ == "__main__":
main()
Features:
- Better Syntax Autocompletion
- Support for types
- Docstrings for most functions
- Documentation in HTML (work in progress)
Progress:
Deterministic Finite State AutomataDeterministic Transducer (Mealey)Basic Set Operations (Between, Product)Non-Deterministic Finite State Automata- Pushdown Automata
- Advanced Set Operations (String ranges, Parts of sets, etc)
- GUI Interface to show Automata
- Full documentation in Sphinx (Progress: 0%)
- Release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gold_python-0.1.3.tar.gz
(5.0 kB
view details)
File details
Details for the file gold_python-0.1.3.tar.gz
.
File metadata
- Download URL: gold_python-0.1.3.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8fed8edebf26128d3c8a24169e906bbbff526512b1f0819b98ad131213ddd000 |
|
MD5 | 99c2ed3c622a0cb25010ceb186e71b68 |
|
BLAKE2b-256 | 960d32ee3ab800f942fa53871213fe0ba989cc94df3b3ac40eb26b5776a86d21 |