Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Defines the CodeSpec structure and related functions.
Synopsis
- type Input = CodeVarChunk
- type Output = CodeVarChunk
- type Const = CodeDefinition
- type Derived = CodeDefinition
- type Def = CodeDefinition
- data CodeSpec where
- type ConstantMap = Map UID CodeDefinition
- assocToMap :: HasUID a => [a] -> Map UID a
- getODE :: [ExtLib] -> Maybe ODE
- mapODE :: Maybe ODE -> [CodeDefinition]
- codeSpec :: SystemInformation -> Choices -> [Mod] -> CodeSpec
- asVC :: Func -> QuantityDict
- funcUID :: Func -> UID
- getDerivedInputs :: [DataDefinition] -> [Input] -> [Const] -> ChunkDB -> [SimpleQDef]
- type Known = CodeVarChunk
- type Need = CodeVarChunk
- getExecOrder :: [Def] -> [Known] -> [Need] -> ChunkDB -> [Def]
- getConstraints :: HasUID c => ConstraintCEMap -> [c] -> [ConstraintCE]
- constraintvars :: ConstraintCE -> ChunkDB -> [CodeChunk]
Documentation
type Input = CodeVarChunk Source #
Program input.
type Output = CodeVarChunk Source #
Program output.
type Const = CodeDefinition Source #
Constants in the problem.
type Derived = CodeDefinition Source #
Derived inputs.
type Def = CodeDefinition Source #
Mathematical definition.
Code specifications. Holds information needed to generate code.
CodeSpec | |
|
type ConstantMap = Map UID CodeDefinition Source #
Maps constants to their respective CodeDefinition
.
mapODE :: Maybe ODE -> [CodeDefinition] Source #
Maps ODE to their respective CodeDefinition
.
codeSpec :: SystemInformation -> Choices -> [Mod] -> CodeSpec Source #
Defines a CodeSpec
based on the SystemInformation
, Choices
, and Mod
s
defined by the user.
asVC :: Func -> QuantityDict Source #
Convert a Func
to an implementation-stage QuantityDict
representing the
function.
getDerivedInputs :: [DataDefinition] -> [Input] -> [Const] -> ChunkDB -> [SimpleQDef] Source #
Determines the derived inputs, which can be immediately calculated from the
knowns (inputs and constants). If there are DDs, the derived inputs will
come from those. If there are none, then the QDefinition
s are used instead.
type Known = CodeVarChunk Source #
Known values.
type Need = CodeVarChunk Source #
Calculated values.
getConstraints :: HasUID c => ConstraintCEMap -> [c] -> [ConstraintCE] Source #
Get a list of Constraint
s for a list of CodeChunk
s.
constraintvars :: ConstraintCE -> ChunkDB -> [CodeChunk] Source #
Get a list of CodeChunk
s from a constraint.