Chengsong [Sat, 16 Mar 2019 20:05:13 +0000] rev 7
found the difference: caused by flats
in ders_simp, the alts is at top most level , so no fuse and bits stay at the alts level
whereas in ders + singele simp, the alts that should be the final top-level alts is not at the topmost level initially before simplification
so it is opened up and bits fused. later it finds out itself the top level only aalts remaining, but the fuse is not reversible
we do not know what happened either.
Chengsong [Sat, 16 Mar 2019 15:00:43 +0000] rev 6
random test failed
on the new simplification function. ("super_blexing_simp")
Chengsong [Sat, 16 Mar 2019 14:14:42 +0000] rev 5
correctness test with enumeration
Chengsong [Fri, 15 Mar 2019 12:27:12 +0000] rev 4
:test whether bsimp(bders(r, s)) == ders_simp(r,s)
This does not hold. As illustrated by the output of the example where string is abaa and regex is (a* + ab)*
this property still holds when s = aba
but after the derivative of the last character a, the result is negative.
However this seems easily fixable as the difference is relatively small, it might be possible to find where the difference happens
and by taking that difference into accound we have some function f s.t.
f(bsimp(r,s)) = ders_simp(r,s)
and mkeps(f(r)) = mkeps(r)
This will complete the correctness proof.
Even if finding such f is hard, it would still provide insights for the real difference between simp(der(simp(der(simp(der...... and simp(ders
Chengsong [Fri, 15 Mar 2019 10:46:46 +0000] rev 3
removing PRED
why should it still be there after so many rounds of experiments? It should have been removed long ago
since its existence will always make the compiler report errors.
mysterious.:
Chengsong [Wed, 13 Mar 2019 15:27:09 +0000] rev 2
more comments
Chengsong [Wed, 13 Mar 2019 13:33:54 +0000] rev 1
i
Chengsong [Wed, 13 Mar 2019 13:14:38 +0000] rev 0
run
scalac lex_blex_Frankensteined.scala BRexp.scala Element.scala Partial.scala Spiral.scala
then run
scala Spiral
to see the results