newdata.spad line 147 [edit on github]
This domain exports a modest implementation for the vertices of splitting trees. These vertices are called here splitting nodes. Every of these nodes store 3 informations. The first one is its value, that is the current expression to evaluate. The second one is its condition, that is the hypothesis under which the value has to be evaluated. The last one is its status, that is a boolean flag which is true
iff the value is the result of its evaluation under its condition. Two splitting vertices are equal iff they have the sane values and the same conditions (so their status do not matter).
condition(n)
returns the condition of the node n
.
construct(v, t)
returns the same as construct(v, t, false)
construct(v, t, b)
returns the non-empty node with value v
, condition t
and flag b
construct(vt)
returns the same as construct(vt.val, vt.tower)
construct(v, lt)
returns the same as [construct(v, t) for t in lt]
construct(lvt)
returns the same as [construct(vt.val, vt.tower) for vt in lvt]
copy(n)
returns a copy of n
.
empty()
returns the same as [empty()$V, empty()$C, false]$%
empty?(n)
returns true
iff the node n
is empty()$%
.
infLex?(n1, n2, o1, o2)
returns true
iff o1(value(n1), value(n2))
or value(n1) = value(n2)
and o2(condition(n1), condition(n2))
.
setCondition!(n, t)
returns n
whose condition has been replaced by t
if it is not empty, else an error is produced.
setEmpty!(n)
replaces n
by empty()$%
.
setStatus!(n, b)
returns n
whose status has been replaced by b
if it is not empty, else an error is produced.
setValue!(n, v)
returns n
whose value has been replaced by v
if it is not empty, else an error is produced.
status(n)
returns the status of the node n
.
subNode?(n1, n2, o2)
returns true
iff value(n1) = value(n2)
and o2(condition(n1), condition(n2))
value(n)
returns the value of the node n
.