--- a/scala/ex.scala Wed Apr 24 09:49:00 2013 +0100
+++ b/scala/ex.scala Thu Apr 25 21:37:05 2013 +0100
@@ -6,12 +6,12 @@
import comp2._
val Lg = {
- val lgR = Le o (Power o (Id(3, 1), Id(3, 2)), Id(3, 0))
- val conR1 = Conj o (Less o (Const(1) o (Id(2, 0), Id(2, 0))),
+ val lgR = Le o (Power o (Id(3, 1), Id(3, 2)), Id(3, 0))
+ val conR1 = Conj o (Less o (Const(1) o (Id(2, 0), Id(2, 0))),
Less o (Const(1) o (Id(2, 0), Id(2, 1))))
- val conR2 = Not o (conR1)
- Add o (recs.Mult o (conR1, Maxr(lgR) o (Id(2, 0), Id(2, 1), Id(2, 0))),
- recs.Mult o (conR2, Const(0) o (Id(2, 0))))
+ val conR2 = Not o (conR1)
+ Add o (recs.Mult o (conR1, Maxr(lgR) o (Id(2, 0), Id(2, 1), Id(2, 0))),
+ recs.Mult o (conR2, Const(0) o (Id(2, 0))))
}
@@ -103,10 +103,8 @@
println("(<=5) 6: " + (Less o (Id(1, 0), Const(5))).eval(6))
println("Max (<=9): " + Maxr(Le o (Id(1, 0), Const(9))).eval(10))
println("Max (>=9): " + Maxr(Le o (Const(9), Id(1, 0))).eval(8))
-println("Min (>=9): " + Minr(Le o (Const(9), Id(1, 0))).eval(10))
-println("Min (<=9): " + Minr(Le o (Id(1, 0), Const(9))).eval(10))
-println("Min (>=9): " + Minr(Le o (Const(9), Id(1, 0))).eval(8))
-//println("Lg 4 2: " + Lg.eval(4, 2))
+println("test")
+println("Lg 4 2: " + Lg.eval(4, 2))
// compilation of rec to abacus tests
def test_comp2(f: Rec, ns: Int*) = {