Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
3212e0d
hie-bios.sh: Do not override GHC_PACKAGE_PATH, if set
ttuegel Apr 25, 2020
a3533be
ghcid.sh
ttuegel Apr 25, 2020
c420e3b
shell.nix: exactDeps = true
ttuegel Apr 26, 2020
7a923f7
nix: ghc-tags-plugin
ttuegel Apr 26, 2020
27fa3f6
Kore.Exec: Remove ToRulePattern
ttuegel Apr 28, 2020
95c87c6
Kore.HasPriority
ttuegel Apr 27, 2020
7d738c2
Kore.Step: Remove ToRulePattern
ttuegel Apr 28, 2020
91474c1
HasAttributes
ttuegel Apr 28, 2020
60ec5d6
Kore.Repl: Remove type parameters
ttuegel Apr 28, 2020
abf4055
Kore.Repl: Remove ReplState type parameter
ttuegel Apr 28, 2020
680c896
Kore.Repl: Remove Config type parameter
ttuegel Apr 28, 2020
4de90e1
instance From _ SourceLocation
ttuegel Apr 28, 2020
c35e448
instance From _ Label, instance From _ RuleIndex
ttuegel Apr 28, 2020
7de02cc
ReachabilityRule: Remove type parameter
ttuegel Apr 28, 2020
a3601ba
OnePathRule: Remove type parameter
ttuegel Apr 28, 2020
24be08a
AllPathRule: Remove type parameter
ttuegel Apr 28, 2020
e98caf8
Kore.Strategies.Goal: Formatting
ttuegel Apr 28, 2020
d34fdfc
Kore.Strategies.Goal.ProofState: Require fewer type parameters
ttuegel Apr 28, 2020
a5ea50d
Generalize signature of getPriorityOfAxiom
ttuegel Apr 29, 2020
271dc8a
Kore.Strategies.Goal.removeDestination: Specify signature
ttuegel Apr 29, 2020
33f7dbe
Kore.Strategies.Goal.removeDestination: Remove ToRulePattern
ttuegel Apr 29, 2020
979bcd2
Merge branch 'master' into refactor--remove-ToRulePattern-2
ttuegel Apr 30, 2020
94d09d0
leftPattern: Obey Lens laws
ttuegel Apr 30, 2020
9d1101d
Kore.Step.RulePattern: Initialize predicate sorts correctly
ttuegel Apr 30, 2020
6658e78
Test.Kore.Strategies.OnePath.Step: Initialize rule sorts correctly
ttuegel Apr 30, 2020
f2d9878
Kore.Strategies.Goal: Preserve proof goal sorts
ttuegel Apr 30, 2020
a628c7b
Test.Kore.Step.Rule.Simplify: Preserve sorts
ttuegel Apr 30, 2020
dd1cb41
simplifyClaimRule: Apply simplification substitution
ttuegel Apr 30, 2020
162af9f
instance From (Conditional _ _) (Predicate _): Preserve predicate sort
ttuegel Apr 30, 2020
122d411
Merge branch 'bug--leftPattern' into refactor--remove-ToRulePattern-2
ttuegel Apr 30, 2020
014ba52
removeDestination: Remove nested if statements
ttuegel Apr 30, 2020
7037073
Merge branch 'master' into refactor--remove-ToRulePattern-3
ttuegel May 3, 2020
1b569cb
Kore.Strategies.Goal.simplify: Remove ToRulePattern
ttuegel May 3, 2020
1bf35d0
Refactor Kore.Strategies.Goal.simplify
ttuegel May 3, 2020
fb608a1
Kore.Strategies.Goal.isTriviallyValid: Remove ToRulePattern
ttuegel May 3, 2020
11142e2
Kore.Strategies.Goal.isTrusted: Remove ToRulePattern
ttuegel May 4, 2020
7c09096
Kore.Strategies.Goal.deriveWith: Remove constraint ToRulePattern
ttuegel May 4, 2020
592e07c
Kore.Strategies.Goal.deriveResults: Remove constraint FromRulePattern
ttuegel May 4, 2020
24996a0
Kore.Strategies.Goal: Remove constraints ToRulePattern, FromRulePattern
ttuegel May 4, 2020
70e2df6
Kore.Strategies.Verification: Specialize to ReachabilityRule
ttuegel May 4, 2020
17ff455
Kore.Strategies.Verification.verifyHelper: Specialize to Reachability…
ttuegel May 4, 2020
70c2e5b
Kore.Strategies.Verification.Stuck: Specialize type
ttuegel May 4, 2020
82de421
Kore.Strategies.Verification.verifyClaim: Specialize type to Reachabi…
ttuegel May 4, 2020
b88fa64
Kore.Strategies.Verification.verifyClaimStep: Specialize type to Reac…
ttuegel May 4, 2020
eb4b83b
Kore.Strategies.Verification.transitionRule': Specialize type to Reac…
ttuegel May 4, 2020
20c3d0c
Kore.Strategies.Verification: Clean up
ttuegel May 4, 2020
25356ba
Remove type Kore.Strategies.Verification.Claim
ttuegel May 4, 2020
6c508c3
Kore.Strategies.Verification: TODO
ttuegel May 4, 2020
c59d881
Kore.Strategies.Goal: Remove ToRulePattern
ttuegel May 5, 2020
5706096
Remove function Kore.Strategies.Goal.configurationDestinationToRule
ttuegel May 5, 2020
4260645
Kore.Strategies.Rule: Remove instances of ToRulePattern and FromRuleP…
ttuegel May 5, 2020
318b423
Revert "Kore.Strategies.Rule: Remove instances of ToRulePattern and F…
ttuegel May 5, 2020
6e6944b
Kore.Repl: Remove constraint ToRulePattern
ttuegel May 5, 2020
02e320e
Kore.Strategies.Rule: Remove instances of FromRulePattern
ttuegel May 5, 2020
e8a1a5a
Kore.Repl: Remove use of function ruleToGoal
ttuegel May 5, 2020
cc6056e
Remove member ruleToGoal of class Goal
ttuegel May 5, 2020
5dff456
Rename free rule variables at initialization
ttuegel May 5, 2020
4d25009
Kore.Exec: Undo CPS transformations
ttuegel May 5, 2020
94aaf22
Kore.Exec: Use Compose
ttuegel May 5, 2020
15981b8
extractClaim: Do not return attributes used to construct claim
ttuegel May 5, 2020
545c625
PROF OPTIONS_GHC -fno-prof-auto
ttuegel May 6, 2020
b87f200
ruleAllPathToRuleReachability: Use coerce
ttuegel May 6, 2020
b3b01f3
fixup! PROF OPTIONS_GHC -fno-prof-auto
ttuegel May 6, 2020
470b432
Merge branch 'master' into refactor--remove-ToRulePattern-2
ttuegel May 6, 2020
36066e7
Merge branch 'refactor--remove-ToRulePattern-2' into refactor--remove…
ttuegel May 6, 2020
b59bb27
Merge branch 'refactor--remove-ToRulePattern-3' into refactor--lift-m…
ttuegel May 6, 2020
3e28c05
Kore.Exec: Lint
ttuegel May 6, 2020
70f6a66
Merge branch 'master' into meta--ghc-tags-plugin
ttuegel May 6, 2020
b4ec0a5
gitignore: TAGS file
ttuegel May 6, 2020
b835ad4
Kore.Exec: Lint
ttuegel May 6, 2020
074502e
Merge branch 'master' into refactor--remove-ToRulePattern-3
ttuegel May 6, 2020
bc44c9a
WIP Kore.Step.Strategy: unfoldM
ttuegel May 6, 2020
6c1bade
Kore.Strategies.Goal: Remove duplicate withConfiguration'
ttuegel May 7, 2020
152388e
Merge branch 'master' into refactor--remove-ToRulePattern-3
ttuegel May 7, 2020
16f71e7
Merge branch 'refactor--remove-ToRulePattern-3' into refactor--lift-m…
ttuegel May 7, 2020
4820964
Merge branch 'refactor--lift-mkRewritingRule' into feature--implicit-…
ttuegel May 7, 2020
8cdcdd7
Kore.Step.Strategy: Extract unfoldTransition from leavesM
ttuegel May 7, 2020
edc3423
Add instance MonadProfiler (CatchT _)
ttuegel May 8, 2020
9338efd
Kore.Profiler.Data: Reduce some instances
ttuegel May 8, 2020
49f435b
Add instance MonadThrow (ListT _)
ttuegel May 8, 2020
b03397a
Throw LimitExceeded in MonadThrow
ttuegel May 8, 2020
5a8285e
Factor applyBreadthLimit out of leavesM
ttuegel May 8, 2020
d99ee0a
Extract unfoldBreadthFirst and unfoldDepthFirst
ttuegel May 8, 2020
7d356ca
Parameterize leavesM over queue updating function
ttuegel May 8, 2020
eb7b8e1
Generalize type of mapTransitionT
ttuegel May 8, 2020
a206b06
Factor unfoldM_ out of constructExecutionGraph
ttuegel May 8, 2020
6a38833
constructExecutionGraph: Restore Profile.executionQueueLength
ttuegel May 8, 2020
17f415b
verifyClaim: Restore Profile.executionQueueLength
ttuegel May 8, 2020
b7e2972
Merge branch 'master' into feature--implicit-ExecutionGraph
ttuegel May 8, 2020
fdb163a
Merge branch 'master' into feature--implicit-ExecutionGraph
ttuegel May 11, 2020
7dea8c0
Linting
ttuegel May 11, 2020
bbf6049
Merge branch 'master' into feature--implicit-ExecutionGraph
ttuegel May 11, 2020
bd4b99c
Revert unintentional changes
ttuegel May 11, 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
22 changes: 15 additions & 7 deletions kore/src/Kore/Exec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import Control.Error.Util
)
import Control.Monad.Catch
( MonadCatch
, MonadThrow
)
import Control.Monad.Trans.Except
( runExceptT
Expand Down Expand Up @@ -167,6 +168,9 @@ import Kore.Unparser
( unparseToText
, unparseToText2
)
import Log
( MonadLog
)
import qualified Log
import SMT
( MonadSMT
Expand Down Expand Up @@ -197,10 +201,11 @@ data Execution =

-- | Symbolic execution
exec
:: ( Log.WithLog Log.LogMessage smt
:: ( MonadIO smt
, MonadLog smt
, MonadProfiler smt
, MonadSMT smt
, MonadIO smt
, MonadThrow smt
)
=> Limit Natural
-> VerifiedModule StepperAttributes
Expand Down Expand Up @@ -234,10 +239,11 @@ exec breadthLimit verifiedModule strategy initialTerm =

-- | Project the value of the exit cell, if it is present.
execGetExitCode
:: ( Log.WithLog Log.LogMessage smt
:: ( MonadIO smt
, MonadLog smt
, MonadProfiler smt
, MonadSMT smt
, MonadIO smt
, MonadThrow smt
)
=> VerifiedModule StepperAttributes
-- ^ The main module
Expand All @@ -262,10 +268,11 @@ execGetExitCode indexedModule strategy' finalTerm =

-- | Symbolic search
search
:: ( Log.WithLog Log.LogMessage smt
:: ( MonadIO smt
, MonadLog smt
, MonadProfiler smt
, MonadSMT smt
, MonadIO smt
, MonadThrow smt
)
=> Limit Natural
-> VerifiedModule StepperAttributes
Expand Down Expand Up @@ -404,6 +411,7 @@ boundedModelCheck
, MonadProfiler smt
, MonadSMT smt
, MonadIO smt
, MonadThrow smt
)
=> Limit Natural
-> Limit Natural
Expand Down Expand Up @@ -584,7 +592,7 @@ simplifyReachabilityRule rule = do

-- | Construct an execution graph for the given input pattern.
execute
:: MonadSimplify simplifier
:: (MonadSimplify simplifier, MonadThrow simplifier)
=> Limit Natural
-> VerifiedModule StepperAttributes
-- ^ The main module
Expand Down
21 changes: 12 additions & 9 deletions kore/src/Kore/ModelChecker/Bounded.hs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ module Kore.ModelChecker.Bounded

import Prelude.Kore

import Control.Monad.Catch
( MonadThrow
)
import qualified Control.Monad.State.Strict as State
import qualified Data.Foldable as Foldable
import qualified Data.Graph.Inductive.Graph as Graph
Expand Down Expand Up @@ -100,7 +103,7 @@ bmcStrategy

checkClaim
:: forall m
. MonadSimplify m
. (MonadSimplify m, MonadThrow m)
=> Limit Natural
-> ( CommonModalPattern
-> [Strategy (Prim CommonModalPattern (RewriteRule Variable))]
Expand Down Expand Up @@ -133,14 +136,14 @@ checkClaim
, predicate = Predicate.makeTruePredicate_
, substitution = mempty
}
executionGraph <- State.evalStateT
(runStrategyWithSearchOrder
breadthLimit
transitionRule'
strategy
searchOrder
startState)
Nothing
executionGraph <-
runStrategyWithSearchOrder
breadthLimit
transitionRule'
strategy
searchOrder
startState
& flip State.evalStateT Nothing

Log.logInfo . Text.pack
$ ("searched states: " ++ (show . Graph.order . graph $ executionGraph))
Expand Down
41 changes: 23 additions & 18 deletions kore/src/Kore/Profiler/Data.hs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ import Prelude.Kore
import Control.Monad
( when
)
import Control.Monad.Catch.Pure
( CatchT
, mapCatchT
)
import Control.Monad.Morph
( MFunctor (..)
)
Expand All @@ -25,8 +29,8 @@ import Control.Monad.Reader
)
import qualified Control.Monad.State.Strict as Strict
import Control.Monad.Trans.Accum
( AccumT (AccumT)
, runAccumT
( AccumT
, mapAccumT
)
import Control.Monad.Trans.Except
( ExceptT
Expand Down Expand Up @@ -55,12 +59,10 @@ import System.Clock
import Control.Monad.Counter
import ListT
( ListT (..)
)
import qualified ListT
( mapListT
, mapListT
)

{- Monad that can also handle profiling events.
{- | Monad that can also handle profiling events.
-}
class Monad profiler => MonadProfiler profiler where
profile
Expand Down Expand Up @@ -257,24 +259,27 @@ profileGhcEventsAnalyze event action = do
liftIO $ traceEventIO ("STOP " ++ List.intercalate "/" event)
return a

instance (MonadProfiler m) => MonadProfiler (ReaderT thing m )

instance MonadProfiler m => MonadProfiler (Strict.StateT s m)
instance (MonadProfiler m, Monoid w) => MonadProfiler (AccumT w m)
where
profile a = mapAccumT (profile a)
{-# INLINE profile #-}

instance MonadProfiler m => MonadProfiler (MaybeT m)
instance MonadProfiler m => MonadProfiler (CatchT m) where
profile a = mapCatchT (profile a)
{-# INLINE profile #-}

instance MonadProfiler m => MonadProfiler (IdentityT m)
instance MonadProfiler m => MonadProfiler (CounterT m)

instance MonadProfiler m => MonadProfiler (ExceptT e m)

instance MonadProfiler m => MonadProfiler (IdentityT m)

instance MonadProfiler m => MonadProfiler (ListT m) where
profile a action =
ListT.mapListT (profile a) action
profile a = mapListT (profile a)
{-# INLINE profile #-}

instance (MonadProfiler m, Monoid w) => MonadProfiler (AccumT w m)
where
profile a action = AccumT (profile a . runAccumT action)
{-# INLINE profile #-}
instance MonadProfiler m => MonadProfiler (MaybeT m)

instance MonadProfiler m => MonadProfiler (CounterT m)
instance MonadProfiler m => MonadProfiler (ReaderT thing m )

instance MonadProfiler m => MonadProfiler (Strict.StateT s m)
12 changes: 4 additions & 8 deletions kore/src/Kore/Profiler/Profile.hs
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,7 @@ smtDecision (sexpr :| _) action = do
then profile ["SMT", show $ length $ show sexpr] action
else action

executionQueueLength
:: MonadProfiler profiler
=> Int -> profiler result -> profiler result
executionQueueLength len action = do
Configuration {logStrategy} <- profileConfiguration
when logStrategy
(profileValue ["ExecutionQueueLength"] len)
action
executionQueueLength :: MonadProfiler profiler => Int -> profiler ()
executionQueueLength len = do
Configuration { logStrategy } <- profileConfiguration
when logStrategy (profileValue ["ExecutionQueueLength"] len)
4 changes: 3 additions & 1 deletion kore/src/Kore/Step.hs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ import qualified Kore.Step.SMT.Evaluator as SMT.Evaluator
( filterMultiOr
)
import qualified Kore.Step.Step as Step
import Kore.Step.Strategy
import Kore.Step.Strategy hiding
( transitionRule
)
import qualified Kore.Step.Strategy as Strategy
import qualified Kore.Step.Transition as Transition
import Kore.Syntax.Variable
Expand Down
Loading