Consider the simple system
x#1 <=> IntegerType y#1 <=> x#1
Solving this system proceeds as follows:
x#1
and IntegerType
; the substitution x#1 => IntegerType
is
added to the solution set.Soln:
x#1 => IntegerType
Cons:
y#1 <=> IntegerType
What if a constraint is encountered that can't be solved? For example:
y#1 <=> x#1 x#1 <=> IntegerType
This case shows the need to apply the new solution to the existing solution set at each step. That is,
x#1
and y#1
. Apply the new solution to both the constraint set and
the solution set, so:
Soln:
y#1 => x#1
Cons:
x#1 <=> IntegerType
x#1
and IntegerType
. Apply the new solution to both the contraint
set and the solution set, so:
Soln:
y#1 => IntegerType
x#1 => IntegerType
Consider this simple example:
y#1 <=> UnresolvedCall(length, x = x#1)
The length
function always returns an integer, so the type of x#1
is not
even needed. Resolution should produce this solution:
y#1 => IntegerType
x = 3i y = 4 + x
The constraint set is:
x#1 <=> ComplexType y#1 <=> UnresolvedCall(+, RealType, x#1)
The solution set is:
x#1 => ComplexType y#1 => ComplexType
What should happen if one of the constraints has an as yet unknown type? And how can this happen in examples?
# Assume x is a parameter. y = 4 + x
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.