scala/ex.scala
changeset 222 d682591c63e1
parent 221 18905d086cbb
child 225 0974c59e7029
--- a/scala/ex.scala	Sun Mar 10 07:10:50 2013 +0000
+++ b/scala/ex.scala	Tue Mar 12 15:03:23 2013 +0000
@@ -5,6 +5,8 @@
 import comp1._
 import comp2._
 
+print(compile_rec(S)._1.print)
+
 // Turing machine examples
 val TMCopy = TM((WBk, 5), (R, 2), (R, 3), (R, 2), (WOc, 3), 
                 (L, 4), (L, 4), (L, 5), (R, 11), (R, 6), 
@@ -94,7 +96,7 @@
   val res = (abc_f.run(abc_map))(arity)
   val end = System.nanoTime()
   val time = (end - start)/1.0e9
-  ("Result: " + res + "  length: " + abc_f.p.length + " time: " + "%.5f".format(time))
+  ("Result: " + res + "  length: " + abc_f.p.length + " time: " + "%.5f".format(time) + "\n Prog:" + abc_f)
 }
 
 println("S(3)          " + test_comp2(S, 3))