https://github.com/shilangyu/stackorderedtypes
Formalization of a small stack-based language with ordered typed
https://github.com/shilangyu/stackorderedtypes
lean programming-languages
Last synced: 5 months ago
JSON representation
Formalization of a small stack-based language with ordered typed
- Host: GitHub
- URL: https://github.com/shilangyu/stackorderedtypes
- Owner: shilangyu
- Created: 2025-07-12T13:26:57.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-07-27T09:14:35.000Z (11 months ago)
- Last Synced: 2025-08-23T19:39:16.111Z (10 months ago)
- Topics: lean, programming-languages
- Language: Lean
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Stack based language with ordered types
Small formalization of a stack-based language with ordered types.
The language operates on numbers using binary operators, function abstractions and applications, duplication of items on the stack.
For instance,
- `4 1 dup1 dup1 +` reduces to `5 :: 1 :: 4 :: ∅` (proof `q15`)
- `fun{ 1 + } 4 dup1 app` has a reduction (proof `q16`)
- there are terms which do not reduce (proof `q17`)
- every reducable term has a unique reduction (proof `q18`)
Then, we add typing for terms. This forbids terms which are not reducible
- `4 fun(Nat :: ∅){ 1 + } app` has a type that can be inferred (proof `q19`)
- every well-typed term has a reduction (proof `q20` NOT DONE)