2024-06-23-Ceptre Overview
Ceptre Overview
Ceptre consists of
A factbase
A set of rules, organized in groups called “Stages”.
A 'rule' consists of 2 parts:
👀 Inhale - pattern match against the factbase and collect up a set of rules that successfully match against facts in the factbase.
✏️ Exhale - execute actions of any one successful match. This might change/rewrite facts in the factbase.
Only rules within the current stage are considered each time around.
The Ceptre main loop algorithm can be summarized as:
Decide which is the current stage.
Perform pattern matching against the factbase, based only on the rules in the current stage. Mark or collect up all rules that successfully match the current contents of the factbase.
If there is at least one successful match, pick (arbitrarily) one successful match and run its actions. If there are no successful matches in the current stage, then, declare the current stage to be qui (quiescent).
If the current stage is qui run the top level rules. The top level rules can (a) select any stage to be the next current stage, or, the top level rules can (b) declare the program to be “finished”.
If not finished, loop back to step 1 again. If finished, quit.
See Also
Ceptre: https://www.cs.cmu.edu/~cmartens/ceptre.pdf
References: https://guitarvydas.github.io/2024/01/06/References.html
Blog: https://guitarvydas.github.io/
Blog: https://publish.obsidian.md/programmingsimplicity
Videos: https://www.youtube.com/@programmingsimplicity2980
Discord: https://discord.gg/Jjx62ypR
Leanpub: https://leanpub.com/u/paul-tarvydas
Gumroad: https://tarvydas.gumroad.com
Twitter: @paul_tarvydas