tct-2.0.1: A Complexity Analyser for Term Rewrite Systems

Portabilityunportable
Stabilityunstable
MaintainerMartin Avanzini <martin.avanzini@uibk.ac.at>
Safe HaskellSafe-Infered

Tct.Processor.Standard

Contents

Description

This module gives the infrastructure for standard processors.

Synopsis

Defining new Processors

In order to define a new standard processor, define an instance of Processor.

data TheProcessor a

This datatype defines a specific instance of a standard processor

Constructors

TheProcessor 

Fields

processor :: a

The processor.

processorArgs :: Domains (ArgumentsOf a)

Arguments of a processor.

class ComplexityProof (ProofOf proc) => Processor proc where

The main class a processor implements.

Provides a lifting from Processor to Processor.

Associated Types

type ArgumentsOf proc

Arguments of the processor, cf. Tct.Processor.Args.

type ProofOf proc

Proof type of the transformation.

Methods

name :: proc -> String

Unique name.

description :: proc -> [String]

Description of the processor.

arguments :: proc -> ArgumentsOf proc

Description of the arguments, cf. module Tct.Processor.Args.

instanceName :: TheProcessor proc -> String

Optional name specific to instances. Defaults to the processor name.

solve :: SolverM m => TheProcessor proc -> Problem -> m (ProofOf proc)

The solve method. Given an instance and a problem, it constructs a proof object.

solvePartial :: SolverM m => TheProcessor proc -> SelectorExpression -> Problem -> m (PartialProof (ProofOf proc))

Similar to solve, but constructs a PartialProof. At least all rules in the additional paramter of type SelectorExpression should be removed. Per default, this method returns PartialInapplicable.

withArgs :: Processor a => StdProcessor a -> Domains (ArgumentsOf a) -> ProcessorInstance a

Constructor for instances.

modifyArguments :: Processor a => (Domains (ArgumentsOf a) -> Domains (ArgumentsOf a)) -> ProcessorInstance a -> ProcessorInstance a

Modifyer for arguments of instances.

apply :: (SolverM m, Processor p, Arguments (ArgumentsOf p)) => StdProcessor p -> Domains (ArgumentsOf p) -> Problem -> m (Proof (StdProcessor p))

Wrapper around solve, constructing a Proof.