@@ -4,6 +4,7 @@ License : NCSA
4
4
-}
5
5
module Kore.Strategies.Goal
6
6
( Goal (.. )
7
+ , Prim
7
8
, FromRulePattern (.. )
8
9
, ClaimExtractor (.. )
9
10
, TransitionRuleTemplate (.. )
@@ -201,9 +202,9 @@ proven
201
202
-> Bool
202
203
proven = Foldable. null . unprovenNodes
203
204
204
- class Goal goal where
205
- type Prim goal
205
+ type Prim goal = ProofState. Prim (Rule goal )
206
206
207
+ class Goal goal where
207
208
goalToRule :: goal -> Rule goal
208
209
default goalToRule
209
210
:: Coercible goal (Rule goal )
@@ -278,8 +279,6 @@ Things to note when implementing your own:
278
279
-}
279
280
280
281
instance Goal OnePathRule where
281
- type Prim OnePathRule = ProofState. Prim (Rule OnePathRule )
282
-
283
282
goalToRule =
284
283
OnePathRewriteRule
285
284
. mkRewritingRule
@@ -337,8 +336,6 @@ instance ClaimExtractor OnePathRule where
337
336
_ -> Nothing
338
337
339
338
instance Goal AllPathRule where
340
- type Prim AllPathRule = ProofState. Prim (Rule AllPathRule )
341
-
342
339
goalToRule =
343
340
AllPathRewriteRule
344
341
. mkRewritingRule
@@ -396,8 +393,6 @@ instance ClaimExtractor AllPathRule where
396
393
_ -> Nothing
397
394
398
395
instance Goal ReachabilityRule where
399
- type Prim ReachabilityRule = ProofState. Prim (Rule ReachabilityRule )
400
-
401
396
goalToRule (OnePath rule) =
402
397
ReachabilityRewriteRule
403
398
$ mkRewritingRule
@@ -592,7 +587,6 @@ logTransitionRule rule prim proofState =
592
587
transitionRuleTemplate
593
588
:: forall m goal
594
589
. MonadSimplify m
595
- => Prim goal ~ ProofState. Prim (Rule goal )
596
590
=> TransitionRuleTemplate m goal
597
591
-> TransitionRule m goal
598
592
transitionRuleTemplate
@@ -676,10 +670,7 @@ transitionRuleTemplate
676
670
677
671
transitionRuleWorker _ state = return state
678
672
679
- onePathFirstStep
680
- :: Prim goal ~ ProofState. Prim (Rule goal )
681
- => [Rule goal ]
682
- -> Strategy (Prim goal )
673
+ onePathFirstStep :: [Rule goal ] -> Strategy (Prim goal )
683
674
onePathFirstStep axioms =
684
675
(Strategy. sequence . map Strategy. apply)
685
676
[ CheckProven
@@ -696,11 +687,7 @@ onePathFirstStep axioms =
696
687
, TriviallyValid
697
688
]
698
689
699
- onePathFollowupStep
700
- :: Prim goal ~ ProofState. Prim (Rule goal )
701
- => [Rule goal ]
702
- -> [Rule goal ]
703
- -> Strategy (Prim goal )
690
+ onePathFollowupStep :: [Rule goal ] -> [Rule goal ] -> Strategy (Prim goal )
704
691
onePathFollowupStep claims axioms =
705
692
(Strategy. sequence . map Strategy. apply)
706
693
[ CheckProven
@@ -1026,7 +1013,6 @@ debugProofStateBracket
1026
1013
. MonadLog monad
1027
1014
=> ToReachabilityRule goal
1028
1015
=> Coercible (Rule goal ) (RewriteRule RewritingVariableName )
1029
- => Prim goal ~ ProofState. Prim (Rule goal )
1030
1016
=> ProofState goal
1031
1017
-- ^ current proof state
1032
1018
-> Prim goal
@@ -1053,7 +1039,6 @@ debugProofStateFinal
1053
1039
=> MonadLog monad
1054
1040
=> ToReachabilityRule goal
1055
1041
=> Coercible (Rule goal ) (RewriteRule RewritingVariableName )
1056
- => Prim goal ~ ProofState. Prim (Rule goal )
1057
1042
=> ProofState goal
1058
1043
-- ^ current proof state
1059
1044
-> Prim goal
@@ -1075,7 +1060,6 @@ withDebugProofState
1075
1060
. MonadLog monad
1076
1061
=> ToReachabilityRule goal
1077
1062
=> Coercible (Rule goal ) (RewriteRule RewritingVariableName )
1078
- => Prim goal ~ ProofState. Prim (Rule goal )
1079
1063
=> TransitionRule monad goal
1080
1064
-> TransitionRule monad goal
1081
1065
withDebugProofState transitionFunc =
0 commit comments