{"id":13647374,"url":"https://github.com/kelvindecosta/alan","last_synced_at":"2026-01-12T02:49:39.161Z","repository":{"id":57409478,"uuid":"164350606","full_name":"kelvindecosta/alan","owner":"kelvindecosta","description":":computer: A programming language for designing Turing Machines.","archived":false,"fork":false,"pushed_at":"2020-06-25T21:10:42.000Z","size":3342,"stargazers_count":52,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-15T03:33:24.081Z","etag":null,"topics":["computation","langauge","turing","turing-machine"],"latest_commit_sha":null,"homepage":"https://pypi.python.org/pypi/alan/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kelvindecosta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-06T22:21:07.000Z","updated_at":"2023-11-30T08:43:41.000Z","dependencies_parsed_at":"2022-08-24T20:00:13.273Z","dependency_job_id":null,"html_url":"https://github.com/kelvindecosta/alan","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelvindecosta%2Falan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelvindecosta%2Falan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelvindecosta%2Falan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelvindecosta%2Falan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kelvindecosta","download_url":"https://codeload.github.com/kelvindecosta/alan/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250107886,"owners_count":21376019,"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":["computation","langauge","turing","turing-machine"],"created_at":"2024-08-02T01:03:31.709Z","updated_at":"2025-04-22T02:31:32.114Z","avatar_url":"https://github.com/kelvindecosta.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Alan\n\n\u003cp align=center\u003e\n\n  \u003cimg src=\"https://raw.githubusercontent.com/kelvindecosta/alan/master/assets/readme/logo.png\" height=\"200px\"/\u003e\n\n  \u003cbr\u003e\n  \u003cspan\u003eA programming language for \u003cem\u003edesigning\u003c/em\u003e Turing machines.\u003c/span\u003e\n  \u003cbr\u003e\n  \u003ca target=\"_blank\" href=\"https://www.python.org/downloads/\" title=\"Python version\"\u003e\u003cimg src=\"https://img.shields.io/badge/python-%3E=_3.6-green.svg\"\u003e\u003c/a\u003e\n  \u003ca target=\"_blank\" href=\"LICENSE\" title=\"License: MIT\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-MIT-blue.svg\"\u003e\u003c/a\u003e\n  \u003ca target=\"_blank\" href=\"https://pypi.python.org/pypi/alan/\"\u003e\u003cimg alt=\"pypi package\" src=\"https://badge.fury.io/py/alan.svg\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#walkthrough\"\u003eWalkthrough\u003c/a\u003e\n  \u0026nbsp;\u0026nbsp;\u0026nbsp;|\u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e\n  \u0026nbsp;\u0026nbsp;\u0026nbsp;|\u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003ca href=\"https://github.com/kelvindecosta/alan/wiki\"\u003eWiki\u003c/a\u003e\n  \u0026nbsp;\u0026nbsp;\u0026nbsp;|\u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003ca href=\"#citation\"\u003eCitation\u003c/a\u003e\n\n\u003c/p\u003e\n\n## Installation\n\n```bash\npip install alan\n```\n\n## Walkthrough\n\nThis section describes a workflow.\n\nFor an in-depth guide navigate to the [Wiki](https://github.com/kelvindecosta/alan/wiki).\nHere are some useful links:\n\n*   [Definition](https://github.com/kelvindecosta/alan/wiki/Definition)\n*   [Syntax](https://github.com/kelvindecosta/alan/wiki/Syntax)\n*   [Interface](https://github.com/kelvindecosta/alan/wiki/Interface)\n\nConsider the following example, the definition for a Turing machine that accepts all binary strings that are palindromic:\n\n```\n# This is a definition of a Turing Machine that accepts binary strings that are palindromes\n' '\nA*\n    'X' 'X' \u003c A\n    'Y' 'Y' \u003c A\n    '0' 'X' \u003e B\n    '1' 'Y' \u003e F\n    ' ' ' ' \u003e G\nB                   # Starting with 0\n    '0' '0' \u003e B\n    '1' '1' \u003e B\n    ' ' ' ' \u003c C\n    'X' 'X' \u003c C\n    'Y' 'Y' \u003c C\nF                   # Starting with 1\n    '0' '0' \u003e F\n    '1' '1' \u003e F\n    ' ' ' ' \u003c E\n    'X' 'X' \u003c E\n    'Y' 'Y' \u003c E\nC\n    '0' 'X' \u003c D\n    'X' 'X' \u003c D\nE\n    '1' 'Y' \u003c D\n    'Y' 'Y' \u003c D\nD\n    '0' '0' \u003c D\n    '1' '1' \u003c D\n    ' ' ' ' \u003e A\n    'X' 'X' \u003e A\n    'Y' 'Y' \u003e A\nG.\n    'X' '0' \u003e G\n    'Y' '1' \u003e G\n```\n\nGraph the machine:\n\n```bash\nalan graph examples/binary-palindrome.aln -f assets/readme/binary-palindrome.png\n```\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/kelvindecosta/alan/master/assets/readme/binary-palindrome.png\"\u003e\u003c/p\u003e\n\nRun the machine on some inputs:\n\n*   ```bash\n    alan run examples/binary-palindrome.aln 101\n    ```\n\n    ```\n    Accepted\n    Initial Tape : 101\n    Final Tape   : 10\n    ```\n\n*   ```bash\n    alan run examples/binary-palindrome.aln 1010\n    ```\n\n    ```\n    Rejected\n    Initial Tape : 1010\n    Final Tape   : Y010\n    ```\n\nAnimate the computation on some inputs:\n\n*   ```bash\n    alan run examples/binary-palindrome.aln 101 -a -f assets/readme/binary-palindrome-accepted.gif\n    ```\n\n    ![Animation of accepted input](https://raw.githubusercontent.com/kelvindecosta/alan/master/assets/readme/binary-palindrome-accepted.gif)\n\n*   ```bash\n    alan run examples/binary-palindrome.aln 1010 -a -f assets/readme/binary-palindrome-rejected.gif\n    ```\n\n    ![Animation of rejected input](https://raw.githubusercontent.com/kelvindecosta/alan/master/assets/readme/binary-palindrome-rejected.gif)\n\n## Citation\n\nIf you use this implementation in your work, please cite the following:\n\n```\n@misc{decosta2019alan,\n    author = {Kelvin DeCosta},\n    title = {Alan},\n    year = {2019},\n    howpublished = {\\url{https://github.com/kelvindecosta/alan}},\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkelvindecosta%2Falan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkelvindecosta%2Falan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkelvindecosta%2Falan/lists"}