Expansion of testing suite to cover incl. library

Expands the testing suite to verify behavior of provided library
functions. Updates the README further for clarification on important
concepts.
This commit is contained in:
2024-12-29 10:28:32 -06:00
committed by James Eversole
parent 7a7ee6886a
commit f41c92fa9d
5 changed files with 118 additions and 46 deletions

View File

@ -2,27 +2,30 @@
## Introduction
tricu (pronounced like "tree-shoe") is a "micro-language" that [I'm](https://eversole.co) working on to investigate [Tree Calculus](https://github.com/barry-jay-personal/typed_tree_calculus/blob/main/typed_program_analysis.pdf).
tricu (pronounced like the words "tree-shoe" in English) is a language that [I'm](https://eversole.co) working on to investigate [Tree Calculus](https://github.com/barry-jay-personal/typed_tree_calculus/blob/main/typed_program_analysis.pdf).
tricu [means tree in Lojban](https://en.wiktionary.org/wiki/Appendix:Lojban/tricu). This project was named "sapling" until I discovered the name was already being used for other projects in programming language development.
tricu is the word for "tree" in Lojban (`(x1) is a tree of species/cultivar (x2)`). This project was named "sapling" until I discovered the name is already being used for other (completely unrelated) programming language development projects.
tricu offers a minimal amount of syntax sugar yet provides a complete and intuitive programming environment. tricu offers:
tricu offers minimal syntax sugar yet manages to provide a complete, intuitive, and familiar programming environment. There is great power in simplicity. tricu offers:
- `t` operator behaving by the rules of Tree Calculus
- Function ("variable") definitions
- Lambda abstractions
- List, Number, and String literals
1. `t` operator behaving by the rules of Tree Calculus
1. Function definitions/assignments
1. Lambda abstractions eliminated to Tree Calculus forms
1. List, Number, and String literals
1. Parentheses intuitively grouping function application
These basic features move us cleanly out of the [turing tarpit](https://en.wikipedia.org/wiki/Turing_tarpit) territory that you may find yourself in if you try working only with the `t` operator.
## What does it look like?
```
-- Anything after `--` on a line is a comment
-- We can define functions or "variables" as tree calculus values
-- We can define functions or "variables" as Tree Calculus values
false = t
_ = t
true = t t
-- We can define functions as lambda expressions that are eliminated to tree
-- calculus terms.
-- We can define functions as lambda expressions that are eliminated to Tree
-- Calculus terms.
id = (\a : a) -- `id` evaluates to the TC form of: t (t (t t)) t
triage = (\a b c : t (t a b) c)
-- Intensionality! We can inspect program structure, not just inputs/outputs: