Spiral.scala
changeset 12 768b833d6230
parent 11 9c1ca6d6e190
child 13 4868c26268aa
equal deleted inserted replaced
11:9c1ca6d6e190 12:768b833d6230
   466   }
   466   }
   467   def retrieve_experience(){
   467   def retrieve_experience(){
   468     val rg = ASTAR(List(),AALTS(List(),List(ASTAR(List(Z),ACHAR(List(),'a')), ASEQ(List(S),ACHAR(List(),'a'),ACHAR(List(),'b')))))//internalise(balanced_struct_gen(3))//SEQ(ALTS(List(STAR("a"),ALTS(List("a","c")))),SEQ(ALTS(List("c","a")),ALTS(List("c","b")))) 
   468     val rg = ASTAR(List(),AALTS(List(),List(ASTAR(List(Z),ACHAR(List(),'a')), ASEQ(List(S),ACHAR(List(),'a'),ACHAR(List(),'b')))))//internalise(balanced_struct_gen(3))//SEQ(ALTS(List(STAR("a"),ALTS(List("a","c")))),SEQ(ALTS(List("c","a")),ALTS(List("c","b")))) 
   469     val st = "abaab"
   469     val st = "abaab"
   470     val vl = blexing_simp(erase(rg), st)
   470     val vl = blexing_simp(erase(rg), st)
       
   471     //println(vl)
   471     val bts = retrieve(rg, vl)
   472     val bts = retrieve(rg, vl)
   472     val cdbts = code(vl)
   473     val cdbts = code(vl)
   473     if(bts != cdbts){//test of equality code v = retrieve internalise(r) v if |- v : r
   474     if(bts == cdbts){//test of equality code v = retrieve internalise(r) v if |- v : r
   474       println(bts)
   475       println(bts)
   475       println(cdbts)
   476       println(cdbts)
   476       println("NOoooooo.....!")
   477       println("code v = retrieve internalise(r) v if |- v : r")
   477     }
   478     }
   478   }
   479   }
   479   def radical_correctness(){
   480   def radical_correctness(){
   480     enum(3, "abc").map(tests_blexer_simp(strs(3, "abc"))).toSet
   481     enum(3, "abc").map(tests_blexer_simp(strs(3, "abc"))).toSet
   481     random_pool(1, 5).map(tests_blexer_simp(strs(5, "abc"))).toSet
   482     random_pool(1, 5).map(tests_blexer_simp(strs(5, "abc"))).toSet