{"id":20462021,"url":"https://github.com/denvercoder1/godel-program-converter","last_synced_at":"2025-08-04T20:05:15.839Z","repository":{"id":48239565,"uuid":"390355360","full_name":"DenverCoder1/godel-program-converter","owner":"DenverCoder1","description":"Program to convert a program encoding based on its Gödel number to 𝒮 Language (S Language) or convert an 𝒮 Language program to it's program number","archived":false,"fork":false,"pushed_at":"2022-09-06T21:13:40.000Z","size":55,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-05T11:39:54.565Z","etag":null,"topics":["code-generation","computability-theory","computer-science","godel-numbering","theory-of-computation"],"latest_commit_sha":null,"homepage":"","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/DenverCoder1.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":"2021-07-28T13:10:13.000Z","updated_at":"2024-12-09T20:31:38.000Z","dependencies_parsed_at":"2022-08-24T17:10:50.298Z","dependency_job_id":null,"html_url":"https://github.com/DenverCoder1/godel-program-converter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DenverCoder1/godel-program-converter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DenverCoder1%2Fgodel-program-converter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DenverCoder1%2Fgodel-program-converter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DenverCoder1%2Fgodel-program-converter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DenverCoder1%2Fgodel-program-converter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DenverCoder1","download_url":"https://codeload.github.com/DenverCoder1/godel-program-converter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DenverCoder1%2Fgodel-program-converter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268765506,"owners_count":24304189,"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","status":"online","status_checked_at":"2025-08-04T02:00:09.867Z","response_time":79,"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":["code-generation","computability-theory","computer-science","godel-numbering","theory-of-computation"],"created_at":"2024-11-15T12:29:36.887Z","updated_at":"2025-08-04T20:05:15.801Z","avatar_url":"https://github.com/DenverCoder1.png","language":"Python","readme":"# Gödel Program Converter\n\nProgram to convert a program encoding based on its Gödel number to 𝒮 Language (S Language) or convert an 𝒮 Language program to its program number\n\n- [Convert a program number to code](#convert-a-program-number-to-code)\n  - [Running the code](#running-the-code)\n  - [Examples](#examples)\n- [Convert code to a program number](#convert-code-to-a-program-number)\n  - [Running the code](#running-the-code-1)\n  - [How to input code](#how-to-input-code)\n  - [Examples](#examples-1)\n- [Development](#development)\n- [See also](#see-also)\n\n## Convert a program number to code\n\n### Running the code\n\n#### Method 1: Command line input\n\nLaunch the program, providing the number as a command line argument:\n\n`py -m src.godel_to_code [program number]`\n\nFor example: `py -m src.godel_to_code 52`\n\n(The command for Python may be different on your system.  See the [Python documentation](https://docs.python.org/3/using/index.html) for details.)\n\n#### Method 2: Interactive input\n\nLaunch the program with the following command:\n\n`py -m src.godel_to_code`\n\nEnter a program number when prompted.\n\n### Examples\n\n```\nEnter program number: 99\nY ← Y + 1\nY ← Y\nY ← Y + 1\n```\n\n```\nEnter program number: 25724\nY ← Y\n[A1] Y ← Y\nY ← Y + 1\n[B1] Y ← Y\n```\n\n```\nEnter program number: 2097151\n[A1] X1 ← X1 + 1\n```\n\n## Convert code to a program number\n\n### Running the code\n\n#### Method 1: File input\n\nLaunch the program with the following command:\n\n`py -m src.code_to_godel test.s`\n\nWhere `test.s` is the name of the file containing the program.\n\n#### Method 2: Command line input\n\nLaunch the program with the code input as a command line argument:\n\nSingle line:\n\n`py -m src.code_to_godel \"Y \u003c- Y + 1\"`\n\nMultiline:\n\n```bash\npy -m src.code_to_godel \u003c\u003cEOF\nY \u003c- Y\nY \u003c- Y + 1\nEOF\n```\n\n#### Method 3: Interactive input\n\nLaunch the program with the following command:\n\n`py -m src.code_to_godel`\n\nEnter the code line by line when prompted. Enter a blank line to end the input.\n\n### How to input code\n\n* Assignment can be represented by `\u003c-`, `=`, `\u003c=` or `←`.\n* Inequality can be represented by `!=`, `=/=`, or `≠`.\n* Labels must only contain indexed letters A-E, and variables must be either `Y`, or an indexed `X` or `Z`.\n* Labels without indices will be interpreted as index 1 (eg. `[A]` is equivalent to `[A1]`).\n* Variables without indices will be interpreted as index 1 (eg. `X` is equivalent to `X1`).\n* Valid instructions include: `V ← V`, `V ← V + 1`, `V ← V - 1`, and `IF V≠0 GOTO L` where in all cases, `V` represents a variable and `L` represents a label as specified above.\n* Instructions can be preceded by a label in square brackets (eg. `[A]`).\n\n### Examples\n\n```\nEnter program (press enter twice to submit):\n\nProgram number: 0\n```\n\n```\nEnter program (press enter twice to submit):\nY \u003c- Y                       \n[A] Y \u003c- Y\nY \u003c- Y + 1\n[B] Y \u003c- Y\n\nProgram number: 25724\n```\n\n```\nEnter program (press enter twice to submit):\nIF X != 0 GOTO A \nY \u003c- Y + 1\n[A1] Y \u003c- Y - 1    \n\nProgram number: 773094113279999999999999\n```\n\n## Development\n\nCommand to run tests:\n\n``tox``\n\nCommand to lint with flake8:\n\n``py setup.py lint``\n\n## See also\n\n  * [S-interpreter](https://github.com/abrahammurciano/s-interpreter) by [@abrahammurciano](https://github.com/abrahammurciano)\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenvercoder1%2Fgodel-program-converter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdenvercoder1%2Fgodel-program-converter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenvercoder1%2Fgodel-program-converter/lists"}