Skip to content

Refactor reachability proof strategies #1932

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 23 commits into from
Jul 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
46db90a
Rename "remove destination" to "check implication"
ttuegel Jun 28, 2020
a390ba7
Remove ProofState type family
ttuegel Jun 28, 2020
cfe274a
Remove Prim type family
ttuegel Jun 28, 2020
454bc12
checkImplication: Return CheckImplicationResult
ttuegel Jun 28, 2020
2abc638
Move TransitionRuleTemplate into Goal class
ttuegel Jun 29, 2020
58c7a4c
Move logTransitionRule to Kore.Strategies.Verification
ttuegel Jun 29, 2020
f09c2bd
Move withDebugProofState to Kore.Strategies.Verification
ttuegel Jun 29, 2020
393119c
Extract transitionRule
ttuegel Jun 29, 2020
af82c20
Move withConfiguration to Kore.Strategies.Verification
ttuegel Jun 29, 2020
7fd8a6e
Goal: Remove MonadCatch constraints
ttuegel Jun 29, 2020
b7ccd47
Add applyClaims
ttuegel Jun 29, 2020
c027d0e
Add instance Foldable ProofState
ttuegel Jun 29, 2020
34db960
Add applyAxioms
ttuegel Jun 29, 2020
727314c
Remove redundant steps from one-path strategy
ttuegel Jun 29, 2020
9ff0685
Test.Kore.Strategies.AllPath.AllPath: Use ApplyAxioms and ApplyClaims
ttuegel Jun 29, 2020
dcb29f9
Remove DerivePar and DeriveSeq
ttuegel Jun 29, 2020
215a34c
TODO: ApplyResult
ttuegel Jun 29, 2020
d63d128
Extract strategy from class Goal
ttuegel Jul 2, 2020
7e7bafa
Merge branch 'master' into issue-1665--refactor
ttuegel Jul 2, 2020
811cbb8
Remove stray comment
ttuegel Jul 6, 2020
750099f
Merge branch 'master' into issue-1665--refactor
ttuegel Jul 6, 2020
4404f8e
withConfiguration: Use extractUnproven
ttuegel Jul 6, 2020
0ff0ac8
rm test/imp/sum-breadth-limit-three-spec.k
ttuegel Jul 7, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions kore/src/Kore/Log/DebugProofState.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ module Kore.Log.DebugProofState

import Prelude.Kore

import Kore.Rewriting.RewritingVariable
import Kore.Step.RulePattern
( ReachabilityRule (..)
, RewriteRule (..)
)
import Kore.Strategies.ProofState
( Prim (..)
Expand All @@ -27,7 +25,7 @@ import qualified Pretty
data DebugProofState =
DebugProofState
{ proofState :: ProofState ReachabilityRule
, transition :: Prim (RewriteRule RewritingVariableName)
, transition :: Prim
, result :: Maybe (ProofState ReachabilityRule)
}
deriving (Show)
Expand All @@ -44,14 +42,10 @@ instance Pretty DebugProofState where
[ "Reached proof state with the following configuration:"
, Pretty.indent 4 (pretty proofState)
, "On which the following transition applies:"
, Pretty.indent 4 (prettyTransition transition)
, Pretty.indent 4 (pretty transition)
, "Resulting in:"
, Pretty.indent 4 (maybe "Terminal state." pretty result)
]
where
prettyTransition (DeriveSeq _) = "Transition DeriveSeq."
prettyTransition (DerivePar _) = "Transition DerivePar."
prettyTransition prim = Pretty.pretty prim

instance Entry DebugProofState where
entrySeverity _ = Debug
Expand Down
14 changes: 7 additions & 7 deletions kore/src/Kore/Log/InfoReachability.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ License : NCSA
module Kore.Log.InfoReachability
( InfoReachability (..)
, whileSimplify
, whileRemoveDestination
, whileCheckImplication
, whileDeriveSeq
, whileDerivePar
) where
Expand All @@ -19,7 +19,7 @@ import qualified Pretty

data InfoReachability
= InfoSimplify !ReachabilityRule
| InfoRemoveDestination !ReachabilityRule
| InfoCheckImplication !ReachabilityRule
| InfoDeriveSeq ![Rule ReachabilityRule] !ReachabilityRule
| InfoDerivePar ![Rule ReachabilityRule] !ReachabilityRule
deriving (Show)
Expand Down Expand Up @@ -55,8 +55,8 @@ prettyInfoReachabilityGoalAndRules transition goal rules fromRule =
instance Pretty.Pretty InfoReachability where
pretty (InfoSimplify goal) =
prettyInfoReachabilityGoal "Simplify" goal
pretty (InfoRemoveDestination goal) =
prettyInfoReachabilityGoal "RemoveDestination" goal
pretty (InfoCheckImplication goal) =
prettyInfoReachabilityGoal "CheckImplication" goal
pretty (InfoDeriveSeq rules goal) =
prettyInfoReachabilityGoalAndRules
"DeriveSeq"
Expand All @@ -74,7 +74,7 @@ instance Entry InfoReachability where
entrySeverity _ = Info
shortDoc (InfoSimplify _) =
Just "While simplifying the configuration"
shortDoc (InfoRemoveDestination _) =
shortDoc (InfoCheckImplication _) =
Just "While checking implication of the proof goal"
shortDoc (InfoDeriveSeq _ _) =
Just "While applying axioms in sequence"
Expand All @@ -89,12 +89,12 @@ whileSimplify
-> log a
whileSimplify goal = logWhile (InfoSimplify goal)

whileRemoveDestination
whileCheckImplication
:: MonadLog log
=> ReachabilityRule
-> log a
-> log a
whileRemoveDestination goal = logWhile (InfoRemoveDestination goal)
whileCheckImplication goal = logWhile (InfoCheckImplication goal)

whileDeriveSeq
:: MonadLog log
Expand Down
Loading