Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Re-export functions and types related to ModelExpr
Synopsis
- data ModelExpr where
- Lit :: Literal -> ModelExpr
- Spc :: Space -> ModelExpr
- AssocA :: AssocArithOper -> [ModelExpr] -> ModelExpr
- AssocB :: AssocBoolOper -> [ModelExpr] -> ModelExpr
- Deriv :: Integer -> DerivType -> ModelExpr -> UID -> ModelExpr
- C :: UID -> ModelExpr
- FCall :: UID -> [ModelExpr] -> ModelExpr
- Case :: Completeness -> [(ModelExpr, ModelExpr)] -> ModelExpr
- Matrix :: [[ModelExpr]] -> ModelExpr
- UnaryOp :: UFunc -> ModelExpr -> ModelExpr
- UnaryOpB :: UFuncB -> ModelExpr -> ModelExpr
- UnaryOpVV :: UFuncVV -> ModelExpr -> ModelExpr
- UnaryOpVN :: UFuncVN -> ModelExpr -> ModelExpr
- ArithBinaryOp :: ArithBinOp -> ModelExpr -> ModelExpr -> ModelExpr
- BoolBinaryOp :: BoolBinOp -> ModelExpr -> ModelExpr -> ModelExpr
- EqBinaryOp :: EqBinOp -> ModelExpr -> ModelExpr -> ModelExpr
- LABinaryOp :: LABinOp -> ModelExpr -> ModelExpr -> ModelExpr
- OrdBinaryOp :: OrdBinOp -> ModelExpr -> ModelExpr -> ModelExpr
- SpaceBinaryOp :: SpaceBinOp -> ModelExpr -> ModelExpr -> ModelExpr
- StatBinaryOp :: StatBinOp -> ModelExpr -> ModelExpr -> ModelExpr
- VVVBinaryOp :: VVVBinOp -> ModelExpr -> ModelExpr -> ModelExpr
- VVNBinaryOp :: VVNBinOp -> ModelExpr -> ModelExpr -> ModelExpr
- NVVBinaryOp :: NVVBinOp -> ModelExpr -> ModelExpr -> ModelExpr
- Operator :: AssocArithOper -> DomainDesc t ModelExpr ModelExpr -> ModelExpr -> ModelExpr
- RealI :: UID -> RealInterval ModelExpr ModelExpr -> ModelExpr
- ForAll :: UID -> Space -> ModelExpr -> ModelExpr
- data UFunc
- data UFuncB = Not
- data UFuncVV = NegV
- data UFuncVN
- data ArithBinOp
- data BoolBinOp
- data EqBinOp
- data LABinOp = Index
- data OrdBinOp
- data SpaceBinOp = IsIn
- data StatBinOp = Defines
- data VVVBinOp
- data VVNBinOp = Dot
- data NVVBinOp = Scale
- data AssocArithOper
- data AssocBoolOper
- = And
- | Or
- | Equivalence
- data DerivType
- data Completeness
- expr :: Expr -> ModelExpr
- meDep :: ModelExpr -> [UID]
- mePrec :: ModelExpr -> Int
- precB :: AssocBoolOper -> Int
- precA :: AssocArithOper -> Int
Types
Expression language where all terms are supposed to have a meaning, but that meaning may not be that of a definite value. For example, specification expressions, especially with quantifiers, belong here.
Lit :: Literal -> ModelExpr | Brings a literal into the expression language. |
Spc :: Space -> ModelExpr | Introduce Space values into the expression language. |
AssocA :: AssocArithOper -> [ModelExpr] -> ModelExpr | Takes an associative arithmetic operator with a list of expressions. |
AssocB :: AssocBoolOper -> [ModelExpr] -> ModelExpr | Takes an associative boolean operator with a list of expressions. |
Deriv :: Integer -> DerivType -> ModelExpr -> UID -> ModelExpr | Derivative syntax is:
Type ( |
C :: UID -> ModelExpr | C stands for Chunk, for referring to a chunk in an expression. Implicitly assumes that the chunk has a symbol. |
FCall :: UID -> [ModelExpr] -> ModelExpr | Function applications. |
Case :: Completeness -> [(ModelExpr, ModelExpr)] -> ModelExpr | For multi-case expressions, each pair represents one case. |
Matrix :: [[ModelExpr]] -> ModelExpr | Represents a matrix of expressions. |
UnaryOp :: UFunc -> ModelExpr -> ModelExpr | Unary operation for most functions (eg. sin, cos, log, etc.). |
UnaryOpB :: UFuncB -> ModelExpr -> ModelExpr | Unary operation for |
UnaryOpVV :: UFuncVV -> ModelExpr -> ModelExpr | Unary operation for |
UnaryOpVN :: UFuncVN -> ModelExpr -> ModelExpr | Unary operation for |
ArithBinaryOp :: ArithBinOp -> ModelExpr -> ModelExpr -> ModelExpr | Binary operator for arithmetic between expressions (fractional, power, and subtraction). |
BoolBinaryOp :: BoolBinOp -> ModelExpr -> ModelExpr -> ModelExpr | Binary operator for boolean operators (implies, iff). |
EqBinaryOp :: EqBinOp -> ModelExpr -> ModelExpr -> ModelExpr | Binary operator for equality between expressions. |
LABinaryOp :: LABinOp -> ModelExpr -> ModelExpr -> ModelExpr | Binary operator for indexing two expressions. |
OrdBinaryOp :: OrdBinOp -> ModelExpr -> ModelExpr -> ModelExpr | Binary operator for ordering expressions (less than, greater than, etc.). |
SpaceBinaryOp :: SpaceBinOp -> ModelExpr -> ModelExpr -> ModelExpr | Space-related binary operations. |
StatBinaryOp :: StatBinOp -> ModelExpr -> ModelExpr -> ModelExpr | Statement-related binary operations. |
VVVBinaryOp :: VVVBinOp -> ModelExpr -> ModelExpr -> ModelExpr | Binary operator for |
VVNBinaryOp :: VVNBinOp -> ModelExpr -> ModelExpr -> ModelExpr | Binary operator for |
NVVBinaryOp :: NVVBinOp -> ModelExpr -> ModelExpr -> ModelExpr | Binary operator for |
Operator :: AssocArithOper -> DomainDesc t ModelExpr ModelExpr -> ModelExpr -> ModelExpr | Operators are generalized arithmetic operators over a |
RealI :: UID -> RealInterval ModelExpr ModelExpr -> ModelExpr | A different kind of |
ForAll :: UID -> Space -> ModelExpr -> ModelExpr | Universal quantification |
Instances
Unary functions (abs, log, ln, sin, etc.).
Bool -> Bool
operators.
Vector -> Vector
operators.
Vector -> Number
operators.
data ArithBinOp Source #
Arithmetic operators (fractional, power, and subtraction).
Instances
Eq ArithBinOp Source # | |
Defined in Language.Drasil.ModelExpr.Lang (==) :: ArithBinOp -> ArithBinOp -> Bool # (/=) :: ArithBinOp -> ArithBinOp -> Bool # |
Conditional and Biconditional operators (Expressions can imply one another, or exist if and only if another expression exists).
Equality operators (equal or not equal).
Index operator.
Ordered binary operators (less than, greater than, less than or equal to, greater than or equal to).
data SpaceBinOp Source #
Value -> Space -> Bool
operators.
Instances
Eq SpaceBinOp Source # | |
Defined in Language.Drasil.ModelExpr.Lang (==) :: SpaceBinOp -> SpaceBinOp -> Bool # (/=) :: SpaceBinOp -> SpaceBinOp -> Bool # |
Statements involving 2 arguments.
Vector x Vector -> Vector
binary operations (cross product, vector addition, subtraction).
Vector x Vector -> Number
binary operations (dot product).
Number x Vector -> Vector
binary operations (scaling).
data AssocArithOper Source #
Associative operators (adding and multiplication). Also specifies whether it is for integers or for real numbers.
Instances
Eq AssocArithOper Source # | |
Defined in Language.Drasil.ModelExpr.Lang (==) :: AssocArithOper -> AssocArithOper -> Bool # (/=) :: AssocArithOper -> AssocArithOper -> Bool # |
data AssocBoolOper Source #
Associative boolean operators (and, or).
Instances
Show AssocBoolOper Source # | |
Defined in Language.Drasil.ModelExpr.Lang showsPrec :: Int -> AssocBoolOper -> ShowS # show :: AssocBoolOper -> String # showList :: [AssocBoolOper] -> ShowS # | |
Eq AssocBoolOper Source # | |
Defined in Language.Drasil.ModelExpr.Lang (==) :: AssocBoolOper -> AssocBoolOper -> Bool # (/=) :: AssocBoolOper -> AssocBoolOper -> Bool # |
Determines the type of the derivative (either a partial derivative or a total derivative).
data Completeness Source #
For case expressions (either complete or incomplete).
Instances
Eq Completeness Source # | |
Defined in Language.Drasil.Expr.Lang (==) :: Completeness -> Completeness -> Bool # (/=) :: Completeness -> Completeness -> Bool # |
Functions
precB :: AssocBoolOper -> Int Source #
precB - precedence for boolean-related Binary-Associative (Commutative) operators.
precA :: AssocArithOper -> Int Source #
precA - precedence for arithmetic-related Binary-Associative (Commutative) operators.