Hets - the Heterogeneous Tool Set

CopyrightChristian Maeder and Uni Bremen 2002-2006
LicenseGPLv2 or higher, see LICENSE.txt
MaintainerChristian.Maeder@dfki.de
Stabilityexperimental
Portabilityportable
Safe HaskellNone

CASL.MixfixParser

Description

Mixfix analysis of terms

Synopsis

Documentation

resolveFormula :: FormExtension f => (f -> f) -> MixResolve f -> MixResolve (FORMULA f)

top-level resolution like resolveMixFrm that fails in case of diags

resolveMixfix :: FormExtension f => (f -> f) -> MixResolve f -> MixResolve (TERM f)

top-level resolution like resolveMixTrm that fails in case of diags

type MixResolve f = GlobalAnnos -> (TokRules, Rules) -> f -> Result f

the type for mixfix resolution

resolveMixTrm :: FormExtension f => (f -> f) -> MixResolve f -> MixResolve (TERM f)

basic term resolution that supports recursion without failure

resolveMixFrm :: FormExtension f => (f -> f) -> MixResolve f -> MixResolve (FORMULA f)

basic formula resolution that supports recursion without failure

type IdSets = ((Set Id, Set Id), Set Id)

the precomputed sets of constant, op, and pred identifiers

mkIdSets :: Set Id -> Set Id -> Set Id -> IdSets

construct IdSets from op and pred identifiers

unite :: [IdSets] -> IdSets

union IdSets

unite2 :: [(Set Id, Set Id)] -> (Set Id, Set Id)

makeRules :: GlobalAnnos -> IdSets -> (TokRules, Rules)

construct rules from IdSets to be put into a Mix record

data Mix b s f e

Constructors

MixRecord 

Fields

getBaseIds :: b -> IdSets

ids of extra basic items

getSigIds :: s -> IdSets

ids of extra sig items

getExtIds :: e -> IdSets

ids of signature extensions

mixRules :: (TokRules, Rules)

rules for Earley

putParen :: f -> f

parenthesize extended formula

mixResolve :: MixResolve f

resolve extended formula

emptyMix :: Mix b s f e

an initially empty record

extendMix :: Set Token -> Mix b s f e -> Mix b s f e

ids_BASIC_SPEC :: (b -> IdSets) -> (s -> IdSets) -> BASIC_SPEC b s f -> IdSets

get all ids of a basic spec

ids_SIG_ITEMS :: (s -> IdSets) -> SIG_ITEMS s f -> IdSets

get all ids of a sig items

ids_OP_ITEM :: OP_ITEM f -> (Set Id, Set Id)

get all op ids of an op item

ids_PRED_ITEM :: PRED_ITEM f -> Set Id

get all pred ids of a pred item