module Topdown where import Test.QuickCheck import Generics.Regular.Rewriting import Base topdownTests = [ topdownMTopLevelTest , topdownMTest , topdownTopLevelTest1, topdownTopLevelTest2 , topdownTest1 ] topdownMTopLevelTest = label "topdownMTopLevel" $ topdownM (applyRuleM notTRule) (Not T) == Just F topdownMTest = label "topdownM" $ topdownM (applyRuleM notTRule) (Not T :&&: Not T) == Nothing topdownTopLevelTest1 = label "topdownTopLevel" $ topdown (applyRule notTRule) (Not T) == F topdownTopLevelTest2 = label "topdownTopLevel" $ topdown (applyRule notTRule) (Not F) == Not F topdownTest1 = label "topdown" $ topdown (applyRule orFRule) ((T :||: F) :||: F) == T :||: F