Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andrew-johnson-4/InPlace
An implementation of several strongly-normalizing string rewriting systems
https://github.com/andrew-johnson-4/InPlace
Last synced: about 2 months ago
JSON representation
An implementation of several strongly-normalizing string rewriting systems
- Host: GitHub
- URL: https://github.com/andrew-johnson-4/InPlace
- Owner: andrew-johnson-4
- License: mit
- Created: 2023-12-04T22:51:07.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-06T05:44:55.000Z (about 1 year ago)
- Last Synced: 2024-05-01T16:18:12.817Z (9 months ago)
- Language: Rust
- Size: 81.1 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-rust-formalized-reasoning - Relog - implementation of several strongly-normalizing string rewriting systems. (Unclassified / Libraries)
README
# [Relog](https://github.com/andrew-johnson-4/InPlace/wiki)
An implementation of several strongly-normalizing string rewriting systems# Relog (Reduction Logic) Flavor
```relog
a = Int;
List
---output----
ListA> = A>;
R
---output-------------------
RA := R;
A
---output----------
RPrint<"hello world">
---output-----------
[stdout]hello world
0For
>
---output------------------------------
[stdout]99 bottles of beer on the wall
...
0
```## Relog Syntax
Relog is a type system, not a programming language. It is not Turing Complete, it is Strongly Normalizing.
The basic syntax of a Relog program is defined by unifications, followed by a result.
Unifications have a left-hand-side and a right-hand-side separated by an equal sign with a semicolon after each unification:
```
Pair = Pair;
```Results are a single term and can reference unification variables bound by previous actions:
```
Pair
```An example program might represent the application of a function `a -> Maybe` with argument `Int` which would look like below:
```
a = Int;
Maybe
```when running this program the unification will bind `Int` to `a` and return the result `Maybe`.
## Relog Type System
![Reduction](https://github.com/andrew-johnson-4/InPlace/blob/main/unifyreify.png)
$$apply \ \ \frac{unify(f,fx)⊢r}{f⇻r⊢reify(apply(r))}$$