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 Source #

A named parameter.

Constructors

PInt String Int 
PSymSet String (Set e) 

Instances

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

Defined in LTK.Parameters

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

Defined in LTK.Parameters

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

Defined in LTK.Parameters

Methods

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

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

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

Defined in LTK.Parameters

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

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] Source #

Return the length of the longest relevant suffix.

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

Return the length of the longest relevant prefix.

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

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

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

Returns an empty parameter list.

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

Return the threshold at which symbol counting saturates.

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

Return the length of the longest relevant substring.

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

Return the length of the longest relevant subsequence.