For each variable in the description, we must create all the corresponding set variables required by the encoding. This is the purpose of function MakeNode
. It is invoked as {MakeNode I Vars}
where I
is the unique integer used to represent variable and Vars
is a set variable representing the set of all variables occurring in the description. The function returns a representation of in the form of a record.
- <Dominance: MakeNode>=
fun {MakeNode I Vars}
[Eq Down Up Side] = {FS.var.list.decl 4}
EqDown = {FS.union Eq Down}
EqUp = {FS.union Eq Up}
in
{FS.partition [Eq Down Up Side] Vars}
{FS.include I Eq}
node(
eq : Eq
down : Down
up : Up
side : Side
eqdown : EqDown
equp : EqUp
daughters : _)
end