Constraint incorporation

In a constraint system a new bound is incorporated:
all new constrains that can be derived from it
(and from existing ones) are added
This commit is contained in:
Svetlana Isakova
2015-06-27 13:49:11 +03:00
parent 82acce4767
commit 9a5abf368f
30 changed files with 531 additions and 225 deletions
@@ -6,10 +6,10 @@ fun main(args:Array<String>) {
val startTimeNanos = System.nanoTime()
// the problem sits on the next line:
val pi = 4.0.toDouble() * delta <!OVERLOAD_RESOLUTION_AMBIGUITY!>*<!> (1..n).reduce(
val pi = 4.0.toDouble() * delta <!OVERLOAD_RESOLUTION_AMBIGUITY!>*<!> (1..n).<!TYPE_INFERENCE_CONFLICTING_SUBSTITUTIONS!>reduce<!>(
{t, i ->
val x = (i - 0.5) * delta
<!TYPE_MISMATCH!>t + 1.0 / (1.0 + x * x)<!>
t + 1.0 / (1.0 + x * x)
})
// !!! pi has error type here