|| :@include: lib/rpn.nv ||:: ( a = b + c ; var c ; a = 10 ; b <- 20 ; c <- 30 ; { a = b - c ; var b ; c = 20 ; b <- 30 ; } ) |:: (var $x ;)| :: var $x |:: ($x <- $y ;)| :: $x <- $y |:: ($x = $y $op $z ;)| :: $x = $y $op $z |:: ($x = $y ;)| :: $x = $y |:: {| :: open a scope |:: }| :: close a scope |:: open a scope| :: open a variable scope :: open a propagator scope |:: open a variable scope| :variables: |:: open a propagator scope| :nodes: |:: close a scope| :: close a variable scope :: close a propagator scope |:: close a variable scope :variables:| |:: close a variable scope? :variables: $x $y| |:: close a variable scope| |:: close a propagator scope :nodes:| |:: close a propagator scope? :nodes: $op $x $y $z| |:: close a propagator scope| |:: $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 |:: propagate changes| |:: 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|