ADPfusion-0.6.0.0: Efficient, high-level dynamic programming.

Safe HaskellNone
LanguageHaskell2010

ADP.Fusion.Core.SynVar.Axiom

Description

The axiom runs a backtracking algebra. The name comes from Robert Giegerichs ADP where axiom runs the fully formed algorithm.

Synopsis

Documentation

class Axiom t where Source #

The Axiom type class

Associated Types

type AxiomStream t :: * Source #

The corresponding stream being returned by axiom

type AxiomIx t :: * Source #

Index type when running the axiom

Methods

axiom :: t -> AxiomStream t Source #

Given a table, run the axiom

axiomAt :: t -> AxiomIx t -> AxiomStream t Source #

Given a table and index, run the axiom from the index on. This is useful for scanning type algorithms that need to return all locally optimal structures, as a locally optimal may start at any given index.

Instances
(Monad mB, IndexStream i, i ~ j, m ~ mB) => Axiom (TW (Backtrack (TwIRec mF c i x) mF mB) (LimitType j -> j -> m [r])) Source # 
Instance details

Defined in ADP.Fusion.Core.SynVar.Recursive.Type

Associated Types

type AxiomStream (TW (Backtrack (TwIRec mF c i x) mF mB) (LimitType j -> j -> m [r])) :: Type Source #

type AxiomIx (TW (Backtrack (TwIRec mF c i x) mF mB) (LimitType j -> j -> m [r])) :: Type Source #

Methods

axiom :: TW (Backtrack (TwIRec mF c i x) mF mB) (LimitType j -> j -> m [r]) -> AxiomStream (TW (Backtrack (TwIRec mF c i x) mF mB) (LimitType j -> j -> m [r])) Source #

axiomAt :: TW (Backtrack (TwIRec mF c i x) mF mB) (LimitType j -> j -> m [r]) -> AxiomIx (TW (Backtrack (TwIRec mF c i x) mF mB) (LimitType j -> j -> m [r])) -> AxiomStream (TW (Backtrack (TwIRec mF c i x) mF mB) (LimitType j -> j -> m [r])) Source #

(Monad mB, PrimArrayOps arr i x, IndexStream i, j ~ i, m ~ mB) => Axiom (TW (Backtrack (TwITbl b s mF arr c i x) mF mB) (LimitType j -> j -> m [r])) Source #

We need this somewhat annoying instance construction (i ~ j and m ~ mB) in order to force selection of this instance.

Instance details

Defined in ADP.Fusion.Core.SynVar.Array.Type

Associated Types

type AxiomStream (TW (Backtrack (TwITbl b s mF arr c i x) mF mB) (LimitType j -> j -> m [r])) :: Type Source #

type AxiomIx (TW (Backtrack (TwITbl b s mF arr c i x) mF mB) (LimitType j -> j -> m [r])) :: Type Source #

Methods

axiom :: TW (Backtrack (TwITbl b s mF arr c i x) mF mB) (LimitType j -> j -> m [r]) -> AxiomStream (TW (Backtrack (TwITbl b s mF arr c i x) mF mB) (LimitType j -> j -> m [r])) Source #

axiomAt :: TW (Backtrack (TwITbl b s mF arr c i x) mF mB) (LimitType j -> j -> m [r]) -> AxiomIx (TW (Backtrack (TwITbl b s mF arr c i x) mF mB) (LimitType j -> j -> m [r])) -> AxiomStream (TW (Backtrack (TwITbl b s mF arr c i x) mF mB) (LimitType j -> j -> m [r])) Source #

(Monad m, IndexStream i) => Axiom (TwIRec m c i x) Source # 
Instance details

Defined in ADP.Fusion.Core.SynVar.Recursive.Type

Associated Types

type AxiomStream (TwIRec m c i x) :: Type Source #

type AxiomIx (TwIRec m c i x) :: Type Source #

Methods

axiom :: TwIRec m c i x -> AxiomStream (TwIRec m c i x) Source #

axiomAt :: TwIRec m c i x -> AxiomIx (TwIRec m c i x) -> AxiomStream (TwIRec m c i x) Source #

(Monad m, PrimArrayOps arr i x, IndexStream i) => Axiom (TwITbl b s m arr c i x) Source # 
Instance details

Defined in ADP.Fusion.Core.SynVar.Array.Type

Associated Types

type AxiomStream (TwITbl b s m arr c i x) :: Type Source #

type AxiomIx (TwITbl b s m arr c i x) :: Type Source #

Methods

axiom :: TwITbl b s m arr c i x -> AxiomStream (TwITbl b s m arr c i x) Source #

axiomAt :: TwITbl b s m arr c i x -> AxiomIx (TwITbl b s m arr c i x) -> AxiomStream (TwITbl b s m arr c i x) Source #