> {-# OPTIONS_HADDOCK show-extensions #-}
>
> module LTK.Decide.SPL (isSPL, isSPLM, isSPLs) where
> import Data.Representation.FiniteSemigroup
> import LTK.FSA
> import LTK.Algebra(SynMon)
>
>
>
>
> isSPL :: (Ord n, Ord e) => FSA n e -> Bool
> isSPL :: forall n e. (Ord n, Ord e) => FSA n e -> Bool
isSPL = OrderedSemigroup GeneratedAction -> Bool
forall s. FiniteSemigroupRep s => OrderedSemigroup s -> Bool
isSPLs (OrderedSemigroup GeneratedAction -> Bool)
-> (FSA n e -> OrderedSemigroup GeneratedAction) -> FSA n e -> Bool
forall b c a. (b -> c) -> (a -> b) -> a -> c
. FSA n e -> OrderedSemigroup GeneratedAction
forall n e.
(Ord n, Ord e) =>
FSA n e -> OrderedSemigroup GeneratedAction
syntacticOSemigroup
>
>
>
>
> isSPLM :: (Ord n, Ord e) => SynMon n e -> Bool
> isSPLM :: forall n e. (Ord n, Ord e) => SynMon n e -> Bool
isSPLM = FSA ([Maybe n], [Symbol e]) e -> Bool
forall n e. (Ord n, Ord e) => FSA n e -> Bool
isSPL
>
>
>
>
> isSPLs :: FiniteSemigroupRep s => OrderedSemigroup s -> Bool
> isSPLs :: forall s. FiniteSemigroupRep s => OrderedSemigroup s -> Bool
isSPLs OrderedSemigroup s
s = Bool -> (Bool -> Bool) -> Maybe Bool -> Bool
forall b a. b -> (a -> b) -> Maybe a -> b
maybe Bool
False Bool -> Bool
forall a. a -> a
id (Maybe Bool -> Bool) -> Maybe Bool -> Bool
forall a b. (a -> b) -> a -> b
$ String -> OrderedSemigroup s -> Maybe Bool
forall s.
FiniteSemigroupRep s =>
String -> OrderedSemigroup s -> Maybe Bool
isVariety String
"[x*<x*yx*]" OrderedSemigroup s
s