Syntax Reference¶
Terse reads like English. No braces. No semicolons. Indentation defines structure.
Facts¶
Declare knowledge about a node.
Relationships¶
Declare a directed edge between two nodes.
Any two-word line where the first word is a known node is a relationship declaration.
Inference Rules¶
Declare a rule: if a condition is true, derive a new fact.
Inference¶
Apply all known rules to a node and derive new facts.
Terse walks the inference rules, checks the node's facts, and adds derived facts automatically.
Sequence Learning¶
Teach Terse a chain of concepts. Builds Markov chain transition probabilities.
Prediction¶
Predict the most likely next concept after a given concept.
Returns the concept with the highest transition probability, with a confidence score.
Generation¶
Chain predictions into a sequence starting from a concept.
Follows the most likely path through the Markov chain for N steps.
Functions¶
Define a reusable block with a parameter.
Call it:
toopens a function definition- The next word is the function name
- The word after is the parameter name
- Indented lines are the body
returnreturns a value
Each Loop¶
Iterate over all nodes of a given type.
Finds all nodes where is == animal and runs the body for each, with creature bound to each node in turn.
While Loop¶
Repeat while a condition holds.
Has a 100 iteration safety limit during development.
Comments¶
Keywords¶
know, is, has, when, then, infer, each, in, to, return,
and, or, compress, expand, can, needs, if, while, not,
true, false, weight, node, graph, edge, tensor, query,
onboard, ethics, rule, deny, allow, learn, predict,
generate, after, from, steps
Design Principles¶
- Two-word lines are function calls —
classify dogcalls theclassifyfunction withdogas argument - Three-word lines are relationships —
dog chases catdeclares an edge - Indentation defines scope — function bodies are indented, no braces needed
- Nodes never decay — same principle as NCI. Explicit deprecation only.
- The compiler absorbs complexity — memory management, type layout, tensor representation are compiler responsibilities, not programmer responsibilities