Send
Close Add comments:
(status displays here)
Got it! This site "creationpie.org" uses cookies. You consent to this by clicking on "Got it!" or by continuing to use this website. Note: This appears on each machine/browser from which this site is accessed.
Constraint logic: unification and resolution
1. Constraint logic: unification and resolution
2. Constraint logic
A
constraint logic system is a system of
constraints whose solution needs to satisfy those constraints. One example is in the field of
linear programming (which uses linear constraints) where all solutions are (points or lines) on the boundary of the convex region.
A
unifier unifies the constraints without contradictions. A
MGU (Most General Unifier) unifies the constraints without contradictions and has a minimal frontier in the lattice of constraints, a
LFP (Least Fixed Point). If there are multiple solutions, a constraint logic system will attempt to find all
MGU constraints (e.g., via backtracking).
3. Negation by failure
In logical reasoning terms, this uses a "negation by failure" reasoning, common in logical programming and in human logic.
Negation by failure goes as follows: If one cannot prove something true it is assumed to be false.
If something cannot be shown to be a witness for God, then it is, by negation by failure reasoning, a sin.
[purple people eaters]
4. Constraint logic: unification and resolution
Determining the meaning of a word or phrase or idiom by looking at how it is used is similar to the idea of
unification in computer science (type inference) or logic programming (e.g., Prolog) or constraint logic programming in general.
Robinson's unification algorithm (1965)
Hindley-Milner type inference (1969, 1978)
A
unifier solves a problem for the entire collection of examples. A
MGU is more general than any other
unifier. The goal, as in programming, is to find the
least fixed point of a system of constraints that will act as a
MGU. This is more complicated, linguistically, when there is more than one word or phrase that is unknown in all examples of text that use that word or phrase.
5. Prolog
A specific implementation of unification and resolution is found in the logic programming language
Prolog which stands for "
Programming in logic". Prolog uses "
logical variables" which are placeholders to be filled-in later. Backtracking allows Prolog to undo assumptions when no solution is possible in order to try to find a solution or more solutions.
Unification A solution to a query is a binding to variables that make the query true (satisfy it). Unification is the minimal substitution of terms for variables such that the terms are satisfied.
6. Logical variables
In a logic language, such as Prolog, a logical variable is a placeholder that can hold one value. If at some point the system cannot be unified, backtracking is done to find a point at which the search for a solution can continue.
In this example, a logical variable is used to represent "
salt". That is, whatever "
salt" represents. And so on.
Let use cover some constraints as they appear and then summarize them at the end. For the present, where the
KJV (King James Version) models the
GNT (Greek New Testament), we will not be concerned with any nuances.
7. Puzzles
Unification is a form of finding (similar) pieces of a puzzle given a framework of constraints.
This is, given a selection of texts where all (or most) of the words are known except for one, the goal is to find a unifier such that all of the texts now make sense in the context that they are written.
Some puzzles are easier to solve than other puzzles.
8. Puzzle pieces
A simple puzzle piece has four sides and each side can have one of three configurations:
in,
none,
out.
9. Puzzle pieces
Here there are
3*3*3*3 or
81 possible puzzle pieces. Some are the same under
rotation so that there are
24 unique pieces. These
24 pieces can be used to create a puzzle. It is harder to take the mixed-up pieces and make the puzzle.
10. Interactive constraints
11. Puzzle patterns
Salt: You are the
salt of the
earth.
Light: You are the
light of the
world.
Candle: You are the
candle of the _______.
Candle: You are the
candle of the
air.
Candle: You are the
candle of
heaven.
Candle: You are the
kingdom of
heaven.
A
candle might represent a type of
kingdom such as a
church or group of believers. (Revelation).
[author variations]
12. Objective function
To provide value, a business needs an
objective function that can be maximized or minimized.
A simple objective function, such as with linear constraints, has a feasible region for which an optimum value of the objective function needs to be determined.
What might the objective function be for the following?
(medical) hospital
(medical) insurance company
educational institution
social work (government) group
church
What happens if the objective function of the person doing the work does not match the objective function of the institution?
13. Optimization
Not every constraint can be maximized or minimized at the same time.
The idea of "
optimization" means finding a solution that maximizes or minimizes the combined constraints.
It is
not all or nothing for each part, but both are needed.
☐ Value: Love God. Love God's rules. Hate the sin.
☐ Value: Love neighbor
as yourself. Love the sinner.
How well can you succeed if you provide just
one value?
14. Constraint logic
Some constraint logic features:
Assumes consistent code word meanings.
Uses most general unifiers.
Backtracking to find additional solutions.
Model can be gradually tightened as more constraints resolved.
| Method |
Cherry pick |
Constraint logic |
| Logic |
Abductive/Opinion |
Inductive/Deductive |
| Context |
ignored |
required |
| One refutation: |
destroys argument |
argument not destroyed |
| Scope of attack |
less limited |
more limited |
15. End of page