|| :@include: lib/rpn.nv || :: declare variables :: (a b c d) :: c = b * a :: d = c + a :: a <- 3 :: b <- 2 |:: $x <- $y| :: set $x to $y :: propagate variable $x |:: declare variables? :: $name| :: var $name |:: declare variables| |:: var $x :default value: $y?| :: $x = $y |:: var $x| :: $x = 0 |:: $x = $y| :: set $x to $y |:: $z = $x $op $y| :nodes: $op $x $y $z |:: set $x to $y :variables: $x $z| :: reset variables :variables: $x $y |:: set $x to $y :not found: $x| :: reset variables :variables: $x $y |:: set $x to $y?| :: find $x |:: fetch the value of $x :variables: $x $y?| :: reset variables :values: $y |:: fetch the value of $x :not found: $x?| |:: fetch the value of $x?| :: find $x |:: propagate variable $x| :: fetch nodes that depend on $x :: propagate changes :: prime the network |:: propagate changes :dependencies: $op $x $y $z| :: fetch the value of $y :: fetch the value of $x :: compute $op and store it in $z :: propagate variable $z :visited: $op $x $y $z |:: compute $op and store it in $z :@rpn data: $x| :: set $z to $x |:: compute $op and store it in $z? :values: ($x $y)| :@rpn: ($x $y $op) |:: fetch nodes that depend on $x? :nodes: $op $x $y $z| :dependencies: $op $x $y $z |:: fetch nodes that depend on $x? :nodes: $op $y $x $z| :dependencies: $op $y $x $z |:: fetch nodes that depend on $x? :nodes: $op $w $y $z| :checked nodes: $op $w $y $z |:: fetch nodes that depend on $x| :: reset nodes |:: find $x :variables: $x $y?| |:: find $x? :variables: $z $y| :checked variables: $z $y |:: find $x| :: reset variables :not found: $x |:: reset variables? :checked variables: $x $y| :variables: $x $y |:: reset variables| |:: reset nodes? :checked nodes: $op $x $y $z| :nodes: $op $x $y $z |:: reset nodes| |:: prime the network? :visited: $op $x $y $z| :nodes: $op $x $y $z |:: prime the network|