Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data ArithBinOp
- data EqBinOp
- data BoolBinOp
- data LABinOp = Index
- data OrdBinOp
- data VVVBinOp
- data VVNBinOp = Dot
- data NVVBinOp = Scale
- data AssocArithOper
- data AssocBoolOper
- data UFunc
- data UFuncB = Not
- data UFuncVV = NegV
- data UFuncVN
- data CodeExpr where
- Lit :: Literal -> CodeExpr
- AssocA :: AssocArithOper -> [CodeExpr] -> CodeExpr
- AssocB :: AssocBoolOper -> [CodeExpr] -> CodeExpr
- C :: UID -> CodeExpr
- FCall :: UID -> [CodeExpr] -> [(UID, CodeExpr)] -> CodeExpr
- New :: UID -> [CodeExpr] -> [(UID, CodeExpr)] -> CodeExpr
- Message :: UID -> UID -> [CodeExpr] -> [(UID, CodeExpr)] -> CodeExpr
- Field :: UID -> UID -> CodeExpr
- Case :: Completeness -> [(CodeExpr, CodeExpr)] -> CodeExpr
- Matrix :: [[CodeExpr]] -> CodeExpr
- UnaryOp :: UFunc -> CodeExpr -> CodeExpr
- UnaryOpB :: UFuncB -> CodeExpr -> CodeExpr
- UnaryOpVV :: UFuncVV -> CodeExpr -> CodeExpr
- UnaryOpVN :: UFuncVN -> CodeExpr -> CodeExpr
- ArithBinaryOp :: ArithBinOp -> CodeExpr -> CodeExpr -> CodeExpr
- BoolBinaryOp :: BoolBinOp -> CodeExpr -> CodeExpr -> CodeExpr
- EqBinaryOp :: EqBinOp -> CodeExpr -> CodeExpr -> CodeExpr
- LABinaryOp :: LABinOp -> CodeExpr -> CodeExpr -> CodeExpr
- OrdBinaryOp :: OrdBinOp -> CodeExpr -> CodeExpr -> CodeExpr
- VVVBinaryOp :: VVVBinOp -> CodeExpr -> CodeExpr -> CodeExpr
- VVNBinaryOp :: VVNBinOp -> CodeExpr -> CodeExpr -> CodeExpr
- NVVBinaryOp :: NVVBinOp -> CodeExpr -> CodeExpr -> CodeExpr
- Operator :: AssocArithOper -> DiscreteDomainDesc CodeExpr CodeExpr -> CodeExpr -> CodeExpr
- RealI :: UID -> RealInterval CodeExpr CodeExpr -> CodeExpr
Operators (mostly binary)
data ArithBinOp Source #
Arithmetic operators (fractional, power, and subtraction).
Instances
Eq ArithBinOp Source # | |
Defined in Language.Drasil.CodeExpr.Lang (==) :: ArithBinOp -> ArithBinOp -> Bool # (/=) :: ArithBinOp -> ArithBinOp -> Bool # |
Equality operators (equal or not equal).
Conditional and Biconditional operators (Expressions can imply one another, or exist if and only if another expression exists).
Index operator.
Ordered binary operators (less than, greater than, less than or equal to, greater than or equal to).
Vector x Vector -> Vector
binary operations (cross product, vector addition, vector sub).
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.CodeExpr.Lang (==) :: AssocArithOper -> AssocArithOper -> Bool # (/=) :: AssocArithOper -> AssocArithOper -> Bool # |
data AssocBoolOper Source #
Associative boolean operators (and, or).
Instances
Eq AssocBoolOper Source # | |
Defined in Language.Drasil.CodeExpr.Lang (==) :: AssocBoolOper -> AssocBoolOper -> Bool # (/=) :: AssocBoolOper -> AssocBoolOper -> Bool # |
Unary functions (abs, log, ln, sin, etc.).
Bool -> Bool
operators.
Vector -> Vector
operators.
Vector -> Number
operators.
CodeExpr
Expression language where all terms also denote a term in GOOL (i.e. translation is total and meaning preserving).
Lit :: Literal -> CodeExpr | Brings literals into the expression language. |
AssocA :: AssocArithOper -> [CodeExpr] -> CodeExpr | Takes an associative arithmetic operator with a list of expressions. |
AssocB :: AssocBoolOper -> [CodeExpr] -> CodeExpr | Takes an associative boolean operator with a list of expressions. |
C :: UID -> CodeExpr | C stands for Chunk, for referring to a chunk in an expression. Implicitly assumes that the chunk has a symbol. |
FCall :: UID -> [CodeExpr] -> [(UID, CodeExpr)] -> CodeExpr | A function call accepts a list of parameters and a list of named parameters. For example
|
New :: UID -> [CodeExpr] -> [(UID, CodeExpr)] -> CodeExpr | Actor creation given |
Message :: UID -> UID -> [CodeExpr] -> [(UID, CodeExpr)] -> CodeExpr | Message an actor: |
Field :: UID -> UID -> CodeExpr | Access a field of an actor: |
Case :: Completeness -> [(CodeExpr, CodeExpr)] -> CodeExpr | For multi-case expressions, each pair represents one case. |
Matrix :: [[CodeExpr]] -> CodeExpr | Represents a matrix of expressions. |
UnaryOp :: UFunc -> CodeExpr -> CodeExpr | Unary operation for most functions (eg. sin, cos, log, etc.). |
UnaryOpB :: UFuncB -> CodeExpr -> CodeExpr | Unary operation for |
UnaryOpVV :: UFuncVV -> CodeExpr -> CodeExpr | Unary operation for |
UnaryOpVN :: UFuncVN -> CodeExpr -> CodeExpr | Unary operation for |
ArithBinaryOp :: ArithBinOp -> CodeExpr -> CodeExpr -> CodeExpr | Binary operator for arithmetic between expressions (fractional, power, and subtraction). |
BoolBinaryOp :: BoolBinOp -> CodeExpr -> CodeExpr -> CodeExpr | Binary operator for boolean operators (implies, iff). |
EqBinaryOp :: EqBinOp -> CodeExpr -> CodeExpr -> CodeExpr | Binary operator for equality between expressions. |
LABinaryOp :: LABinOp -> CodeExpr -> CodeExpr -> CodeExpr | Binary operator for indexing two expressions. |
OrdBinaryOp :: OrdBinOp -> CodeExpr -> CodeExpr -> CodeExpr | Binary operator for ordering expressions (less than, greater than, etc.). |
VVVBinaryOp :: VVVBinOp -> CodeExpr -> CodeExpr -> CodeExpr | Binary operator for |
VVNBinaryOp :: VVNBinOp -> CodeExpr -> CodeExpr -> CodeExpr | Binary operator for |
NVVBinaryOp :: NVVBinOp -> CodeExpr -> CodeExpr -> CodeExpr | Binary operator for |
Operator :: AssocArithOper -> DiscreteDomainDesc CodeExpr CodeExpr -> CodeExpr -> CodeExpr | Operators are generalized arithmetic operators over a |
RealI :: UID -> RealInterval CodeExpr CodeExpr -> CodeExpr | The expression is an element of a space.
IsIn :: Expr -> Space -> Expr
| A different kind of |