drasil-theory-0.1.0.0: A framework for code and document generation for scientific software - Theory SubPackage
Safe HaskellSafe-Inferred
LanguageHaskell2010

Theory.Drasil.ModelKinds

Description

Defines types and functions for creating models.

Synopsis

Types

data ModelKind e Source #

ModelKinds carrier, used to carry commonly overwritten information from the IMsTMsGDs.

Constructors

MK 

Fields

Instances

Instances details
Idea (ModelKind e) Source #

Finds the idea of the ModelKind.

Instance details

Defined in Theory.Drasil.ModelKinds

Methods

getA :: ModelKind e -> Maybe String #

NamedIdea (ModelKind e) Source #

Finds the term (NP) of the ModelKind.

Instance details

Defined in Theory.Drasil.ModelKinds

Methods

term :: Lens' (ModelKind e) NP #

ConceptDomain (ModelKind e) Source #

Finds the domain of the ModelKind.

Instance details

Defined in Theory.Drasil.ModelKinds

Methods

cdom :: ModelKind e -> [UID] #

Definition (ModelKind e) Source #

Finds the definition of the ModelKind.

Instance details

Defined in Theory.Drasil.ModelKinds

Methods

defn :: Lens' (ModelKind e) Sentence #

Express e => Express (ModelKind e) Source #

Rewrites the underlying model using ModelExpr

Instance details

Defined in Theory.Drasil.ModelKinds

Methods

express :: ModelKind e -> ModelExpr #

HasUID (ModelKind e) Source #

Finds the UID of the ModelKind.

Instance details

Defined in Theory.Drasil.ModelKinds

Methods

uid :: Getter (ModelKind e) UID #

RequiresChecking (ModelKind Expr) Expr Space Source #

Expose all expressions that need to be type-checked for theories that need expose Exprs.

Instance details

Defined in Theory.Drasil.ModelKinds

data ModelKinds e where Source #

Models can be of different kinds:

  • NewDEModels represent differential equations as DifferentialModels
  • DEModels represent differential equations as RelationConcepts
  • EquationalConstraints represent invariants that will hold in a system of equations.
  • EquationalModels represent quantities that are calculated via a single definition/QDefinition.
  • EquationalRealms represent MultiDefns; quantities that may be calculated using any one of many DefiningExprs (e.g., 'x = A = ... = Z')
  • FunctionalModels represent quantity-resulting function definitions.
  • OthModels are placeholders for models. No new OthModels should be created, they should be using one of the other kinds.

Instances

Instances details
Idea (ModelKinds e) Source #

Finds the idea of the ModelKinds.

Instance details

Defined in Theory.Drasil.ModelKinds

Methods

getA :: ModelKinds e -> Maybe String #

NamedIdea (ModelKinds e) Source #

Finds the term (NP) of the ModelKinds.

Instance details

Defined in Theory.Drasil.ModelKinds

Methods

term :: Lens' (ModelKinds e) NP #

ConceptDomain (ModelKinds e) Source #

Finds the domain of the ModelKinds.

Instance details

Defined in Theory.Drasil.ModelKinds

Methods

cdom :: ModelKinds e -> [UID] #

Definition (ModelKinds e) Source #

Finds the definition of the ModelKinds.

Instance details

Defined in Theory.Drasil.ModelKinds

Methods

defn :: Lens' (ModelKinds e) Sentence #

Express e => Express (ModelKinds e) Source #

Rewrites the underlying model using ModelExpr

Instance details

Defined in Theory.Drasil.ModelKinds

Methods

express :: ModelKinds e -> ModelExpr #

HasUID (ModelKinds e) Source #

Finds the UID of the ModelKinds.

Instance details

Defined in Theory.Drasil.ModelKinds

Methods

uid :: Getter (ModelKinds e) UID #

RequiresChecking (ModelKinds Expr) Expr Space Source #

Expose all expressions that need to be type-checked for theories that need expose Exprs.

Instance details

Defined in Theory.Drasil.ModelKinds

Constructors

newDEModel :: String -> NP -> DifferentialModel -> ModelKind e Source #

Smart constructor for NewDEModels

deModel :: String -> NP -> RelationConcept -> ModelKind e Source #

Smart constructor for DEModels

equationalModel :: String -> NP -> QDefinition e -> ModelKind e Source #

Smart constructor for EquationalModels

equationalRealm :: String -> NP -> MultiDefn e -> ModelKind e Source #

Smart constructor for EquationalRealms

othModel :: String -> NP -> RelationConcept -> ModelKind Expr Source #

Smart constructor for OthModels

newDEModel' :: DifferentialModel -> ModelKind e Source #

Smart constructor for NewDEModels, deriving UID+Term from the DifferentialModel

deModel' :: RelationConcept -> ModelKind e Source #

Smart constructor for DEModels, deriving UID+Term from the RelationConcept

equationalConstraints' :: ConstraintSet e -> ModelKind e Source #

Smart constructor for EquationalConstraints, deriving UID+Term from the ConstraintSet

equationalModel' :: QDefinition e -> ModelKind e Source #

Smart constructor for EquationalModels, deriving UID+Term from the QDefinition

equationalRealm' :: MultiDefn e -> ModelKind e Source #

Smart constructor for EquationalRealms, deriving UID+Term from the MultiDefn

othModel' :: RelationConcept -> ModelKind e Source #

Smart constructor for OthModels, deriving UID+Term from the RelationConcept

equationalModelU :: String -> QDefinition e -> ModelKind e Source #

Smart constructor for EquationalModels, deriving Term from the QDefinition

equationalModelN :: NP -> QDefinition e -> ModelKind e Source #

Smart constructor for EquationalModels, deriving UID from the QDefinition

equationalRealmN :: NP -> MultiDefn e -> ModelKind e Source #

Smart constructor for EquationalRealms, deriving UID from the MultiDefn

Lenses

setMk :: ModelKinds e -> Setter' DifferentialModel a -> Setter' RelationConcept a -> Setter' (ConstraintSet e) a -> Setter' (QDefinition e) a -> Setter' (MultiDefn e) a -> a -> ModelKinds e Source #

Map into internal representations of ModelKinds

elimMk :: Getter DifferentialModel a -> Getter RelationConcept a -> Getter (ConstraintSet e) a -> Getter (QDefinition e) a -> Getter (MultiDefn e) a -> ModelKinds e -> a Source #

Retrieve internal data from ModelKinds

lensMk :: forall e a. Lens' DifferentialModel a -> Lens' RelationConcept a -> Lens' (ConstraintSet e) a -> Lens' (QDefinition e) a -> Lens' (MultiDefn e) a -> Lens' (ModelKinds e) a Source #

Make a Lens for ModelKinds.

getterMk :: forall e a. Getter DifferentialModel a -> Getter RelationConcept a -> Getter (ConstraintSet e) a -> Getter (QDefinition e) a -> Getter (MultiDefn e) a -> Getter (ModelKinds e) a Source #

Make a Getter for ModelKinds.

Functions

getEqModQds :: [ModelKind e] -> [QDefinition e] Source #

Extract a list of QDefinitions from a list of ModelKinds.