Term rewriting and transformation engine
Symbolverse defines the semantics of a frame.
It describes how one symbolic structure is rewritten into another.
This is where meaning happens — logic, inference, and transformation.
<start> := <ruleset>
<ruleset> := (REWRITE <elem>+)
<elem> := (RULE (READ <S-EXPR>) (WRITE <S-EXPR>))
| (COMPUTE (NAME <ATOM>) <ruleset>)
<compute-call> := (RUN <ATOMIC> <ANY>)
Replace every occurrence of (mul x x)
with (pow x 2)
:
(APPLY
symbolverse
(SEXPR
(REWRITE
(RULE
(READ ("mul" x x))
(WRITE ("pow" x "2"))))))
Input:
(SEXPR (eq (mul x x) (pow x 2)))
Output:
(SEXPR (eq (pow x 2) (pow x 2)))
(RUN name input)
.