Hets - the Heterogeneous Tool Set
Copyright(c) Ewaryst Schulz DFKI Bremen 2010
LicenseGPLv2 or higher, see LICENSE.txt
Maintainerewaryst.schulz@dfki.de
Stabilityexperimental
Portabilityportable
Safe HaskellSafe

CSL.TreePO

Description

This module defines a basic datatype for tree-like partial orderings such as encountered, e.g., in the set lattice.

Synopsis

Documentation

data Incomparable Source #

Constructors

Disjoint 
Overlap 

Instances

Instances details
Eq Incomparable Source # 
Instance details

Defined in CSL.TreePO

Methods

(==) :: Incomparable -> Incomparable -> Bool

(/=) :: Incomparable -> Incomparable -> Bool

Data Incomparable Source # 
Instance details

Defined in CSL.TreePO

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Incomparable -> c Incomparable

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Incomparable

toConstr :: Incomparable -> Constr

dataTypeOf :: Incomparable -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Incomparable)

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Incomparable)

gmapT :: (forall b. Data b => b -> b) -> Incomparable -> Incomparable

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Incomparable -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Incomparable -> r

gmapQ :: (forall d. Data d => d -> u) -> Incomparable -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> Incomparable -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Incomparable -> m Incomparable

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Incomparable -> m Incomparable

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Incomparable -> m Incomparable

Show Incomparable Source # 
Instance details

Defined in CSL.TreePO

Methods

showsPrec :: Int -> Incomparable -> ShowS

show :: Incomparable -> String

showList :: [Incomparable] -> ShowS

Generic Incomparable 
Instance details

Defined in CSL.ATC_CSL

Associated Types

type Rep Incomparable :: Type -> Type

FromJSON Incomparable 
Instance details

Defined in CSL.ATC_CSL

Methods

parseJSON :: Value -> Parser Incomparable

parseJSONList :: Value -> Parser [Incomparable]

ToJSON Incomparable 
Instance details

Defined in CSL.ATC_CSL

Methods

toJSON :: Incomparable -> Value

toEncoding :: Incomparable -> Encoding

toJSONList :: [Incomparable] -> Value

toEncodingList :: [Incomparable] -> Encoding

ShATermConvertible Incomparable 
Instance details

Defined in CSL.ATC_CSL

Methods

toShATermAux :: ATermTable -> Incomparable -> IO (ATermTable, Int)

toShATermList' :: ATermTable -> [Incomparable] -> IO (ATermTable, Int)

fromShATermAux :: Int -> ATermTable -> (ATermTable, Incomparable)

fromShATermList' :: Int -> ATermTable -> (ATermTable, [Incomparable])

type Rep Incomparable 
Instance details

Defined in CSL.ATC_CSL

type Rep Incomparable = D1 ('MetaData "Incomparable" "CSL.TreePO" "main" 'False) (C1 ('MetaCons "Disjoint" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Overlap" 'PrefixI 'False) (U1 :: Type -> Type))

data SetOrdering Source #

Constructors

Comparable Ordering 
Incomparable Incomparable 

Instances

Instances details
Eq SetOrdering Source # 
Instance details

Defined in CSL.TreePO

Methods

(==) :: SetOrdering -> SetOrdering -> Bool

(/=) :: SetOrdering -> SetOrdering -> Bool

Data SetOrdering Source # 
Instance details

Defined in CSL.TreePO

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SetOrdering -> c SetOrdering

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SetOrdering

toConstr :: SetOrdering -> Constr

dataTypeOf :: SetOrdering -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SetOrdering)

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SetOrdering)

gmapT :: (forall b. Data b => b -> b) -> SetOrdering -> SetOrdering

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SetOrdering -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SetOrdering -> r

gmapQ :: (forall d. Data d => d -> u) -> SetOrdering -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> SetOrdering -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SetOrdering -> m SetOrdering

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SetOrdering -> m SetOrdering

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SetOrdering -> m SetOrdering

Show SetOrdering Source # 
Instance details

Defined in CSL.TreePO

Methods

showsPrec :: Int -> SetOrdering -> ShowS

show :: SetOrdering -> String

showList :: [SetOrdering] -> ShowS

Generic SetOrdering 
Instance details

Defined in CSL.ATC_CSL

Associated Types

type Rep SetOrdering :: Type -> Type

Methods

from :: SetOrdering -> Rep SetOrdering x

to :: Rep SetOrdering x -> SetOrdering

FromJSON SetOrdering 
Instance details

Defined in CSL.ATC_CSL

Methods

parseJSON :: Value -> Parser SetOrdering

parseJSONList :: Value -> Parser [SetOrdering]

ToJSON SetOrdering 
Instance details

Defined in CSL.ATC_CSL

Methods

toJSON :: SetOrdering -> Value

toEncoding :: SetOrdering -> Encoding

toJSONList :: [SetOrdering] -> Value

toEncodingList :: [SetOrdering] -> Encoding

ShATermConvertible SetOrdering 
Instance details

Defined in CSL.ATC_CSL

Methods

toShATermAux :: ATermTable -> SetOrdering -> IO (ATermTable, Int)

toShATermList' :: ATermTable -> [SetOrdering] -> IO (ATermTable, Int)

fromShATermAux :: Int -> ATermTable -> (ATermTable, SetOrdering)

fromShATermList' :: Int -> ATermTable -> (ATermTable, [SetOrdering])

type Rep SetOrdering 
Instance details

Defined in CSL.ATC_CSL

type Rep SetOrdering = D1 ('MetaData "SetOrdering" "CSL.TreePO" "main" 'False) (C1 ('MetaCons "Comparable" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ordering)) :+: C1 ('MetaCons "Incomparable" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Incomparable)))

data InfDev Source #

We represent Intervals with opened or closed end points over a linearly ordered type a as closed intervals over the type '(a, InfDev)', for infinitesimal deviation. - '(x, EpsLeft)' means an epsilon to the left of x - '(x, Zero)' means x - '(x, EpsRight)' means an epsilon to the right of x We have EpsLeft < Zero < EpsRight and the ordering of a lifts to the lexicographical ordering of '(a, InfDev)' which captures well our intended meaning. We inject the type a into the type '(a, InfDev)' by mapping x to '(x, Zero)'. The mapping of intrvals is as follows: A left opened interval starting at x becomes a left closed interval starting at '(x, EpsRight)'. We have: 'forall y > x. (y, _) > (x, EpsRight)', hence in particular '(y, Zero) > (x, EpsRight)' but also '(x, Zero) < (x, EpsRight)'

Analogously we represent a right opened one ending at y as a closed one ending at '(x, EpsLeft)'.

Constructors

EpsLeft 
Zero 
EpsRight 

Instances

Instances details
Eq InfDev Source # 
Instance details

Defined in CSL.TreePO

Methods

(==) :: InfDev -> InfDev -> Bool

(/=) :: InfDev -> InfDev -> Bool

Data InfDev Source # 
Instance details

Defined in CSL.TreePO

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> InfDev -> c InfDev

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c InfDev

toConstr :: InfDev -> Constr

dataTypeOf :: InfDev -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c InfDev)

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c InfDev)

gmapT :: (forall b. Data b => b -> b) -> InfDev -> InfDev

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> InfDev -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> InfDev -> r

gmapQ :: (forall d. Data d => d -> u) -> InfDev -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> InfDev -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> InfDev -> m InfDev

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> InfDev -> m InfDev

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> InfDev -> m InfDev

Ord InfDev Source # 
Instance details

Defined in CSL.TreePO

Methods

compare :: InfDev -> InfDev -> Ordering

(<) :: InfDev -> InfDev -> Bool

(<=) :: InfDev -> InfDev -> Bool

(>) :: InfDev -> InfDev -> Bool

(>=) :: InfDev -> InfDev -> Bool

max :: InfDev -> InfDev -> InfDev

min :: InfDev -> InfDev -> InfDev

Show InfDev Source # 
Instance details

Defined in CSL.TreePO

Methods

showsPrec :: Int -> InfDev -> ShowS

show :: InfDev -> String

showList :: [InfDev] -> ShowS

Generic InfDev 
Instance details

Defined in CSL.ATC_CSL

Associated Types

type Rep InfDev :: Type -> Type

Methods

from :: InfDev -> Rep InfDev x

to :: Rep InfDev x -> InfDev

FromJSON InfDev 
Instance details

Defined in CSL.ATC_CSL

Methods

parseJSON :: Value -> Parser InfDev

parseJSONList :: Value -> Parser [InfDev]

ToJSON InfDev 
Instance details

Defined in CSL.ATC_CSL

Methods

toJSON :: InfDev -> Value

toEncoding :: InfDev -> Encoding

toJSONList :: [InfDev] -> Value

toEncodingList :: [InfDev] -> Encoding

ShATermConvertible InfDev 
Instance details

Defined in CSL.ATC_CSL

Methods

toShATermAux :: ATermTable -> InfDev -> IO (ATermTable, Int)

toShATermList' :: ATermTable -> [InfDev] -> IO (ATermTable, Int)

fromShATermAux :: Int -> ATermTable -> (ATermTable, InfDev)

fromShATermList' :: Int -> ATermTable -> (ATermTable, [InfDev])

type Rep InfDev 
Instance details

Defined in CSL.ATC_CSL

type Rep InfDev = D1 ('MetaData "InfDev" "CSL.TreePO" "main" 'False) (C1 ('MetaCons "EpsLeft" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Zero" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "EpsRight" 'PrefixI 'False) (U1 :: Type -> Type)))

newtype CIType a Source #

Constructors

CIType (a, InfDev) 

Instances

Instances details
Eq a => Eq (CIType a) Source # 
Instance details

Defined in CSL.TreePO

Methods

(==) :: CIType a -> CIType a -> Bool

(/=) :: CIType a -> CIType a -> Bool

Data a => Data (CIType a) Source # 
Instance details

Defined in CSL.TreePO

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CIType a -> c (CIType a)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CIType a)

toConstr :: CIType a -> Constr

dataTypeOf :: CIType a -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CIType a))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CIType a))

gmapT :: (forall b. Data b => b -> b) -> CIType a -> CIType a

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CIType a -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CIType a -> r

gmapQ :: (forall d. Data d => d -> u) -> CIType a -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> CIType a -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CIType a -> m (CIType a)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CIType a -> m (CIType a)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CIType a -> m (CIType a)

Ord a => Ord (CIType a) Source #

This type with the given ordering is to represent opened/closed intervals over a as closed intervals over '(a, InfDev)'

Instance details

Defined in CSL.TreePO

Methods

compare :: CIType a -> CIType a -> Ordering

(<) :: CIType a -> CIType a -> Bool

(<=) :: CIType a -> CIType a -> Bool

(>) :: CIType a -> CIType a -> Bool

(>=) :: CIType a -> CIType a -> Bool

max :: CIType a -> CIType a -> CIType a

min :: CIType a -> CIType a -> CIType a

Show a => Show (CIType a) Source # 
Instance details

Defined in CSL.TreePO

Methods

showsPrec :: Int -> CIType a -> ShowS

show :: CIType a -> String

showList :: [CIType a] -> ShowS

Generic (CIType a) 
Instance details

Defined in CSL.ATC_CSL

Associated Types

type Rep (CIType a) :: Type -> Type

Methods

from :: CIType a -> Rep (CIType a) x

to :: Rep (CIType a) x -> CIType a

FromJSON a => FromJSON (CIType a) 
Instance details

Defined in CSL.ATC_CSL

Methods

parseJSON :: Value -> Parser (CIType a)

parseJSONList :: Value -> Parser [CIType a]

ToJSON a => ToJSON (CIType a) 
Instance details

Defined in CSL.ATC_CSL

Methods

toJSON :: CIType a -> Value

toEncoding :: CIType a -> Encoding

toJSONList :: [CIType a] -> Value

toEncodingList :: [CIType a] -> Encoding

ShATermConvertible a => ShATermConvertible (CIType a) 
Instance details

Defined in CSL.ATC_CSL

Methods

toShATermAux :: ATermTable -> CIType a -> IO (ATermTable, Int)

toShATermList' :: ATermTable -> [CIType a] -> IO (ATermTable, Int)

fromShATermAux :: Int -> ATermTable -> (ATermTable, CIType a)

fromShATermList' :: Int -> ATermTable -> (ATermTable, [CIType a])

type Rep (CIType a) 
Instance details

Defined in CSL.ATC_CSL

type Rep (CIType a) = D1 ('MetaData "CIType" "CSL.TreePO" "main" 'True) (C1 ('MetaCons "CIType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (a, InfDev))))

data SetOrInterval a Source #

A finite set or an interval. True = closed, False = opened interval border.

Constructors

Set (Set a) 
IntVal (a, Bool) (a, Bool) 

Instances

Instances details
Eq a => Eq (SetOrInterval a) Source # 
Instance details

Defined in CSL.TreePO

Methods

(==) :: SetOrInterval a -> SetOrInterval a -> Bool

(/=) :: SetOrInterval a -> SetOrInterval a -> Bool

(Data a, Ord a) => Data (SetOrInterval a) Source # 
Instance details

Defined in CSL.TreePO

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SetOrInterval a -> c (SetOrInterval a)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (SetOrInterval a)

toConstr :: SetOrInterval a -> Constr

dataTypeOf :: SetOrInterval a -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (SetOrInterval a))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (SetOrInterval a))

gmapT :: (forall b. Data b => b -> b) -> SetOrInterval a -> SetOrInterval a

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SetOrInterval a -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SetOrInterval a -> r

gmapQ :: (forall d. Data d => d -> u) -> SetOrInterval a -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> SetOrInterval a -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SetOrInterval a -> m (SetOrInterval a)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SetOrInterval a -> m (SetOrInterval a)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SetOrInterval a -> m (SetOrInterval a)

Ord a => Ord (SetOrInterval a) Source # 
Instance details

Defined in CSL.TreePO

Show a => Show (SetOrInterval a) Source # 
Instance details

Defined in CSL.TreePO

Methods

showsPrec :: Int -> SetOrInterval a -> ShowS

show :: SetOrInterval a -> String

showList :: [SetOrInterval a] -> ShowS

Generic (SetOrInterval a) 
Instance details

Defined in CSL.ATC_CSL

Associated Types

type Rep (SetOrInterval a) :: Type -> Type

Methods

from :: SetOrInterval a -> Rep (SetOrInterval a) x

to :: Rep (SetOrInterval a) x -> SetOrInterval a

(Ord a, FromJSON a) => FromJSON (SetOrInterval a) 
Instance details

Defined in CSL.ATC_CSL

Methods

parseJSON :: Value -> Parser (SetOrInterval a)

parseJSONList :: Value -> Parser [SetOrInterval a]

(Ord a, ToJSON a) => ToJSON (SetOrInterval a) 
Instance details

Defined in CSL.ATC_CSL

Methods

toJSON :: SetOrInterval a -> Value

toEncoding :: SetOrInterval a -> Encoding

toJSONList :: [SetOrInterval a] -> Value

toEncodingList :: [SetOrInterval a] -> Encoding

(Ord a, ShATermConvertible a) => ShATermConvertible (SetOrInterval a) 
Instance details

Defined in CSL.ATC_CSL

Methods

toShATermAux :: ATermTable -> SetOrInterval a -> IO (ATermTable, Int)

toShATermList' :: ATermTable -> [SetOrInterval a] -> IO (ATermTable, Int)

fromShATermAux :: Int -> ATermTable -> (ATermTable, SetOrInterval a)

fromShATermList' :: Int -> ATermTable -> (ATermTable, [SetOrInterval a])

(Ord a, Pretty a) => Pretty (SetOrInterval a) Source # 
Instance details

Defined in CSL.Print_AS

type Rep (SetOrInterval a) 
Instance details

Defined in CSL.ATC_CSL

type Rep (SetOrInterval a) = D1 ('MetaData "SetOrInterval" "CSL.TreePO" "main" 'False) (C1 ('MetaCons "Set" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Set a))) :+: C1 ('MetaCons "IntVal" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (a, Bool)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (a, Bool))))

data ClosedInterval a Source #

A closed interval

Constructors

ClosedInterval a a 

Instances

Instances details
Eq a => Eq (ClosedInterval a) Source # 
Instance details

Defined in CSL.TreePO

Methods

(==) :: ClosedInterval a -> ClosedInterval a -> Bool

(/=) :: ClosedInterval a -> ClosedInterval a -> Bool

Data a => Data (ClosedInterval a) Source # 
Instance details

Defined in CSL.TreePO

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ClosedInterval a -> c (ClosedInterval a)

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ClosedInterval a)

toConstr :: ClosedInterval a -> Constr

dataTypeOf :: ClosedInterval a -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ClosedInterval a))

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ClosedInterval a))

gmapT :: (forall b. Data b => b -> b) -> ClosedInterval a -> ClosedInterval a

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ClosedInterval a -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ClosedInterval a -> r

gmapQ :: (forall d. Data d => d -> u) -> ClosedInterval a -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> ClosedInterval a -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ClosedInterval a -> m (ClosedInterval a)

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ClosedInterval a -> m (ClosedInterval a)

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ClosedInterval a -> m (ClosedInterval a)

Ord a => Ord (ClosedInterval a) Source # 
Instance details

Defined in CSL.TreePO

Show a => Show (ClosedInterval a) Source # 
Instance details

Defined in CSL.TreePO

Methods

showsPrec :: Int -> ClosedInterval a -> ShowS

show :: ClosedInterval a -> String

showList :: [ClosedInterval a] -> ShowS

Generic (ClosedInterval a) 
Instance details

Defined in CSL.ATC_CSL

Associated Types

type Rep (ClosedInterval a) :: Type -> Type

Methods

from :: ClosedInterval a -> Rep (ClosedInterval a) x

to :: Rep (ClosedInterval a) x -> ClosedInterval a

FromJSON a => FromJSON (ClosedInterval a) 
Instance details

Defined in CSL.ATC_CSL

Methods

parseJSON :: Value -> Parser (ClosedInterval a)

parseJSONList :: Value -> Parser [ClosedInterval a]

ToJSON a => ToJSON (ClosedInterval a) 
Instance details

Defined in CSL.ATC_CSL

Methods

toJSON :: ClosedInterval a -> Value

toEncoding :: ClosedInterval a -> Encoding

toJSONList :: [ClosedInterval a] -> Value

toEncodingList :: [ClosedInterval a] -> Encoding

ShATermConvertible a => ShATermConvertible (ClosedInterval a) 
Instance details

Defined in CSL.ATC_CSL

Methods

toShATermAux :: ATermTable -> ClosedInterval a -> IO (ATermTable, Int)

toShATermList' :: ATermTable -> [ClosedInterval a] -> IO (ATermTable, Int)

fromShATermAux :: Int -> ATermTable -> (ATermTable, ClosedInterval a)

fromShATermList' :: Int -> ATermTable -> (ATermTable, [ClosedInterval a])

Pretty a => Pretty (ClosedInterval a) Source # 
Instance details

Defined in CSL.Print_AS

type Rep (ClosedInterval a) 
Instance details

Defined in CSL.ATC_CSL

type Rep (ClosedInterval a) = D1 ('MetaData "ClosedInterval" "CSL.TreePO" "main" 'False) (C1 ('MetaCons "ClosedInterval" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

data InfInt Source #

Infinite integers = integers augmented by -Infty and +Infty

Constructors

PosInf 
NegInf 
FinInt Integer 

Instances

Instances details
Eq InfInt Source # 
Instance details

Defined in CSL.TreePO

Methods

(==) :: InfInt -> InfInt -> Bool

(/=) :: InfInt -> InfInt -> Bool

Data InfInt Source # 
Instance details

Defined in CSL.TreePO

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> InfInt -> c InfInt

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c InfInt

toConstr :: InfInt -> Constr

dataTypeOf :: InfInt -> DataType

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c InfInt)

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c InfInt)

gmapT :: (forall b. Data b => b -> b) -> InfInt -> InfInt

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> InfInt -> r

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> InfInt -> r

gmapQ :: (forall d. Data d => d -> u) -> InfInt -> [u]

gmapQi :: Int -> (forall d. Data d => d -> u) -> InfInt -> u

gmapM :: Monad m => (forall d. Data d => d -> m d) -> InfInt -> m InfInt

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> InfInt -> m InfInt

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> InfInt -> m InfInt

Ord InfInt Source # 
Instance details

Defined in CSL.TreePO

Methods

compare :: InfInt -> InfInt -> Ordering

(<) :: InfInt -> InfInt -> Bool

(<=) :: InfInt -> InfInt -> Bool

(>) :: InfInt -> InfInt -> Bool

(>=) :: InfInt -> InfInt -> Bool

max :: InfInt -> InfInt -> InfInt

min :: InfInt -> InfInt -> InfInt

Show InfInt Source # 
Instance details

Defined in CSL.TreePO

Methods

showsPrec :: Int -> InfInt -> ShowS

show :: InfInt -> String

showList :: [InfInt] -> ShowS

Generic InfInt 
Instance details

Defined in CSL.ATC_CSL

Associated Types

type Rep InfInt :: Type -> Type

Methods

from :: InfInt -> Rep InfInt x

to :: Rep InfInt x -> InfInt

Discrete InfInt Source # 
Instance details

Defined in CSL.TreePO

Methods

nextA :: InfInt -> InfInt Source #

prevA :: InfInt -> InfInt Source #

intsizeA :: InfInt -> InfInt -> Maybe Integer Source #

FromJSON InfInt 
Instance details

Defined in CSL.ATC_CSL

Methods

parseJSON :: Value -> Parser InfInt

parseJSONList :: Value -> Parser [InfInt]

ToJSON InfInt 
Instance details

Defined in CSL.ATC_CSL

Methods

toJSON :: InfInt -> Value

toEncoding :: InfInt -> Encoding

toJSONList :: [InfInt] -> Value

toEncodingList :: [InfInt] -> Encoding

ShATermConvertible InfInt 
Instance details

Defined in CSL.ATC_CSL

Methods

toShATermAux :: ATermTable -> InfInt -> IO (ATermTable, Int)

toShATermList' :: ATermTable -> [InfInt] -> IO (ATermTable, Int)

fromShATermAux :: Int -> ATermTable -> (ATermTable, InfInt)

fromShATermList' :: Int -> ATermTable -> (ATermTable, [InfInt])

Pretty InfInt Source # 
Instance details

Defined in CSL.Print_AS

type Rep InfInt 
Instance details

Defined in CSL.ATC_CSL

type Rep InfInt = D1 ('MetaData "InfInt" "CSL.TreePO" "main" 'False) (C1 ('MetaCons "PosInf" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "NegInf" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "FinInt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer))))

class Continuous a Source #

Instances

Instances details
Continuous GroundConstant Source # 
Instance details

Defined in CSL.AS_BASIC_CSL

class Discrete a where Source #

Methods

nextA :: a -> a Source #

prevA :: a -> a Source #

intsizeA :: a -> a -> Maybe Integer Source #

Instances

Instances details
Discrete InfInt Source # 
Instance details

Defined in CSL.TreePO

Methods

nextA :: InfInt -> InfInt Source #

prevA :: InfInt -> InfInt Source #

intsizeA :: InfInt -> InfInt -> Maybe Integer Source #

cmpClosedInts Source #

Arguments

:: Ord a 
=> ClosedInterval a
l1, r1
-> ClosedInterval a
l2, r2
-> SetOrdering 

Compares closed intervals [l1, r1] and [l2, r2]. Assumes non-singular intervals, i.e., l1 < r1 and l2 < r2. Works only for linearly ordered types.

membSoID :: (Discrete a, Ord a) => a -> SetOrInterval a -> Bool Source #

Membership in SetOrInterval

nullSoID :: (Discrete a, Ord a) => SetOrInterval a -> Bool Source #

Checks if the set is empty.

toSingularD :: (Discrete a, Ord a) => SetOrInterval a -> Maybe a Source #

If the set is singular, i.e., consists only from one point, then we return this point. Reports error on empty SoI's.

setToClosedIntD :: (Discrete a, Ord a) => SetOrInterval a -> ClosedInterval a Source #

Transforms a SetOrInterval to a closed representation

cmpSoIsD :: (Discrete a, Ord a) => SetOrInterval a -> SetOrInterval a -> SetOrdering Source #

Compare sets over discrete types

cmpSoIsExD :: (Discrete a, Ord a) => SetOrInterval a -> SetOrInterval a -> SetOrdering Source #

Compare sets helper function which only works on regular (non-singular) sets

membSoI :: Ord a => a -> SetOrInterval a -> Bool Source #

Membership in SetOrInterval

nullSoI :: (Continuous a, Ord a) => SetOrInterval a -> Bool Source #

Checks if the set is empty. Only for continuous types.

toSingular :: (Continuous a, Ord a) => SetOrInterval a -> Maybe a Source #

If the set is singular, i.e., consists only from one point, then we return this point. Reports error on empty SoI's. Only for continuous types.

setToClosedInt :: Ord a => SetOrInterval a -> ClosedInterval (CIType a) Source #

Transforms a SetOrInterval to a closed representation Only for continuous types.

cmpSoIs :: (Continuous a, Ord a) => SetOrInterval a -> SetOrInterval a -> SetOrdering Source #

Compare sets over continuous types

cmpSoIsEx :: Ord a => SetOrInterval a -> SetOrInterval a -> SetOrdering Source #

Compare sets helper function which only works on regular (non-singular) sets

swapCompare :: Ordering -> Ordering Source #

combineCmp :: SetOrdering -> SetOrdering -> SetOrdering Source #

We combine the comparison outcome of the individual parameters with the following (symmetrical => commutative) table:

    \ | > < = O D
    -------------
    > | > O > O D
    < |   < < O D
    = |     = O D
    O |       O D
    D |         D

    , where

    >       | <      | =     | O       | D
    ---------------------------------------------
    RightOf | LeftOf | Equal | Overlap | Disjoint

The purpose of this table is to use it for cartesian products as follows

Let

A', A'' subset A B', B'' subset B

In order to get the comparison result for A' x B' and A'' x B'' we compare

A' and A'' as well as B' and B'' and combine the results with the above table.

Note that for empty sets the comparable results ,,= are preferred over the disjoint result.