language-toolkit-1.2.0.0: A set of tools for analyzing languages via logic and automata
Copyright(c) 2023-2024 Dakotah Lambert
LicenseMIT
Safe HaskellSafe-Inferred
LanguageHaskell2010

LTK.Parameters

Description

Many subregular classes are parameterized. In some cases, we know not only how to decide membership, but also the values of these parameters. As a general interface, each parameterization function returns a Maybe [Parameter e], where Nothing means the language is not in the class and Just xs indicates for which parameters this membership holds. The interpretation of the list differs per class; consult the individual functions' documentation for more information.

All arguments should be given in minimal form. This is never checked.

Since: 1.2

Synopsis

Documentation

data Parameter e #

A named parameter.

Constructors

PInt String Int 
PSymSet String (Set e) 

Instances

Instances details
(Read e, Ord e) => Read (Parameter e) # 
Instance details

Defined in LTK.Parameters

Show e => Show (Parameter e) # 
Instance details

Defined in LTK.Parameters

Eq e => Eq (Parameter e) # 
Instance details

Defined in LTK.Parameters

Methods

(==) :: Parameter e -> Parameter e -> Bool #

(/=) :: Parameter e -> Parameter e -> Bool #

Ord e => Ord (Parameter e) # 
Instance details

Defined in LTK.Parameters

pTier :: (Ord n, Ord e) => (FSA n e -> Maybe [Parameter e]) -> FSA n e -> Maybe [Parameter e] #

If there are neutral symbols, test a class and prepend to its parameters the set of salient symbols.

pDef :: (Ord n, Ord e) => FSA n e -> Maybe [Parameter e] #

Return the length of the longest relevant suffix.

pRDef :: (Ord n, Ord e) => FSA n e -> Maybe [Parameter e] #

Return the length of the longest relevant prefix.

pGDef :: (Ord n, Ord e) => FSA n e -> Maybe [Parameter e] #

Return the length of the longest relevant suffix or prefix, whichever is longer.

pCB :: (Ord n, Ord e) => FSA n e -> Maybe [Parameter e] #

Returns an empty parameter list.

pAcom :: (Ord n, Ord e) => FSA n e -> Maybe [Parameter e] #

Return the threshold at which symbol counting saturates.

pSL :: (Ord n, Ord e) => FSA n e -> Maybe [Parameter e] #

Return the length of the longest relevant substring.

pSP :: (Ord n, Ord e) => FSA n e -> Maybe [Parameter e] #

Return the length of the longest relevant subsequence.