Spiral.scala
changeset 72 83b021fc7d29
parent 17 3241b1e71633
child 75 24d9d64c2a95
equal deleted inserted replaced
71:0573615e41a3 72:83b021fc7d29
   557     val bs3 = retrieve(a_v._1, a_v._2)//decode(erase(as), bs1) does not work
   557     val bs3 = retrieve(a_v._1, a_v._2)//decode(erase(as), bs1) does not work
   558     //println(decode(erase(as), bs1))
   558     //println(decode(erase(as), bs1))
   559     println(s"bs1=${bs1}, bs3=${bs3}")
   559     println(s"bs1=${bs1}, bs3=${bs3}")
   560     //println(decode(erase(a_v._1), bs3))
   560     //println(decode(erase(a_v._1), bs3))
   561   }
   561   }
       
   562   def christian_def2(){
       
   563     val a = AALTS(List(Z), List(AZERO, ASEQ(List(), AALTS(List(),List(AONE(List()), ACHAR(Nil, 'b'))), ACHAR(Nil, 'b'))  )   )
       
   564     val unsimp = bsimp(bder('b',a))
       
   565     val simped = bsimp(bder('b', bsimp(a)))
       
   566     println(bsimp(a))
       
   567     if(unsimp == simped){
       
   568       println(s"bsimp(bder c r) = ${unsimp}, whereas bsimp(bder c bsimp r) = ${simped}")
       
   569     }
       
   570   }
   562   def essence_posix(){
   571   def essence_posix(){
   563     //val s = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"//rd_string_gen(alphabet_size, 3)//"abaa"//rd_string_gen(alphabet_size, 3)
   572     //val s = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"//rd_string_gen(alphabet_size, 3)//"abaa"//rd_string_gen(alphabet_size, 3)
   564     val s0 = "a"
   573     val s0 = "a"
   565     val r = SEQ(STAR(ALT("a", "aa")), "b")//internalise(random_struct_gen(4))//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")))) //random_struct_gen(7)
   574     val r = SEQ(STAR(ALT("a", "aa")), "b")//internalise(random_struct_gen(4))//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")))) //random_struct_gen(7)
   566     for(i <- 1 to 40){
   575     for(i <- 1 to 40){
   575     //check_all()   
   584     //check_all()   
   576     //radical_correctness()
   585     //radical_correctness()
   577     //correctness_proof_convenient_path()
   586     //correctness_proof_convenient_path()
   578     //retrieve_experience()
   587     //retrieve_experience()
   579     //neat_retrieve()
   588     //neat_retrieve()
   580     test_bsimp2()
   589     //test_bsimp2()
       
   590     christian_def2()
   581     //christian_def()
   591     //christian_def()
   582     //essence_posix()
   592     //essence_posix()
   583   } 
   593   } 
   584 }
   594 }
   585 
   595