feat: Support first-order logic in diagramming rules
keenancrane opened this issue · comments
Keenan Crane commented
Currently our selectors have fairly limited specificity, because they effectively support only a very tiny subset of conditions that can be expressed in first order logic. E.g., we can ask that a predicate P(x)
be satisfied, and can emulate ¬P(x)
via an additional user-defined (in Domain) Not()
, but cannot express things like P(x) ∨ Q(y)
in the current system.
A natural idea is to provide a more complete first-order logic that provides, e.g., conjunctions and disjunctions. For instance,
-- if the graph has vertices but not edges, draw all vertices in red
-- to indicate that something fishy may be happening…
∃ Vertex v and ∄ Edge e
{
Color.vertexColor = rgba( 1., 0., 0., 0. )
}
(There's obviously a lot of discussion to be had on this issue…)