@@ -213,6 +213,18 @@ class Goal goal where
213
213
=> goal
214
214
-> Strategy. TransitionT (Rule goal ) m goal
215
215
216
+ {- TODO (thomas.tuegel): applyClaims and applyAxioms should return:
217
+
218
+ > data ApplyResult goal
219
+ > = ApplyRewritten !goal
220
+ > | ApplyRemainder !goal
221
+
222
+ Rationale: ProofState is part of the implementation of transitionRule, that
223
+ is: these functions have hidden knowledge of how transitionRule works
224
+ because they tell it what to do next. Instead, they should report their
225
+ result and leave the decision up to transitionRule.
226
+
227
+ -}
216
228
applyClaims
217
229
:: MonadSimplify m
218
230
=> [goal ]
@@ -225,18 +237,6 @@ class Goal goal where
225
237
-> goal
226
238
-> Strategy. TransitionT (Rule goal ) m (ProofState goal )
227
239
228
- deriveSeq
229
- :: MonadSimplify m
230
- => [Rule goal ]
231
- -> goal
232
- -> Strategy. TransitionT (Rule goal ) m (ProofState goal )
233
-
234
- derivePar
235
- :: MonadSimplify m
236
- => [Rule goal ]
237
- -> goal
238
- -> Strategy. TransitionT (Rule goal ) m (ProofState goal )
239
-
240
240
type AxiomAttributes = Attribute.Axiom. Axiom Symbol VariableName
241
241
242
242
class ClaimExtractor claim where
@@ -307,25 +307,10 @@ instance Goal OnePathRule where
307
307
308
308
applyAxioms axioms = deriveSeqOnePath (concat axioms)
309
309
310
- deriveSeq = deriveSeqOnePath
311
-
312
- derivePar = deriveParOnePath
313
-
314
310
isTriviallyValid = isTriviallyValid' _Unwrapped
315
311
316
312
strategy _ _ _ = onePathFirstStep :> Stream. iterate id onePathFollowupStep
317
313
318
- deriveParOnePath
319
- :: MonadSimplify simplifier
320
- => [Rule OnePathRule ]
321
- -> OnePathRule
322
- -> Strategy. TransitionT (Rule OnePathRule ) simplifier
323
- (ProofState OnePathRule )
324
- deriveParOnePath rules =
325
- derivePar' _Unwrapped OnePathRewriteRule rewrites
326
- where
327
- rewrites = unRuleOnePath <$> rules
328
-
329
314
deriveSeqOnePath
330
315
:: MonadSimplify simplifier
331
316
=> [Rule OnePathRule ]
@@ -379,9 +364,6 @@ instance Goal AllPathRule where
379
364
| all isTriviallyValid proofState = pure Proven
380
365
| otherwise = pure proofState
381
366
382
- derivePar = deriveParAllPath
383
- deriveSeq = deriveSeqAllPath
384
-
385
367
strategy _ _ _ = allPathFirstStep :> Stream. iterate id allPathFollowupStep
386
368
387
369
deriveParAllPath
@@ -433,16 +415,6 @@ instance Goal ReachabilityRule where
433
415
isTriviallyValid (AllPath goal) = isTriviallyValid goal
434
416
isTriviallyValid (OnePath goal) = isTriviallyValid goal
435
417
436
- derivePar rules (AllPath goal) =
437
- allPathTransition $ fmap AllPath <$> derivePar (map coerce rules) goal
438
- derivePar rules (OnePath goal) =
439
- onePathTransition $ fmap OnePath <$> derivePar (map coerce rules) goal
440
-
441
- deriveSeq rules (AllPath goal) =
442
- allPathTransition $ fmap AllPath <$> deriveSeq (map coerce rules) goal
443
- deriveSeq rules (OnePath goal) =
444
- onePathTransition $ fmap OnePath <$> deriveSeq (map coerce rules) goal
445
-
446
418
applyClaims claims (AllPath goal) =
447
419
applyClaims (mapMaybe maybeAllPath claims) goal
448
420
& fmap (fmap AllPath )
0 commit comments