object
CleanStructuralRules
Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: Any): Boolean
-
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
final
def
eq(arg0: AnyRef): Boolean
-
def
equals(arg0: Any): Boolean
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
final
def
ne(arg0: AnyRef): Boolean
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
Removes the redundant weakenings and contractions. Traverses the proof top down, keeping track of the weakened formulas in ws. When processing each rule, checks whether the auxiliary formulas are in ws. If all were previously weakened, remove them from ws and adds the main formula.
I am aware the code is really really hard to read. I am sorry for that. In order to get it properly optimized, I had to use continuation-passing-style and the TailCall library from scala. This makes it particularly exotic. If you are going through the trouble of reading it (so brave of you ;), it's good to keep the following in mind: 1. Ignore tailcalls and everything associated with it 2. Treat the continuation call not as a function call but as if its arguments were the return value of the function.
The answer to the optimization was found here: http://stackoverflow.com/questions/20164061/how-to-acheive-tail-call-optimization-while-traversing-tree-like-structure-using