updated
authorChristian Urban <urbanc@in.tum.de>
Tue, 18 Dec 2018 23:31:45 +0000
changeset 250 1b08b8ac13fd
parent 249 1997cfcd6334
child 251 3dd550b9b0e3
updated
marking3/knight1_test.sh
testing1/drumb_test2.sh
testing4/postfix_test.sh
testing5/bfc.scala
--- a/marking3/knight1_test.sh	Sun Dec 16 21:43:14 2018 +0000
+++ b/marking3/knight1_test.sh	Tue Dec 18 23:31:45 2018 +0000
@@ -22,21 +22,21 @@
 # compilation tests (used to be 30 secs)
 
 function scala_compile {
-  (ulimit -t 30; JAVA_OPTS="-Xmx1g" scala "$1" 2> /dev/null 1> /dev/null) 
+  (ulimit -t 30; JAVA_OPTS="-Xmx1g" scala -nc "$1" 2> /dev/null 1> /dev/null) 
 }
 
 # functional tests
 
 function scala_assert {
-  (ulimit -t 30; JAVA_OPTS="-Xmx1g" scala -nc -i "$1" "$2" -e "" 2> /dev/null 1> /dev/null)
+  (ulimit -t 30; JAVA_OPTS="-Xmx1g" scala -nc -i "$1" "$2" -e "") #2> /dev/null 1> /dev/null)
 }
 
 function scala_assert_long {
-  (ulimit -t 60; JAVA_OPTS="-Xmx1g" scala -nc -i "$1" "$2" -e "" 2> /dev/null 1> /dev/null)
+  (ulimit -t 60; JAVA_OPTS="-Xmx1g" scala -nc -i "$1" "$2" -e "") #2> /dev/null 1> /dev/null)
 }
 
 function scala_assert_elong {
-  (ulimit -t 90; JAVA_OPTS="-Xmx1g" scala -nc -i "$1" "$2" -e "" 2> /dev/null 1> /dev/null)
+  (ulimit -t 90; JAVA_OPTS="-Xmx1g" scala -nc -i "$1" "$2" -e "") #2> /dev/null 1> /dev/null)
 }
 
 
--- a/testing1/drumb_test2.sh	Sun Dec 16 21:43:14 2018 +0000
+++ b/testing1/drumb_test2.sh	Tue Dec 18 23:31:45 2018 +0000
@@ -84,8 +84,8 @@
 if [ $tsts -eq 0 ]
 then
   echo -e "  val ds = get_deltas(get_prices(List(\"GOOG\", \"AAPL\"), 2010 to 2012))" >> $out
-  echo -e "  yearly_yield(get_deltas(de, 100, 0) == 125" >> $out
-  echo -e "  yearly_yield(get_deltas(de, 100, 1) == 117" >> $out
+  echo -e "  yearly_yield(get_deltas(ds, 100, 0) == 125" >> $out
+  echo -e "  yearly_yield(get_deltas(ds, 100, 1) == 117" >> $out
   
   if (scala_assert "drumb.scala" "drumb_test6.scala") 
   then
--- a/testing4/postfix_test.sh	Sun Dec 16 21:43:14 2018 +0000
+++ b/testing4/postfix_test.sh	Tue Dec 18 23:31:45 2018 +0000
@@ -65,10 +65,10 @@
 
 if [ $tsts1 -eq 0 ]
 then
-  echo -e " syard(split(\"3 + 4 * ( 2 - 1 )\")) == List(\"3\", \"4\", \"2\", \"1\", \"-\", \"*\", \"+\")" >> $out
+  echo -e " syard(split(\"3 + 4 * ( 2 - 1 )\")) == List(\"3\", \"4\", \"2\", \"1\", \"-\", \"\*\", \"+\")" >> $out
   echo -e " syard(split(\"( ( ( 3 ) ) + ( ( 4 + ( 5 ) ) ) )\")) == List(\"3\", \"4\", \"5\", \"+\", \"+\")" >> $out
   echo -e " syard(split(\"5 + 7 / 2\")) == List(\"5\", \"7\", \"2\", \"/\", \"+\")" >> $out
-  echo -e " syard(split(\"5 * 7 / 2\")) == List(\"5\", \"7\", \"*\", \"2\", \"/\")" >> $out
+  echo -e " syard(split(\"5 * 7 / 2\")) == List(\"5\", \"7\", \"\*\", \"2\", \"/\")" >> $out
   
   if (scala_assert "postfix.scala" "postfix_test7.scala")
   then
@@ -136,12 +136,12 @@
 
 if [ $tsts1 -eq 0 ]
 then
-  echo -e " syard(split(\"3 + 4 * ( 2 - 1 )\")) == List(\"3\", \"4\", \"2\", \"1\", \"-\", \"*\", \"+\")" >> $out
+  echo -e " syard(split(\"3 + 4 * ( 2 - 1 )\")) == List(\"3\", \"4\", \"2\", \"1\", \"-\", \"\*\", \"+\")" >> $out
   echo -e " syard(split(\"( ( ( 3 ) ) + ( ( 4 + ( 5 ) ) ) )\")) == List(\"3\", \"4\", \"5\", \"+\", \"+\")" >> $out
   echo -e " syard(split(\"5 + 7 / 2\")) == List(\"5\", \"7\", \"2\", \"/\", \"+\")" >> $out
-  echo -e " syard(split(\"5 * 7 / 2\")) == List(\"5\", \"7\", \"*\", \"2\", \"/\")" >> $out
+  echo -e " syard(split(\"5 * 7 / 2\")) == List(\"5\", \"7\", \"\*\", \"2\", \"/\")" >> $out
   echo -e " syard(split(\"3 + 4 * 8 / ( 5 - 1 ) ^ 2 ^ 3\")) == " >> $out
-  echo -e "         List(\"3\", \"4\", \"8\", \"*\", \"5\", \"1\", \"-\", \"2\", \"3\", \"^\", \"^\", \"/\", \"+\")" >> $out
+  echo -e "         List(\"3\", \"4\", \"8\", \"\*\", \"5\", \"1\", \"-\", \"2\", \"3\", \"^\", \"^\", \"/\", \"+\")" >> $out
   echo -e " " >> $out 
   echo -e " compute(syard(split(\"3 + 4 * ( 2 - 1 )\"))) == 7" >> $out
   echo -e " compute(syard(split(\"10 + 12 * 33\"))) == 406" >> $out
--- a/testing5/bfc.scala	Sun Dec 16 21:43:14 2018 +0000
+++ b/testing5/bfc.scala	Tue Dec 18 23:31:45 2018 +0000
@@ -212,6 +212,7 @@
 // testcases
 
 //optimise(load_bff("benchmark.bf"))          // should have inserted 0's
+//optimise(load_bff("benchmark.bf")).length   // => 181  
 //optimise(load_bff("mandelbrot.bf")).length  // => 11203
  
 //time_needed(1, run3(load_bff("benchmark.bf")))
@@ -297,6 +298,8 @@
 
 // testcases
 //combine(optimise(load_bff("benchmark.bf"))) // => """>A+B[<A+M>A-A]<A[[....."""
+//combine(optimise(load_bff("benchmark.bf"))).length // => 134
+//combine(optimise(load_bff("mandelbrot.bf"))).length // => 6509
 
 //time_needed(1, run4(load_bff("benchmark.bf")))