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

MaintainerBenedikt Schmidt <beschmi@gmail.com>
Safe HaskellNone

Term.Unification

Contents

Description

AC unification based on maude and free unification.

Synopsis

Unification modulo AC

unifyLTerm :: (IsConst c, Show (Lit c LVar), Ord c) => (c -> LSort) -> [Equal (LTerm c)] -> WithMaude [SubstVFresh c LVar]Source

unifyLNTerm eqs returns a complete set of unifiers for eqs modulo AC.

unifyLNTerm :: [Equal LNTerm] -> WithMaude [SubstVFresh Name LVar]Source

unifyLNTerm eqs returns a complete set of unifiers for eqs modulo AC.

unifiableLNTerms :: LNTerm -> LNTerm -> WithMaude BoolSource

True iff the terms are unifiable.

unifyLTermFactored :: (IsConst c, Show (Lit c LVar), Ord c) => (c -> LSort) -> [Equal (LTerm c)] -> WithMaude (LSubst c, [SubstVFresh c LVar])Source

unifyLTerm sortOf eqs returns a complete set of unifiers for eqs modulo AC.

unifyLNTermFactored :: [Equal LNTerm] -> WithMaude (LNSubst, [SubstVFresh Name LVar])Source

unifyLTerm sortOf eqs returns a complete set of unifiers for eqs modulo AC.

matching modulo AC

Constructing matching problems

matchLVar :: LVar -> LVar -> Match (LTerm c)Source

Match an LVar term to an LVar pattern.

Solving matching problems

solveMatchLTerm :: (IsConst c, Show (Lit c LVar), Ord c) => (c -> LSort) -> Match (LTerm c) -> WithMaude [Subst c LVar]Source

solveMatchLNTerm sortOf eqs returns a complete set of matchers for eqs modulo AC.

solveMatchLNTerm :: Match LNTerm -> WithMaude [Subst Name LVar]Source

solveMatchLNTerm eqs returns a complete set of matchers for eqs modulo AC.

Handles to a Maude process

data MaudeHandle Source

A handle to a Maude process. It requires the Maude path for Signatures to be serializable. If we also add the string for the Maude config file, then it would even be serializable on its own.

type WithMaude = Reader MaudeHandleSource

Values that depend on a MaudeHandle.

startMaude :: FilePath -> MaudeSig -> IO MaudeHandleSource

startMaude starts a new instance of Maude and returns a Handle to it.

getMaudeStats :: MaudeHandle -> IO StringSource

getMaudeStats returns the maude stats formatted as a string.

Maude signatures

data MaudeSig Source

The required information to define a Maude functional module.

Instances

Eq MaudeSig 
Ord MaudeSig 
Show MaudeSig 
Monoid MaudeSig

A monoid instance to combine maude signatures.

Binary MaudeSig 
NFData MaudeSig 

minimalMaudeSig :: MaudeSigSource

The minimal maude signature.

dhMaudeSig :: MaudeSigSource

Maude signatures for the AC symbols.

bpMaudeSig :: MaudeSigSource

Maude signatures for the AC symbols.

msetMaudeSig :: MaudeSigSource

Maude signatures for the AC symbols.

pairMaudeSig :: MaudeSigSource

Maude signatures for the default subterm symbols.

symEncMaudeSig :: MaudeSigSource

Maude signatures for the default subterm symbols.

asymEncMaudeSig :: MaudeSigSource

Maude signatures for the default subterm symbols.

signatureMaudeSig :: MaudeSigSource

Maude signatures for the default subterm symbols.

hashMaudeSig :: MaudeSigSource

Maude signatures for the default subterm symbols.

rrulesForMaudeSig :: MaudeSig -> Set (RRule LNTerm)Source

Returns all rewriting rules including the rules for DH, BP, and multiset.

stFunSyms :: MaudeSig -> Set NoEqSymSource

function signature for subterm theory

funSyms :: MaudeSig -> FunSigSource

function signature including the function symbols for DH, BP, and Multiset can be computed from enableX and stFunSyms

stRules :: MaudeSig -> Set StRuleSource

rewriting rules for subterm theory

irreducibleFunSyms :: MaudeSig -> FunSigSource

irreducible function symbols (can be computed)

noEqFunSyms :: MaudeSig -> NoEqFunSigSource

Non-AC function symbols.

addFunSym :: NoEqSym -> MaudeSig -> MaudeSigSource

Add function symbol to given maude signature.

addStRule :: StRule -> MaudeSig -> MaudeSigSource

Add subterm rule to given maude signature.

Convenience exports