twee-lib-2.4.2: An equational theorem prover
Safe HaskellSafe-Inferred
LanguageHaskell2010

Twee

Description

The main prover loop.

Synopsis

Configuration and prover state.

data State f Source #

The prover state.

Constructors

State 

defaultConfig :: Config f Source #

The default prover configuration.

configIsComplete :: Config f -> Bool Source #

Does this configuration run the prover in a complete mode?

initialState :: Config f -> State f Source #

The initial state.

Messages.

data Message f Source #

A message which is produced by the prover when something interesting happens.

Constructors

NewActive !(Active f)

A new rule.

NewEquation !(Equation f)

A new joinable equation.

DeleteActive !(Active f)

A rule was deleted.

SimplifyQueue

The CP queue was simplified.

NotComplete !IntSet

All except these axioms are complete (with a suitable-chosen subset of the rules).

Interreduce

The rules were reduced wrt each other.

Status !Int

Status update: how many queued critical pairs there are.

Instances

Instances details
Function f => Pretty (Message f) Source # 
Instance details

Defined in Twee

message :: PrettyTerm f => Message f -> State f -> State f Source #

Emit a message.

clearMessages :: State f -> State f Source #

Forget about all emitted messages.

messages :: State f -> [Message f] Source #

Get all emitted messages.

The CP queue.

makePassives :: Function f => Config f -> State f -> Active f -> [Passive] Source #

Compute all critical pairs from a rule.

data Passive Source #

Constructors

Passive 

Instances

Instances details
Eq Passive Source # 
Instance details

Defined in Twee

Methods

(==) :: Passive -> Passive -> Bool #

(/=) :: Passive -> Passive -> Bool #

Ord Passive Source # 
Instance details

Defined in Twee

data Batch Source #

Constructors

Batch 

Fields

data BatchKind Source #

Constructors

Rule1 
Rule2 

Instances

Instances details
Eq BatchKind Source # 
Instance details

Defined in Twee

findPassive :: forall f. Function f => State f -> Passive -> Maybe (Overlap (Active f) f) Source #

Turn a Passive back into an overlap. Doesn't try to simplify it.

simplifyPassive :: Function f => Config f -> State f -> Passive -> Maybe Passive Source #

Renormalise a queued Passive.

shouldSimplifyQueue :: Function f => Config f -> State f -> Bool Source #

Check if we should renormalise the queue.

simplifyQueue :: Function f => Config f -> State f -> State f Source #

Renormalise the entire queue.

enqueue :: Function f => State f -> Id -> [Passive] -> State f Source #

Enqueue a set of critical pairs.

dequeue :: Function f => Config f -> State f -> (Maybe (Info, CriticalPair f, Active f, Active f), State f) Source #

Dequeue a critical pair.

Also takes care of:

  • removing any orphans from the head of the queue
  • ignoring CPs that are too big

Active rewrite rules.

data Active f Source #

Constructors

Active 

Instances

Instances details
Eq (Active f) Source # 
Instance details

Defined in Twee

Methods

(==) :: Active f -> Active f -> Bool #

(/=) :: Active f -> Active f -> Bool #

Function f => Pretty (Active f) Source # 
Instance details

Defined in Twee

Has (Active f) Id Source # 
Instance details

Defined in Twee

Methods

the :: Active f -> Id Source #

Has (Active f) Depth Source # 
Instance details

Defined in Twee

Methods

the :: Active f -> Depth Source #

f ~ g => Has (Active f) (Positions2 g) Source # 
Instance details

Defined in Twee

Methods

the :: Active f -> Positions2 g Source #

f ~ g => Has (Active f) (Rule g) Source # 
Instance details

Defined in Twee

Methods

the :: Active f -> Rule g Source #

data Info Source #

Constructors

Info 

Fields

addActive :: Function f => Config f -> State f -> (Id -> Active f) -> State f Source #

sample :: Function f => Int -> [Passive] -> State f -> State f Source #

addCP :: Function f => Config f -> Model f -> State f -> Info -> CriticalPair f -> State f Source #

addAxiom :: Function f => Config f -> State f -> Axiom f -> State f Source #

data Goal f Source #

Instances

Instances details
(Labelled f, Show f) => Show (Goal f) Source # 
Instance details

Defined in Twee

Methods

showsPrec :: Int -> Goal f -> ShowS #

show :: Goal f -> String #

showList :: [Goal f] -> ShowS #

addGoal :: Function f => Config f -> State f -> Goal f -> State f Source #

goal :: Int -> String -> Equation f -> Goal f Source #

data Output m f Source #

Constructors

Output 

Fields

complete :: (Function f, MonadIO m) => Output m f -> Config f -> State f -> m (State f) Source #

complete1 :: Function f => Config f -> State f -> (Bool, State f) Source #

rules :: Function f => State f -> [Rule f] Source #

normalForms :: Function f => State f -> Term f -> Map (Term f) (Reduction f) Source #