module Bottomup where import Test.QuickCheck import Generics.Regular.Rewriting import Base bottomupTests = [ bottomupMTopLevelTest , bottomupMTest , bottomupTopLevelTest1, bottomupTopLevelTest2 , bottomupTest1 ] bottomupMTopLevelTest = label "bottomupMTopLevel" $ bottomupM (applyRuleM notTRule) (Not T) == Nothing bottomupMTest = label "bottomupM" $ bottomupM (applyRuleM notTRule) (Not T :&&: Not T) == Nothing bottomupTopLevelTest1 = label "bottomupTopLevel" $ bottomup (applyRule notTRule) (Not T) == F bottomupTopLevelTest2 = label "bottomupTopLevel" $ bottomup (applyRule notTRule) (Not F) == Not F bottomupTest1 = label "bottomup" $ bottomup (applyRule orFRule) ((T :||: F) :||: F) == T