Skip to main content

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 Automata
  • Deterministic 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

Metadata

Release files for gold-python 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gold-python 0.1.3
File Size Uploaded Provenance Actions
gold_python-0.1.3.tar.gz 5.0 kB Without provenance Details for gold_python-0.1.3.tar.gz

Release files / gold_python-0.1.3.tar.gz

Download URL gold_python-0.1.3.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
8fed8edebf26128d3c8a24169e906bbbff526512b1f0819b98ad131213ddd000
BLAKE2b-256 checksum
How to use checksums
960d32ee3ab800f942fa53871213fe0ba989cc94df3b3ac40eb26b5776a86d21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.8

Security for gold-python 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page