Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/denvercoder1/godel-program-converter

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
https://github.com/denvercoder1/godel-program-converter

code-generation computability-theory computer-science godel-numbering theory-of-computation

Last synced: about 6 hours ago
JSON representation

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

Awesome Lists containing this project

README

        

# Gödel Program Converter

Program to convert a program encoding based on its Gödel number to 𝒮 Language (S Language) or convert an 𝒮 Language program to its program number

- [Convert a program number to code](#convert-a-program-number-to-code)
- [Running the code](#running-the-code)
- [Examples](#examples)
- [Convert code to a program number](#convert-code-to-a-program-number)
- [Running the code](#running-the-code-1)
- [How to input code](#how-to-input-code)
- [Examples](#examples-1)
- [Development](#development)
- [See also](#see-also)

## Convert a program number to code

### Running the code

#### Method 1: Command line input

Launch the program, providing the number as a command line argument:

`py -m src.godel_to_code [program number]`

For example: `py -m src.godel_to_code 52`

(The command for Python may be different on your system. See the [Python documentation](https://docs.python.org/3/using/index.html) for details.)

#### Method 2: Interactive input

Launch the program with the following command:

`py -m src.godel_to_code`

Enter a program number when prompted.

### Examples

```
Enter program number: 99
Y ← Y + 1
Y ← Y
Y ← Y + 1
```

```
Enter program number: 25724
Y ← Y
[A1] Y ← Y
Y ← Y + 1
[B1] Y ← Y
```

```
Enter program number: 2097151
[A1] X1 ← X1 + 1
```

## Convert code to a program number

### Running the code

#### Method 1: File input

Launch the program with the following command:

`py -m src.code_to_godel test.s`

Where `test.s` is the name of the file containing the program.

#### Method 2: Command line input

Launch the program with the code input as a command line argument:

Single line:

`py -m src.code_to_godel "Y <- Y + 1"`

Multiline:

```bash
py -m src.code_to_godel <