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

MaintainerBenedikt Schmidt <beschmi@gmail.com>
Safe HaskellNone

Term.Rewriting.Definitions

Contents

Description

Term Equalities, Matching Problems, and Subterm Rules.

Synopsis

Equalities

data Equal a Source

An equality.

Constructors

Equal 

Fields

eqLHS :: a
 
eqRHS :: a
 

evalEqual :: Eq a => Equal a -> BoolSource

True iff the two sides of the equality are equal with respect to their Eq instance.

Matching Problems

data Match a Source

Matching problems. Use the Monoid instance to compose matching problems.

Constructors

NoMatch

No matcher exists.

DelayedMatches [(a, a)]

A bunch of delayed (term,pattern) pairs.

Instances

flattenMatch :: Match a -> Maybe [(a, a)]Source

Flatten a matching problem to a list of (term,pattern) pairs. If no matcher exists, then Nothing is returned.

matchWithSource

Arguments

:: a

Term

-> a

Pattern

-> Match a

Matching problem.

Match a term with a pattern.

matchOnlyIf :: Bool -> Match aSource

Ensure that matching only succeeds if the condition holds.

Rewriting Rules

data RRule a Source

A rewrite rule.

Constructors

RRule a a 

Instances