In mathematics and theoretical computer science, a set constraint is an equation or an inequation between sets of terms. Similar to systems of (in)equations between numbers, methods are studied for solving systems of set constraints. Different approaches admit different operators (like "∪", "∩", "\", and function application)[note 1] on sets and different (in)equation relations (like "=", "⊆", and "⊈") between set expressions.
Systems of set constraints are useful to describe (in particular infinite) sets of ground terms.[note 2] They arise in program analysis, abstract interpretation, and type inference.
Each regular tree grammar can be systematically transformed into a system of set inclusions such that its minimal solution corresponds to the tree language of the grammar.
For example, the grammar (terminal and nonterminal symbols indicated by lower and upper case initials, respectively) with the rules
is transformed to the set inclusion system (constants and variables indicated by lower and upper case initials, respectively):
This system has a minimal solution, viz. ("L(N)" denoting the tree language corresponding to the nonterminal N in the above tree grammar):
The maximal solution of the system is trivial; it assigns the set of all terms to every variable.
{{cite tech report}}
{{cite book}}
This mathematical logic-related article is a stub. You can help Wikipedia by expanding it.
This theoretical computer science–related article is a stub. You can help Wikipedia by expanding it.