scyther-proof-0.3.0: Automatic generation of Isabelle/HOL correctness proofs for security protocols.

Scyther.Theory

Contents

Synopsis

Theorems

type Theorem = Named ProofSource

A theorem is just a named proof.

thmProto :: Theorem -> ProtocolSource

The protocol of a theorem.

thmName :: Theorem -> StringSource

The name of a theorem.

thmSequent :: Theorem -> SequentSource

The sequent of a theorem.

thmProof :: Theorem -> ProofSource

The proof of a theorem.

isAxiom :: Theorem -> BoolSource

Check if a theorem is an axiom.

Theory items

data ThyItem Source

A theory item is a (meta-)logical fact representable by our security protocol theory.

Theory Datatypes

data Theory Source

Constructors

Theory 

Fields

thyName :: String
 
thyItems :: [ThyItem]
 

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.

proveSequentsSource

Arguments

:: (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.

mapTheorySequents :: (Sequent -> Sequent) -> Theory -> TheorySource

Map the sequents of a theory.

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.

classifyProperties :: (String -> Bool) -> Theory -> (Int, Int, Int)Source

Count and classify the properties selected by the given predicate into secrecy properties, authentication properties, and other properties.