expressions-0.1.9: Expressions and Formulae a la carte

Copyright(C) 2017-18 Jakub Daniel
LicenseBSD-style (see the file LICENSE)
MaintainerJakub Daniel <jakub.daniel@protonmail.com>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Data.Expression

Description

Usage:

You can build expressions in predefined languages (QFLogic, QFLia, QFALia, Lia, ALia) using the smart constructors such as var, and, or, not, forall, exists (or operators .&., .|., .->., .<-., .<->.) or you can define your own sorted language as a fixpoint (IFix) of a sum (:+:) of indexed functors (IFunctor).

Synopsis

Documentation

data family Sing (a :: k) :: * #

The singleton kind-indexed data family.

Instances
data Sing (z :: Bool) 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (z :: Bool) where
data Sing (z :: Ordering) 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (z :: Ordering) where
data Sing (n :: Nat) 
Instance details

Defined in Data.Singletons.TypeLits.Internal

data Sing (n :: Nat) where
data Sing (n :: Symbol) 
Instance details

Defined in Data.Singletons.TypeLits.Internal

data Sing (n :: Symbol) where
data Sing (z :: ()) 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (z :: ()) where
data Sing (z :: Void) 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (z :: Void)
data Sing (z :: Sort) # 
Instance details

Defined in Data.Expression.Sort

data Sing (z :: [a]) 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (z :: [a]) where
data Sing (z :: Maybe a) 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (z :: Maybe a) where
data Sing (z :: NonEmpty a) 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (z :: NonEmpty a) where
data Sing (z :: Either a b) 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (z :: Either a b) where
data Sing (z :: (a, b)) 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (z :: (a, b)) where
data Sing (f :: k1 ~> k2) 
Instance details

Defined in Data.Singletons.Internal

data Sing (f :: k1 ~> k2) = SLambda {}
data Sing (z :: (a, b, c)) 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (z :: (a, b, c)) where
data Sing (z :: (a, b, c, d)) 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (z :: (a, b, c, d)) where
data Sing (z :: (a, b, c, d, e)) 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (z :: (a, b, c, d, e)) where
data Sing (z :: (a, b, c, d, e, f)) 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (z :: (a, b, c, d, e, f)) where
data Sing (z :: (a, b, c, d, e, f, g)) 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (z :: (a, b, c, d, e, f, g)) where

data Sort Source #

A universe of recognized sorts

Constructors

BooleanSort

booleans (true, false)

IntegralSort

integers (..., -1, 0, 1, ...)

ArraySort Sort Sort

arrays indexed by index sort, containing elements of element sort

Instances
Eq Sort Source # 
Instance details

Defined in Data.Expression.Sort

Methods

(==) :: Sort -> Sort -> Bool #

(/=) :: Sort -> Sort -> Bool #

Show Sort Source # 
Instance details

Defined in Data.Expression.Sort

Methods

showsPrec :: Int -> Sort -> ShowS #

show :: Sort -> String #

showList :: [Sort] -> ShowS #

SDecide Sort => SDecide Sort Source # 
Instance details

Defined in Data.Expression.Sort

Methods

(%~) :: Sing a -> Sing b -> Decision (a :~: b) #

SingKind Sort Source # 
Instance details

Defined in Data.Expression.Sort

Associated Types

type Demote Sort = (r :: *) #

SingI BooleanSort Source # 
Instance details

Defined in Data.Expression.Sort

SingI IntegralSort Source # 
Instance details

Defined in Data.Expression.Sort

IEq1 IfThenElseF Source # 
Instance details

Defined in Data.Expression.IfThenElse

Methods

ieq1 :: IEq a => IfThenElseF a j -> IfThenElseF a j -> Bool Source #

IEq1 ArrayF Source # 
Instance details

Defined in Data.Expression.Array

Methods

ieq1 :: IEq a => ArrayF a j -> ArrayF a j -> Bool Source #

IEq1 ArithmeticF Source # 
Instance details

Defined in Data.Expression.Arithmetic

Methods

ieq1 :: IEq a => ArithmeticF a j -> ArithmeticF a j -> Bool Source #

IEq1 NegationF Source # 
Instance details

Defined in Data.Expression

Methods

ieq1 :: IEq a => NegationF a j -> NegationF a j -> Bool Source #

IEq1 DisjunctionF Source # 
Instance details

Defined in Data.Expression

Methods

ieq1 :: IEq a => DisjunctionF a j -> DisjunctionF a j -> Bool Source #

IEq1 ConjunctionF Source # 
Instance details

Defined in Data.Expression

Methods

ieq1 :: IEq a => ConjunctionF a j -> ConjunctionF a j -> Bool Source #

IFoldable IfThenElseF Source # 
Instance details

Defined in Data.Expression.IfThenElse

Methods

ifold :: Monoid m => IfThenElseF (Const m) i' -> Const m i' Source #

IFoldable ArrayF Source # 
Instance details

Defined in Data.Expression.Array

Methods

ifold :: Monoid m => ArrayF (Const m) i' -> Const m i' Source #

IFoldable ArithmeticF Source # 
Instance details

Defined in Data.Expression.Arithmetic

Methods

ifold :: Monoid m => ArithmeticF (Const m) i' -> Const m i' Source #

IFoldable NegationF Source # 
Instance details

Defined in Data.Expression

Methods

ifold :: Monoid m => NegationF (Const m) i' -> Const m i' Source #

IFoldable DisjunctionF Source # 
Instance details

Defined in Data.Expression

Methods

ifold :: Monoid m => DisjunctionF (Const m) i' -> Const m i' Source #

IFoldable ConjunctionF Source # 
Instance details

Defined in Data.Expression

Methods

ifold :: Monoid m => ConjunctionF (Const m) i' -> Const m i' Source #

IFunctor IfThenElseF Source # 
Instance details

Defined in Data.Expression.IfThenElse

Methods

imap :: (forall (i' :: i). a i' -> b i') -> forall (i' :: i). IfThenElseF a i' -> IfThenElseF b i' Source #

index :: IfThenElseF a i' -> Sing i' Source #

IFunctor ArrayF Source # 
Instance details

Defined in Data.Expression.Array

Methods

imap :: (forall (i' :: i). a i' -> b i') -> forall (i' :: i). ArrayF a i' -> ArrayF b i' Source #

index :: ArrayF a i' -> Sing i' Source #

IFunctor ArithmeticF Source # 
Instance details

Defined in Data.Expression.Arithmetic

Methods

imap :: (forall (i' :: i). a i' -> b i') -> forall (i' :: i). ArithmeticF a i' -> ArithmeticF b i' Source #

index :: ArithmeticF a i' -> Sing i' Source #

IFunctor NegationF Source # 
Instance details

Defined in Data.Expression

Methods

imap :: (forall (i' :: i). a i' -> b i') -> forall (i' :: i). NegationF a i' -> NegationF b i' Source #

index :: NegationF a i' -> Sing i' Source #

IFunctor DisjunctionF Source # 
Instance details

Defined in Data.Expression

Methods

imap :: (forall (i' :: i). a i' -> b i') -> forall (i' :: i). DisjunctionF a i' -> DisjunctionF b i' Source #

index :: DisjunctionF a i' -> Sing i' Source #

IFunctor ConjunctionF Source # 
Instance details

Defined in Data.Expression

Methods

imap :: (forall (i' :: i). a i' -> b i') -> forall (i' :: i). ConjunctionF a i' -> ConjunctionF b i' Source #

index :: ConjunctionF a i' -> Sing i' Source #

ITraversable IfThenElseF Source # 
Instance details

Defined in Data.Expression.IfThenElse

Methods

itraverse :: Applicative f => (forall (i' :: i). a i' -> f (b i')) -> forall (i' :: i). IfThenElseF a i' -> f (IfThenElseF b i') Source #

ITraversable ArrayF Source # 
Instance details

Defined in Data.Expression.Array

Methods

itraverse :: Applicative f => (forall (i' :: i). a i' -> f (b i')) -> forall (i' :: i). ArrayF a i' -> f (ArrayF b i') Source #

ITraversable ArithmeticF Source # 
Instance details

Defined in Data.Expression.Arithmetic

Methods

itraverse :: Applicative f => (forall (i' :: i). a i' -> f (b i')) -> forall (i' :: i). ArithmeticF a i' -> f (ArithmeticF b i') Source #

ITraversable NegationF Source # 
Instance details

Defined in Data.Expression

Methods

itraverse :: Applicative f => (forall (i' :: i). a i' -> f (b i')) -> forall (i' :: i). NegationF a i' -> f (NegationF b i') Source #

ITraversable DisjunctionF Source # 
Instance details

Defined in Data.Expression

Methods

itraverse :: Applicative f => (forall (i' :: i). a i' -> f (b i')) -> forall (i' :: i). DisjunctionF a i' -> f (DisjunctionF b i') Source #

ITraversable ConjunctionF Source # 
Instance details

Defined in Data.Expression

Methods

itraverse :: Applicative f => (forall (i' :: i). a i' -> f (b i')) -> forall (i' :: i). ConjunctionF a i' -> f (ConjunctionF b i') Source #

IShow IfThenElseF Source # 
Instance details

Defined in Data.Expression.IfThenElse

IShow ArrayF Source # 
Instance details

Defined in Data.Expression.Array

IShow ArithmeticF Source # 
Instance details

Defined in Data.Expression.Arithmetic

IShow NegationF Source # 
Instance details

Defined in Data.Expression

IShow DisjunctionF Source # 
Instance details

Defined in Data.Expression

IShow ConjunctionF Source # 
Instance details

Defined in Data.Expression

IShow (EqualityF :: (k -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression.Equality

IShow (VarF :: (k -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression

Methods

ishow :: VarF (Const String) i -> Const String i Source #

IShow (ExistentialF v :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression

IShow (UniversalF v :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression

IEq1 (EqualityF :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression.Equality

Methods

ieq1 :: IEq a => EqualityF a j -> EqualityF a j -> Bool Source #

IEq1 (ExistentialF v :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression

Methods

ieq1 :: IEq a => ExistentialF v a j -> ExistentialF v a j -> Bool Source #

IEq1 (UniversalF v :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression

Methods

ieq1 :: IEq a => UniversalF v a j -> UniversalF v a j -> Bool Source #

IEq1 (VarF :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression

Methods

ieq1 :: IEq a => VarF a j -> VarF a j -> Bool Source #

IFoldable (EqualityF :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression.Equality

Methods

ifold :: Monoid m => EqualityF (Const m) i' -> Const m i' Source #

IFoldable (ExistentialF v :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression

Methods

ifold :: Monoid m => ExistentialF v (Const m) i' -> Const m i' Source #

IFoldable (UniversalF v :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression

Methods

ifold :: Monoid m => UniversalF v (Const m) i' -> Const m i' Source #

IFoldable (VarF :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression

Methods

ifold :: Monoid m => VarF (Const m) i' -> Const m i' Source #

IFunctor (EqualityF :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression.Equality

Methods

imap :: (forall (i' :: i). a i' -> b i') -> forall (i' :: i). EqualityF a i' -> EqualityF b i' Source #

index :: EqualityF a i' -> Sing i' Source #

IFunctor (ExistentialF v :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression

Methods

imap :: (forall (i' :: i). a i' -> b i') -> forall (i' :: i). ExistentialF v a i' -> ExistentialF v b i' Source #

index :: ExistentialF v a i' -> Sing i' Source #

IFunctor (UniversalF v :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression

Methods

imap :: (forall (i' :: i). a i' -> b i') -> forall (i' :: i). UniversalF v a i' -> UniversalF v b i' Source #

index :: UniversalF v a i' -> Sing i' Source #

IFunctor (VarF :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression

Methods

imap :: (forall (i' :: i). a i' -> b i') -> forall (i' :: i). VarF a i' -> VarF b i' Source #

index :: VarF a i' -> Sing i' Source #

ITraversable (EqualityF :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression.Equality

Methods

itraverse :: Applicative f => (forall (i' :: i). a i' -> f (b i')) -> forall (i' :: i). EqualityF a i' -> f (EqualityF b i') Source #

ITraversable (ExistentialF v :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression

Methods

itraverse :: Applicative f => (forall (i' :: i). a i' -> f (b i')) -> forall (i' :: i). ExistentialF v a i' -> f (ExistentialF v b i') Source #

ITraversable (UniversalF v :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression

Methods

itraverse :: Applicative f => (forall (i' :: i). a i' -> f (b i')) -> forall (i' :: i). UniversalF v a i' -> f (UniversalF v b i') Source #

ITraversable (VarF :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression

Methods

itraverse :: Applicative f => (forall (i' :: i). a i' -> f (b i')) -> forall (i' :: i). VarF a i' -> f (VarF b i') Source #

MaybeQuantified (ExistentialF v :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression

MaybeQuantified (UniversalF v :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression

MaybeQuantified (VarF :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression

(SingI n1, SingI n2) => SingI (ArraySort n1 n2 :: Sort) Source # 
Instance details

Defined in Data.Expression.Sort

Methods

sing :: Sing (ArraySort n1 n2) #

JoinSemiLattice (ALia BooleanSort) # 
Instance details

Defined in Data.Expression

JoinSemiLattice (QFALia BooleanSort) # 
Instance details

Defined in Data.Expression

JoinSemiLattice (Lia BooleanSort) # 
Instance details

Defined in Data.Expression

JoinSemiLattice (QFLia BooleanSort) # 
Instance details

Defined in Data.Expression

JoinSemiLattice (QFLogic BooleanSort) # 
Instance details

Defined in Data.Expression

MeetSemiLattice (ALia BooleanSort) # 
Instance details

Defined in Data.Expression

MeetSemiLattice (QFALia BooleanSort) # 
Instance details

Defined in Data.Expression

MeetSemiLattice (Lia BooleanSort) # 
Instance details

Defined in Data.Expression

MeetSemiLattice (QFLia BooleanSort) # 
Instance details

Defined in Data.Expression

MeetSemiLattice (QFLogic BooleanSort) # 
Instance details

Defined in Data.Expression

Lattice (ALia BooleanSort) # 
Instance details

Defined in Data.Expression

Lattice (QFALia BooleanSort) # 
Instance details

Defined in Data.Expression

Lattice (Lia BooleanSort) # 
Instance details

Defined in Data.Expression

Lattice (QFLia BooleanSort) # 
Instance details

Defined in Data.Expression

Lattice (QFLogic BooleanSort) # 
Instance details

Defined in Data.Expression

BoundedJoinSemiLattice (ALia BooleanSort) # 
Instance details

Defined in Data.Expression

BoundedJoinSemiLattice (QFALia BooleanSort) # 
Instance details

Defined in Data.Expression

BoundedJoinSemiLattice (Lia BooleanSort) # 
Instance details

Defined in Data.Expression

BoundedJoinSemiLattice (QFLia BooleanSort) # 
Instance details

Defined in Data.Expression

BoundedJoinSemiLattice (QFLogic BooleanSort) # 
Instance details

Defined in Data.Expression

BoundedMeetSemiLattice (ALia BooleanSort) # 
Instance details

Defined in Data.Expression

Methods

top :: ALia BooleanSort #

BoundedMeetSemiLattice (QFALia BooleanSort) # 
Instance details

Defined in Data.Expression

BoundedMeetSemiLattice (Lia BooleanSort) # 
Instance details

Defined in Data.Expression

Methods

top :: Lia BooleanSort #

BoundedMeetSemiLattice (QFLia BooleanSort) # 
Instance details

Defined in Data.Expression

BoundedMeetSemiLattice (QFLogic BooleanSort) # 
Instance details

Defined in Data.Expression

BoundedLattice (ALia BooleanSort) # 
Instance details

Defined in Data.Expression

BoundedLattice (QFALia BooleanSort) # 
Instance details

Defined in Data.Expression

BoundedLattice (Lia BooleanSort) # 
Instance details

Defined in Data.Expression

BoundedLattice (QFLia BooleanSort) # 
Instance details

Defined in Data.Expression

BoundedLattice (QFLogic BooleanSort) # 
Instance details

Defined in Data.Expression

ComplementedLattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

ComplementedLattice (QFALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

ComplementedLattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

ComplementedLattice (QFLia BooleanSort) Source # 
Instance details

Defined in Data.Expression

ComplementedLattice (QFLogic BooleanSort) Source # 
Instance details

Defined in Data.Expression

IfThenElseF :<: f => Parseable IfThenElseF f Source # 
Instance details

Defined in Data.Expression.IfThenElse

ArrayF :<: f => Parseable ArrayF f Source # 
Instance details

Defined in Data.Expression.Array

ArithmeticF :<: f => Parseable ArithmeticF f Source # 
Instance details

Defined in Data.Expression.Arithmetic

NegationF :<: f => Parseable NegationF f Source # 
Instance details

Defined in Data.Expression

DisjunctionF :<: f => Parseable DisjunctionF f Source # 
Instance details

Defined in Data.Expression

ConjunctionF :<: f => Parseable ConjunctionF f Source # 
Instance details

Defined in Data.Expression

(EqualityF :: (Sort -> *) -> Sort -> *) :<: f => Parseable (EqualityF :: (k -> *) -> Sort -> *) f Source # 
Instance details

Defined in Data.Expression.Equality

(ExistentialF v :<: f, SingI v) => Parseable (ExistentialF v :: (Sort -> *) -> Sort -> *) f Source # 
Instance details

Defined in Data.Expression

(UniversalF v :<: f, SingI v) => Parseable (UniversalF v :: (Sort -> *) -> Sort -> *) f Source # 
Instance details

Defined in Data.Expression

(VarF :: (Sort -> *) -> Sort -> *) :<: f => Parseable (VarF :: k -> Sort -> *) f Source # 
Instance details

Defined in Data.Expression

data Sing (z :: Sort) Source # 
Instance details

Defined in Data.Expression.Sort

type Demote Sort Source # 
Instance details

Defined in Data.Expression.Sort

data DynamicallySorted (f :: (Sort -> *) -> Sort -> *) where Source #

An expression of some sort (obtained for example during parsing)

Constructors

DynamicallySorted :: forall (s :: Sort) f. Sing s -> IFix f s -> DynamicallySorted f 

data DynamicSort where Source #

Some sort (obtained for example during parsing)

Constructors

DynamicSort :: forall (s :: Sort). Sing s -> DynamicSort 
Instances
Eq DynamicSort Source # 
Instance details

Defined in Data.Expression.Sort

toStaticSort :: forall (s :: Sort). SingI s => DynamicSort -> Maybe (Sing s) Source #

Tries to convert some sort (DynamicSort) to a requested sort.

toDynamicallySorted :: forall f (s :: Sort). SingI s => IFix f s -> DynamicallySorted f Source #

Converts a statically sorted expression to a dynamically sorted one.

toStaticallySorted :: forall f (s :: Sort). SingI s => DynamicallySorted f -> Maybe (IFix f s) Source #

Tries to convert an expression (DynamicallySorted) of some sort to an expression of requested sort. Performs no conversions.

parseSort :: Parser DynamicSort Source #

Parser that accepts sort definitions such as bool, int, array int int, array int (array ...).

type QFLogicF = EqualityF :+: (ConjunctionF :+: (DisjunctionF :+: (NegationF :+: VarF))) Source #

A functor representing propositional logic embedded in first order logic (quantifier-free, boolean variables aka propositions, logical connectives and, or, not, equality of propositions)

type QFLiaF = ArithmeticF :+: (IfThenElseF :+: QFLogicF) Source #

A functor representing the language of quantifier-free linear integer arithmetic theory in first order logic (integer constants, integer variables, addition, multiplication, divisibility, ordering)

type LiaF = ExistentialF BooleanSort :+: (ExistentialF IntegralSort :+: (UniversalF BooleanSort :+: (UniversalF IntegralSort :+: QFLiaF))) Source #

A functor much like QFLiaF with quantifiers over booleans and integers

type QFALiaF = ArrayF :+: QFLiaF Source #

A functor representing the language of quantifier-free linear integer arithmetic and array theories in first order logic (much like QFLiaF with additional array variables, select, and store)

type ALiaF = ExistentialF BooleanSort :+: (ExistentialF IntegralSort :+: (UniversalF BooleanSort :+: (UniversalF IntegralSort :+: QFALiaF))) Source #

A functor much like QFALiaF with quantifiers over booleans and integers

type Var = IFix VarF Source #

A language consisting solely of variables (useful for listing variables outside of any particular context, such as bound variables of quantified formula)

type QFLogic = IFix QFLogicF Source #

A language obtained as fixpoint of QFLogicF

type QFLia = IFix QFLiaF Source #

A language obtained as fixpoint of QFLiaF

type Lia = IFix LiaF Source #

A language obtained as fixpoint of LiaF

type QFALia = IFix QFALiaF Source #

A language obtained as fixpoint of QFALiaF

type ALia = IFix ALiaF Source #

A language obtained as fixpoint of ALiaF

class BoundedLattice a => ComplementedLattice a where Source #

Bounded lattices that support complementing elements

complement . complement = id

Minimal complete definition

complement

Methods

complement :: a -> a Source #

type VariableName = String Source #

Type of names assigned to variables

data VarF a (s :: Sort) where Source #

A functor representing a sorted variable, each variable is identified by its name and sort

Constructors

Var :: VariableName -> Sing s -> VarF a s 
Instances
IShow (VarF :: (k -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression

Methods

ishow :: VarF (Const String) i -> Const String i Source #

IEq1 (VarF :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression

Methods

ieq1 :: IEq a => VarF a j -> VarF a j -> Bool Source #

IFoldable (VarF :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression

Methods

ifold :: Monoid m => VarF (Const m) i' -> Const m i' Source #

IFunctor (VarF :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression

Methods

imap :: (forall (i' :: i). a i' -> b i') -> forall (i' :: i). VarF a i' -> VarF b i' Source #

index :: VarF a i' -> Sing i' Source #

ITraversable (VarF :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression

Methods

itraverse :: Applicative f => (forall (i' :: i). a i' -> f (b i')) -> forall (i' :: i). VarF a i' -> f (VarF b i') Source #

MaybeQuantified (VarF :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression

JoinSemiLattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

JoinSemiLattice (QFALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

JoinSemiLattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

JoinSemiLattice (QFLia BooleanSort) Source # 
Instance details

Defined in Data.Expression

JoinSemiLattice (QFLogic BooleanSort) Source # 
Instance details

Defined in Data.Expression

MeetSemiLattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

MeetSemiLattice (QFALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

MeetSemiLattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

MeetSemiLattice (QFLia BooleanSort) Source # 
Instance details

Defined in Data.Expression

MeetSemiLattice (QFLogic BooleanSort) Source # 
Instance details

Defined in Data.Expression

Lattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

Lattice (QFALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

Lattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

Lattice (QFLia BooleanSort) Source # 
Instance details

Defined in Data.Expression

Lattice (QFLogic BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedJoinSemiLattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedJoinSemiLattice (QFALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedJoinSemiLattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedJoinSemiLattice (QFLia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedJoinSemiLattice (QFLogic BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedMeetSemiLattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

Methods

top :: ALia BooleanSort #

BoundedMeetSemiLattice (QFALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedMeetSemiLattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

Methods

top :: Lia BooleanSort #

BoundedMeetSemiLattice (QFLia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedMeetSemiLattice (QFLogic BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedLattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedLattice (QFALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedLattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedLattice (QFLia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedLattice (QFLogic BooleanSort) Source # 
Instance details

Defined in Data.Expression

ComplementedLattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

ComplementedLattice (QFALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

ComplementedLattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

ComplementedLattice (QFLia BooleanSort) Source # 
Instance details

Defined in Data.Expression

ComplementedLattice (QFLogic BooleanSort) Source # 
Instance details

Defined in Data.Expression

(VarF :: (Sort -> *) -> Sort -> *) :<: f => Parseable (VarF :: k -> Sort -> *) f Source # 
Instance details

Defined in Data.Expression

data ConjunctionF a (s :: Sort) where Source #

A functor representing a logical connective for conjunction

Constructors

And :: [a BooleanSort] -> ConjunctionF a BooleanSort 
Instances
IEq1 ConjunctionF Source # 
Instance details

Defined in Data.Expression

Methods

ieq1 :: IEq a => ConjunctionF a j -> ConjunctionF a j -> Bool Source #

IFoldable ConjunctionF Source # 
Instance details

Defined in Data.Expression

Methods

ifold :: Monoid m => ConjunctionF (Const m) i' -> Const m i' Source #

IFunctor ConjunctionF Source # 
Instance details

Defined in Data.Expression

Methods

imap :: (forall (i' :: i). a i' -> b i') -> forall (i' :: i). ConjunctionF a i' -> ConjunctionF b i' Source #

index :: ConjunctionF a i' -> Sing i' Source #

ITraversable ConjunctionF Source # 
Instance details

Defined in Data.Expression

Methods

itraverse :: Applicative f => (forall (i' :: i). a i' -> f (b i')) -> forall (i' :: i). ConjunctionF a i' -> f (ConjunctionF b i') Source #

IShow ConjunctionF Source # 
Instance details

Defined in Data.Expression

JoinSemiLattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

JoinSemiLattice (QFALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

JoinSemiLattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

JoinSemiLattice (QFLia BooleanSort) Source # 
Instance details

Defined in Data.Expression

JoinSemiLattice (QFLogic BooleanSort) Source # 
Instance details

Defined in Data.Expression

MeetSemiLattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

MeetSemiLattice (QFALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

MeetSemiLattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

MeetSemiLattice (QFLia BooleanSort) Source # 
Instance details

Defined in Data.Expression

MeetSemiLattice (QFLogic BooleanSort) Source # 
Instance details

Defined in Data.Expression

Lattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

Lattice (QFALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

Lattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

Lattice (QFLia BooleanSort) Source # 
Instance details

Defined in Data.Expression

Lattice (QFLogic BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedJoinSemiLattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedJoinSemiLattice (QFALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedJoinSemiLattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedJoinSemiLattice (QFLia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedJoinSemiLattice (QFLogic BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedMeetSemiLattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

Methods

top :: ALia BooleanSort #

BoundedMeetSemiLattice (QFALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedMeetSemiLattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

Methods

top :: Lia BooleanSort #

BoundedMeetSemiLattice (QFLia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedMeetSemiLattice (QFLogic BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedLattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedLattice (QFALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedLattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedLattice (QFLia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedLattice (QFLogic BooleanSort) Source # 
Instance details

Defined in Data.Expression

ComplementedLattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

ComplementedLattice (QFALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

ComplementedLattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

ComplementedLattice (QFLia BooleanSort) Source # 
Instance details

Defined in Data.Expression

ComplementedLattice (QFLogic BooleanSort) Source # 
Instance details

Defined in Data.Expression

ConjunctionF :<: f => Parseable ConjunctionF f Source # 
Instance details

Defined in Data.Expression

data DisjunctionF a (s :: Sort) where Source #

A functor representing a logical connective for disjunction

Constructors

Or :: [a BooleanSort] -> DisjunctionF a BooleanSort 
Instances
IEq1 DisjunctionF Source # 
Instance details

Defined in Data.Expression

Methods

ieq1 :: IEq a => DisjunctionF a j -> DisjunctionF a j -> Bool Source #

IFoldable DisjunctionF Source # 
Instance details

Defined in Data.Expression

Methods

ifold :: Monoid m => DisjunctionF (Const m) i' -> Const m i' Source #

IFunctor DisjunctionF Source # 
Instance details

Defined in Data.Expression

Methods

imap :: (forall (i' :: i). a i' -> b i') -> forall (i' :: i). DisjunctionF a i' -> DisjunctionF b i' Source #

index :: DisjunctionF a i' -> Sing i' Source #

ITraversable DisjunctionF Source # 
Instance details

Defined in Data.Expression

Methods

itraverse :: Applicative f => (forall (i' :: i). a i' -> f (b i')) -> forall (i' :: i). DisjunctionF a i' -> f (DisjunctionF b i') Source #

IShow DisjunctionF Source # 
Instance details

Defined in Data.Expression

JoinSemiLattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

JoinSemiLattice (QFALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

JoinSemiLattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

JoinSemiLattice (QFLia BooleanSort) Source # 
Instance details

Defined in Data.Expression

JoinSemiLattice (QFLogic BooleanSort) Source # 
Instance details

Defined in Data.Expression

MeetSemiLattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

MeetSemiLattice (QFALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

MeetSemiLattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

MeetSemiLattice (QFLia BooleanSort) Source # 
Instance details

Defined in Data.Expression

MeetSemiLattice (QFLogic BooleanSort) Source # 
Instance details

Defined in Data.Expression

Lattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

Lattice (QFALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

Lattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

Lattice (QFLia BooleanSort) Source # 
Instance details

Defined in Data.Expression

Lattice (QFLogic BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedJoinSemiLattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedJoinSemiLattice (QFALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedJoinSemiLattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedJoinSemiLattice (QFLia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedJoinSemiLattice (QFLogic BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedMeetSemiLattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

Methods

top :: ALia BooleanSort #

BoundedMeetSemiLattice (QFALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedMeetSemiLattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

Methods

top :: Lia BooleanSort #

BoundedMeetSemiLattice (QFLia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedMeetSemiLattice (QFLogic BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedLattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedLattice (QFALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedLattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedLattice (QFLia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedLattice (QFLogic BooleanSort) Source # 
Instance details

Defined in Data.Expression

ComplementedLattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

ComplementedLattice (QFALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

ComplementedLattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

ComplementedLattice (QFLia BooleanSort) Source # 
Instance details

Defined in Data.Expression

ComplementedLattice (QFLogic BooleanSort) Source # 
Instance details

Defined in Data.Expression

DisjunctionF :<: f => Parseable DisjunctionF f Source # 
Instance details

Defined in Data.Expression

data NegationF a (s :: Sort) where Source #

A functor representing a logical connective for negation

Constructors

Not :: a BooleanSort -> NegationF a BooleanSort 
Instances
IEq1 NegationF Source # 
Instance details

Defined in Data.Expression

Methods

ieq1 :: IEq a => NegationF a j -> NegationF a j -> Bool Source #

IFoldable NegationF Source # 
Instance details

Defined in Data.Expression

Methods

ifold :: Monoid m => NegationF (Const m) i' -> Const m i' Source #

IFunctor NegationF Source # 
Instance details

Defined in Data.Expression

Methods

imap :: (forall (i' :: i). a i' -> b i') -> forall (i' :: i). NegationF a i' -> NegationF b i' Source #

index :: NegationF a i' -> Sing i' Source #

ITraversable NegationF Source # 
Instance details

Defined in Data.Expression

Methods

itraverse :: Applicative f => (forall (i' :: i). a i' -> f (b i')) -> forall (i' :: i). NegationF a i' -> f (NegationF b i') Source #

IShow NegationF Source # 
Instance details

Defined in Data.Expression

JoinSemiLattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

JoinSemiLattice (QFALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

JoinSemiLattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

JoinSemiLattice (QFLia BooleanSort) Source # 
Instance details

Defined in Data.Expression

JoinSemiLattice (QFLogic BooleanSort) Source # 
Instance details

Defined in Data.Expression

MeetSemiLattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

MeetSemiLattice (QFALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

MeetSemiLattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

MeetSemiLattice (QFLia BooleanSort) Source # 
Instance details

Defined in Data.Expression

MeetSemiLattice (QFLogic BooleanSort) Source # 
Instance details

Defined in Data.Expression

Lattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

Lattice (QFALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

Lattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

Lattice (QFLia BooleanSort) Source # 
Instance details

Defined in Data.Expression

Lattice (QFLogic BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedJoinSemiLattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedJoinSemiLattice (QFALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedJoinSemiLattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedJoinSemiLattice (QFLia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedJoinSemiLattice (QFLogic BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedMeetSemiLattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

Methods

top :: ALia BooleanSort #

BoundedMeetSemiLattice (QFALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedMeetSemiLattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

Methods

top :: Lia BooleanSort #

BoundedMeetSemiLattice (QFLia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedMeetSemiLattice (QFLogic BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedLattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedLattice (QFALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedLattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedLattice (QFLia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedLattice (QFLogic BooleanSort) Source # 
Instance details

Defined in Data.Expression

ComplementedLattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

ComplementedLattice (QFALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

ComplementedLattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

ComplementedLattice (QFLia BooleanSort) Source # 
Instance details

Defined in Data.Expression

ComplementedLattice (QFLogic BooleanSort) Source # 
Instance details

Defined in Data.Expression

NegationF :<: f => Parseable NegationF f Source # 
Instance details

Defined in Data.Expression

data UniversalF (v :: Sort) a (s :: Sort) where Source #

A functor representing a mono-sorted universal quantifier binding a number of variables within a formula

Constructors

Forall :: [Var v] -> a BooleanSort -> UniversalF v a BooleanSort 
Instances
IShow (UniversalF v :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression

IEq1 (UniversalF v :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression

Methods

ieq1 :: IEq a => UniversalF v a j -> UniversalF v a j -> Bool Source #

IFoldable (UniversalF v :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression

Methods

ifold :: Monoid m => UniversalF v (Const m) i' -> Const m i' Source #

IFunctor (UniversalF v :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression

Methods

imap :: (forall (i' :: i). a i' -> b i') -> forall (i' :: i). UniversalF v a i' -> UniversalF v b i' Source #

index :: UniversalF v a i' -> Sing i' Source #

ITraversable (UniversalF v :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression

Methods

itraverse :: Applicative f => (forall (i' :: i). a i' -> f (b i')) -> forall (i' :: i). UniversalF v a i' -> f (UniversalF v b i') Source #

MaybeQuantified (UniversalF v :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression

JoinSemiLattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

JoinSemiLattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

MeetSemiLattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

MeetSemiLattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

Lattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

Lattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedJoinSemiLattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedJoinSemiLattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedMeetSemiLattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

Methods

top :: ALia BooleanSort #

BoundedMeetSemiLattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

Methods

top :: Lia BooleanSort #

BoundedLattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedLattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

ComplementedLattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

ComplementedLattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

(UniversalF v :<: f, SingI v) => Parseable (UniversalF v :: (Sort -> *) -> Sort -> *) f Source # 
Instance details

Defined in Data.Expression

data ExistentialF (v :: Sort) a (s :: Sort) where Source #

A functor representing a mono-sorted existential quantifier binding a number of variables within a formula

Constructors

Exists :: [Var v] -> a BooleanSort -> ExistentialF v a BooleanSort 
Instances
IShow (ExistentialF v :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression

IEq1 (ExistentialF v :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression

Methods

ieq1 :: IEq a => ExistentialF v a j -> ExistentialF v a j -> Bool Source #

IFoldable (ExistentialF v :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression

Methods

ifold :: Monoid m => ExistentialF v (Const m) i' -> Const m i' Source #

IFunctor (ExistentialF v :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression

Methods

imap :: (forall (i' :: i). a i' -> b i') -> forall (i' :: i). ExistentialF v a i' -> ExistentialF v b i' Source #

index :: ExistentialF v a i' -> Sing i' Source #

ITraversable (ExistentialF v :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression

Methods

itraverse :: Applicative f => (forall (i' :: i). a i' -> f (b i')) -> forall (i' :: i). ExistentialF v a i' -> f (ExistentialF v b i') Source #

MaybeQuantified (ExistentialF v :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression

JoinSemiLattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

JoinSemiLattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

MeetSemiLattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

MeetSemiLattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

Lattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

Lattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedJoinSemiLattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedJoinSemiLattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedMeetSemiLattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

Methods

top :: ALia BooleanSort #

BoundedMeetSemiLattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

Methods

top :: Lia BooleanSort #

BoundedLattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

BoundedLattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

ComplementedLattice (ALia BooleanSort) Source # 
Instance details

Defined in Data.Expression

ComplementedLattice (Lia BooleanSort) Source # 
Instance details

Defined in Data.Expression

(ExistentialF v :<: f, SingI v) => Parseable (ExistentialF v :: (Sort -> *) -> Sort -> *) f Source # 
Instance details

Defined in Data.Expression

newtype Substitution f Source #

Substitution that given an expression produces replacement if the expression is to be replaced or nothing otherwise.

Constructors

Substitution 

Fields

Instances
Semigroup (Substitution f) Source # 
Instance details

Defined in Data.Expression

Monoid (Substitution f) Source # 
Instance details

Defined in Data.Expression

substitute :: (IFunctor f, IEq1 f) => IFix f s -> Substitution f -> IFix f s Source #

Executes a substitution.

for :: forall f (s :: Sort). (IFunctor f, IEq1 f) => IFix f s -> IFix f s -> Substitution f Source #

A simple constructor of substitutions that replaces the latter expression with the former.

var :: forall f s. (VarF :<: f, SingI s) => VariableName -> IFix f s Source #

A smart constructor for variables of any sort in any language Takes the variable name and infers the target language and sort from context.

var "a" :: Lia 'IntegralSort

true :: ConjunctionF :<: f => IFix f BooleanSort Source #

Logical tautology

false :: DisjunctionF :<: f => IFix f BooleanSort Source #

Logical contradiction

and :: ConjunctionF :<: f => [IFix f BooleanSort] -> IFix f BooleanSort Source #

A smart constructor for variadic conjunction

or :: DisjunctionF :<: f => [IFix f BooleanSort] -> IFix f BooleanSort Source #

A smart constructor for variadic disjunction

not :: NegationF :<: f => IFix f BooleanSort -> IFix f BooleanSort Source #

A smart constructor for negation

forall :: UniversalF v :<: f => [Var v] -> IFix f BooleanSort -> IFix f BooleanSort Source #

A smart constructor for universally quantified formulae

exists :: ExistentialF v :<: f => [Var v] -> IFix f BooleanSort -> IFix f BooleanSort Source #

A smart constructor for existentially quantified formulae

(.&.) :: ConjunctionF :<: f => IFix f BooleanSort -> IFix f BooleanSort -> IFix f BooleanSort infixr 6 Source #

A smart constructor for binary conjunction

(.|.) :: DisjunctionF :<: f => IFix f BooleanSort -> IFix f BooleanSort -> IFix f BooleanSort infixr 5 Source #

A smart constructor for binary disjunction

(.->.) :: (DisjunctionF :<: f, NegationF :<: f) => IFix f BooleanSort -> IFix f BooleanSort -> IFix f BooleanSort infixr 4 Source #

A smart constructor for implication (an abbreviation for not a .|. b)

(.<-.) :: (DisjunctionF :<: f, NegationF :<: f) => IFix f BooleanSort -> IFix f BooleanSort -> IFix f BooleanSort infixl 4 Source #

A smart constructor for reversed implication (an abbreviation for a .|. not b)

(.<->.) :: (ConjunctionF :<: f, DisjunctionF :<: f, NegationF :<: f) => IFix f BooleanSort -> IFix f BooleanSort -> IFix f BooleanSort infix 3 Source #

A smart constructor for if-and-only-if connective

(./=.) :: forall f s. (NegationF :<: f, EqualityF :<: f, SingI s) => IFix f s -> IFix f s -> IFix f BooleanSort infix 7 Source #

A smart constructor for disequality

literals :: (ConjunctionF :<: f, DisjunctionF :<: f) => IFix f BooleanSort -> [IFix f BooleanSort] Source #

literals decomposes a boolean combination (formed with conjunctions and disjunctions, preferably in negation normal form) into its constituents.

conjuncts :: ConjunctionF :<: f => IFix f BooleanSort -> [IFix f BooleanSort] Source #

conjuncts decomposes a conjunction into conjuncts.

disjuncts :: DisjunctionF :<: f => IFix f BooleanSort -> [IFix f BooleanSort] Source #

disjuncts decomposes a disjunction into disjuncts.

vars :: (VarF :<: f, IFoldable f, IFunctor f) => IFix f s -> [DynamicallySorted VarF] Source #

Collects a list of all variables occurring in an expression (bound or free).

freevars :: (IFunctor f, MaybeQuantified f) => IFix f s -> [DynamicallySorted VarF] Source #

Collects a list of all free variables occurring in an expression.

class MaybeQuantified f Source #

Minimal complete definition

isQuantified', freevars'

Instances
(IFunctor f, IFoldable f) => MaybeQuantified (f :: (k -> *) -> k -> *) Source # 
Instance details

Defined in Data.Expression

MaybeQuantified (ExistentialF v :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression

MaybeQuantified (UniversalF v :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression

MaybeQuantified (VarF :: (Sort -> *) -> Sort -> *) Source # 
Instance details

Defined in Data.Expression

(MaybeQuantified f, MaybeQuantified g) => MaybeQuantified (f :+: g :: (k -> *) -> k -> *) Source # 
Instance details

Defined in Data.Expression

isQuantified :: MaybeQuantified f => IFix f s -> Bool Source #

Test whether an expression contains a quantifier.

isQuantifierFree :: MaybeQuantified f => IFix f s -> Bool Source #

Tests whether an expression is free of any quantifier.

class (NegationF :<: f, HasDual f f) => NNF f Source #

Instances
(NegationF :<: f, HasDual f f) => NNF f Source # 
Instance details

Defined in Data.Expression

nnf :: forall f. NNF f => IFix f BooleanSort -> IFix f BooleanSort Source #

Propagates negation toward boolean atoms (across conjunction, disjunction, quantifiers).

class (VarF :<: f, NegationF :<: f, IFunctor f, IFoldable f, ITraversable f, HasDual f f, MaybeQuantified' f f) => Prenex f Source #

Instances
((VarF :: (Sort -> *) -> Sort -> *) :<: f, NegationF :<: f, IFunctor f, IFoldable f, ITraversable f, HasDual f f, MaybeQuantified' f f) => Prenex f Source # 
Instance details

Defined in Data.Expression

prenex :: forall f. Prenex f => IFix f BooleanSort -> IFix f BooleanSort Source #

Puts an expression into prenex form (quantifier prefix and a quantifier-free formula).

class (VarF :<: f, Bind f f, Bind' f f, MaybeQuantified'' f f, IFoldable f, ITraversable f) => Flatten f Source #

Instances
((VarF :: (Sort -> *) -> Sort -> *) :<: f, Bind f f, Bind' f f, MaybeQuantified'' f f, IFoldable f, ITraversable f) => Flatten f Source # 
Instance details

Defined in Data.Expression

flatten :: forall f. Flatten f => IFix f BooleanSort -> IFix f BooleanSort Source #

Replaces non-variable and non-constant arguments to uninterpreted functions (such as select and store) with a fresh bound (universally or existentially) variable that is bound to the original term.

class (VarF :<: f, EqualityF :<: f, Bind f f, Bind' f f, MaybeQuantified'' f f, Forall f f, Axiomatized f f, IFoldable f, ITraversable f) => Unstore f Source #

Instances
((VarF :: (Sort -> *) -> Sort -> *) :<: f, (EqualityF :: (Sort -> *) -> Sort -> *) :<: f, Bind f f, Bind' f f, MaybeQuantified'' f f, Forall f f, Axiomatized f f, IFoldable f, ITraversable f) => Unstore f Source # 
Instance details

Defined in Data.Expression

unstore :: forall f. Unstore f => IFix f BooleanSort -> IFix f BooleanSort Source #

Replaces store with an instance of its axiomatization.