- type Theorem = Named Proof
- thmProto :: Theorem -> Protocol
- thmName :: Theorem -> String
- thmSequent :: Theorem -> Sequent
- thmProof :: Theorem -> Proof
- isAxiom :: Theorem -> Bool
- data ThyItem
- = ThyProtocol Protocol
- | ThySequent (Named Sequent)
- | ThyTheorem (Named Proof)
- | ThyText String
- data Theory = Theory {}
- adaptTheoryName :: FilePath -> Theory -> Theory
- insertItem :: ThyItem -> Theory -> Theory
- shrinkTheory :: (String -> Bool) -> Theory -> Theory
- proveSequents :: (Sequent -> Theorem -> Bool) -> ([Named Sequent] -> Sequent -> Maybe Proof) -> Theory -> Theory
- mapTheorySequents :: (Sequent -> Sequent) -> Theory -> Theory
- addMissingTypingInvariants :: Theory -> Theory
- ensureUniqueRoleNames :: Theory -> Theory
- composeParallel :: Theory -> Theory
- lookupProtocol :: String -> Theory -> Maybe Protocol
- unsoundTheorems :: Theory -> [(Protocol, String)]
- theoryProofSize :: Theory -> ProofSize
- theoryOverview :: Theory -> Theory
- classifyProperties :: (String -> Bool) -> Theory -> (Int, Int, Int)
Theorems
thmSequent :: Theorem -> SequentSource
The sequent of a theorem.
Theory items
A theory item is a (meta-)logical fact representable by our security protocol theory.
Theory Datatypes
Construction
adaptTheoryName :: FilePath -> Theory -> TheorySource
Adapt the theory name to the base name of the given file.
insertItem :: ThyItem -> Theory -> TheorySource
Insert a theory item into a theory.
shrinkTheory :: (String -> Bool) -> Theory -> TheorySource
Only keep theorems for which the given predicate is true or which are referenced by some kept theorem.
:: (Sequent -> Theorem -> Bool) | Predicate determining theorems for reuse for proving the given sequent. |
-> ([Named Sequent] -> Sequent -> Maybe Proof) | Proof construction function. |
-> Theory | |
-> Theory |
Prove all claims with the given heuristic optionally using the given bound.
addMissingTypingInvariants :: Theory -> TheorySource
Most proofs require a typing invariant to be present for the protocol under investigation. We try to derive one from the protcol specification for every protocol that has none.
ensureUniqueRoleNames :: Theory -> TheorySource
Ensures that all roles are globally uniquely named by prefixing all role names with their corresponding protocol name, if two roles have equal names.
composeParallel :: Theory -> TheorySource
Compose all protocol in the theory in parallel. Assumes that both protocol names as well as role names are globally unique.
Queries
lookupProtocol :: String -> Theory -> Maybe ProtocolSource
Find a protocol in the theory according to its name.
unsoundTheorems :: Theory -> [(Protocol, String)]Source
Find all unsound theorems of the theory.
theoryProofSize :: Theory -> ProofSizeSource
Total proof size.
theoryOverview :: Theory -> TheorySource