AngouriMath

Navigation

← Back to list of members

Construct​(System.​Type,​AngouriMath.​Entity[])

 Method (no overloads)

Summary

A node of nodeType over children, or
null where that is not a node this builds at that arity.

Remarks

Written out rather than reflected. Activator.CreateInstance would build any node
type and would make this un-trimmable and un-AOT-publishable, which
Docs/Contributing/Trimming.md forbids for the kernel; and a node's constructor is
not reachable through IUnaryNode or IBinaryNode, which expose the children
and nothing else.
A node type absent from constructors is matchable but not buildable:
a pattern over it is still a rule's left-hand side, and IsBuildable is what
says it cannot be a right-hand side or be reached by reading a rule backwards. Adding a
type is one line, and EveryDataRuleIsBuildableOnBothSides is the test that says
when one is owed.
What is still absent, and why. Two kinds. Binders — Entity.Lambda and Entity.Set.ConditionalSet — take a bound variable whose scope their body is
under, and EGraph has no notion of binding: it would happily union a
bound occurrence with a free one, and DirectChildren hands out a
capture-avoidingly renamed body rather than the written one. Rebuilding either from an
e-class would produce a term that means something else. Variable-arity nodes —
Piecewise, Application, the finite Sets and the Matrix —
are out of this table's shape rather than out of principle: it keys on a type and an
arity of one or two, and widening it to n children is a different piece of work.

























Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 4378 pages online