tamarin-prover-theory-0.8.5.0: Term manipulation library for the tamarin prover.

PortabilityGHC only
MaintainerSimon Meier <iridcode@gmail.com>
Safe HaskellNone

Theory.Model.Fact

Contents

Description

Facts used to formulate and reason about protocol execution.

Synopsis

Fact

data Fact t Source

Facts.

Constructors

Fact 

Fields

factTag :: FactTag
 
factTerms :: [t]
 

Instances

Functor Fact 
Typeable1 Fact 
Foldable Fact 
Traversable Fact 
Eq t => Eq (Fact t) 
Data t => Data (Fact t) 
Ord t => Ord (Fact t) 
Show t => Show (Fact t) 
Binary t_1627412214 => Binary (Fact t_1627412214) 
NFData t_1627412214 => NFData (Fact t_1627412214) 
Apply t => Apply (Fact t) 
HasFrees t => HasFrees (Fact t) 
Sized t => Sized (Fact t) 

data FactTag Source

Fact tags/symbols

Constructors

ProtoFact Multiplicity String Int

A protocol fact together with its arity and multiplicity.

FreshFact

Freshly generated value.

OutFact

Sent by the protocol

InFact

Officially known by the intruder/network.

KUFact

Up-knowledge fact in messsage deduction.

KDFact

Down-knowledge fact in message deduction.

DedFact

Log-fact denoting that the intruder deduced a message using a construction rule.

matchFactSource

Arguments

:: Fact t

Term

-> Fact t

Pattern

-> Match t 

matchLFact t p is a complete set of AC matchers for the term fact t and the pattern fact p.

Queries

isLinearFact :: Fact t -> BoolSource

True if the fact is a linear fact.

isPersistentFact :: Fact t -> BoolSource

True if the fact is a persistent fact.

isProtoFact :: Fact t -> BoolSource

True iff the fact is a non-special protocol fact.

factTagName :: FactTag -> StringSource

The name of a fact tag, e.g., factTagName KUFact = KU.

showFactTag :: FactTag -> StringSource

Show a fact tag as a String. This is the factTagName prefixed with the multiplicity.

showFactTagArity :: FactTag -> StringSource

Show a fact tag together with its aritiy.

factTagArity :: FactTag -> IntSource

The arity of a FactTag.

factArity :: Fact t -> IntSource

The arity of a Fact.

factMultiplicity :: Fact t -> MultiplicitySource

The multiplicity of a Fact.

data DirTag Source

A direction tag

Constructors

UpK 
DnK 

Instances

kuFact :: t -> Fact tSource

kdFact :: t -> Fact tSource

kFactView :: LNFact -> Maybe (DirTag, LNTerm)Source

View a message-deduction fact.

dedFactView :: LNFact -> Maybe LNTermSource

View a deduction logging fact.

isKFact :: LNFact -> BoolSource

True if the fact is a message-deduction fact.

isKUFact :: LNFact -> BoolSource

True if the fact is a KU-fact.

isKDFact :: LNFact -> BoolSource

True if the fact is a KD-fact.

Construction

freshFact :: t -> Fact tSource

A fresh fact denotes a fresh unguessable name.

outFact :: t -> Fact tSource

A fact denoting a message sent by the protocol to the intruder.

inFact :: t -> Fact tSource

A fact denoting that the intruder sent a message to the protocol.

kLogFact :: t -> Fact tSource

A fact logging that the intruder knows a message.

dedLogFact :: t -> Fact tSource

A fact logging that the intruder deduced a message using a construction rule. We use this to formulate invariants over normal dependency graphs.

protoFact :: Multiplicity -> String -> [t] -> Fact tSource

A protocol fact denotes a fact generated by a protocol rule.

NFact

type NFact v = Fact (NTerm v)Source

Facts with literals containing names and arbitrary variables.

LFact

type LFact c = Fact (LTerm c)Source

Facts with literals arbitrary constants and logical variables.

type LNFact = Fact LNTermSource

Facts used for proving; i.e. variables fixed to logical variables and constant fixed to names.

unifyLNFactEqs :: [Equal LNFact] -> WithMaude [LNSubstVFresh]Source

Unify a list of LFact equalities.

unifiableLNFacts :: LNFact -> LNFact -> WithMaude BoolSource

True iff the two facts are unifiable.

Pretty-Printing

prettyFact :: Document d => (t -> d) -> Fact t -> dSource

Pretty print a fact.

prettyNFact :: Document d => LNFact -> dSource

Pretty print a NFact.

prettyLNFact :: Document d => LNFact -> dSource

Pretty print a LFact.