| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Language.Drasil.Choices
Description
Defines the design language for SCS.
Synopsis
- data Choices = Choices {
- lang :: [Lang]
- architecture :: Architecture
- dataInfo :: DataInfo
- maps :: Maps
- optFeats :: OptionalFeatures
- srsConstraints :: Constraints
- extLibs :: [ExtLib]
- icNames :: InternalConcept -> Name
- folderVal :: Int
- defaultConfigFiles :: [RelativeFile]
- extraMods :: [Mod]
- handWiredDefs :: [SimpleQDef]
- data Architecture = Archt {}
- makeArchit :: Modularity -> ImplementationType -> Architecture
- data DataInfo = DataInfo {}
- makeData :: Structure -> ConstantStructure -> ConstantRepr -> DataInfo
- data Maps = Maps {}
- makeMaps :: ConceptMatchMap -> SpaceMatch -> Maps
- spaceToCodeType :: Space -> [CodeType]
- data Constraints = Constraints {}
- makeConstraints :: ConstraintBehaviour -> ConstraintBehaviour -> Constraints
- data ODE = ODE {
- odeInfo :: [ODEInfo]
- odeLib :: [ODELibPckg]
- makeODE :: [ODEInfo] -> [ODELibPckg] -> ODE
- odeInfoReqs :: ExtLib -> [DefinedQuantityDict]
- odeLibReqs :: ExtLib -> [DefinedQuantityDict]
- data DocConfig = DocConfig {
- comments :: [Comments]
- doxVerbosity :: Verbosity
- dates :: Visibility
- makeDocConfig :: [Comments] -> Verbosity -> Visibility -> DocConfig
- data LogConfig = LogConfig {}
- makeLogConfig :: [Logging] -> FilePath -> LogConfig
- data OptionalFeatures = OptFeats {}
- makeOptFeats :: DocConfig -> LogConfig -> [SoftwareDossierFile] -> OptionalFeatures
- newtype ExtLib = Math ODE
- data Modularity
- data Structure
- data ConstantStructure
- data ConstantRepr
- type ConceptMatchMap = Map UID [CodeConcept]
- type MatchedConceptMap = Map UID CodeConcept
- data CodeConcept = Pi
- matchConcepts :: HasUID c => [(c, [CodeConcept])] -> ConceptMatchMap
- type SpaceMatch = Space -> [CodeType]
- matchSpaces :: [(Space, [CodeType])] -> SpaceMatch
- data ImplementationType
- data ConstraintBehaviour
- data Comments
- data Verbosity
- data Visibility
- data Logging
- data SoftwareDossierFile
- getSampleData :: Choices -> Maybe FilePath
- hasSampleInput :: [SoftwareDossierFile] -> Bool
- defaultChoices :: Choices
- choicesSent :: Choices -> [Sentence]
- showChs :: RenderChoices a => a -> Sentence
- data InternalConcept
Documentation
The instruction indicates how the generated program should be written down. Full details of Choices documentation https://github.com/JacquesCarette/Drasil/wiki/The-Code-Generator
Constructors
| Choices | |
Fields
| |
data Architecture Source #
Architecture of a program
Constructors
| Archt | |
Fields
| |
makeArchit :: Modularity -> ImplementationType -> Architecture Source #
Constructor to create a Architecture
Data of a program - how information should be encoded.
Constructors
| DataInfo | |
Fields
| |
makeData :: Structure -> ConstantStructure -> ConstantRepr -> DataInfo Source #
Constructor to create a DataInfo
Maps for Concepts and Space
Constructors
| Maps | |
Fields | |
makeMaps :: ConceptMatchMap -> SpaceMatch -> Maps Source #
Constructor to create a Maps
makeConstraints :: ConstraintBehaviour -> ConstraintBehaviour -> Constraints Source #
Constructor to create a Constraints
All Information needed to solve an ODE
Constructors
| ODE | |
Fields
| |
odeInfoReqs :: ExtLib -> [DefinedQuantityDict] Source #
odeLibReqs :: ExtLib -> [DefinedQuantityDict] Source #
Configuration for Doxygen documentation
Constructors
| DocConfig | |
Fields
| |
makeDocConfig :: [Comments] -> Verbosity -> Visibility -> DocConfig Source #
Constructor to create a DocConfig
Log Configuration
data OptionalFeatures Source #
makeOptFeats :: DocConfig -> LogConfig -> [SoftwareDossierFile] -> OptionalFeatures Source #
Constructor to create a OptionalFeatures
data Modularity Source #
Modularity of a program.
Variable structure options.
data ConstantStructure Source #
Constants options.
Constructors
| Inline | Inline values for constants. |
| WithInputs | Store constants with inputs. |
| Store Structure | Store constants separately from inputs, whether bundled or unbundled. |
data ConstantRepr Source #
Options for representing constants in a program.
type ConceptMatchMap = Map UID [CodeConcept] Source #
Specifies matches between chunks and CodeConcepts, meaning the target
language's pre-existing definition of the concept should be used instead of
defining a new variable for the concept in the generated code.
[CodeConcept] is preferentially-ordered, generator concretizes a
ConceptMatchMap to a MatchedConceptMap by checking user's other choices.
type MatchedConceptMap = Map UID CodeConcept Source #
Concrete version of ConceptMatchMap dependent on user choices.
data CodeConcept Source #
Code concepts. For now, just pi.
Constructors
| Pi |
Instances
| Eq CodeConcept Source # | |
Defined in Language.Drasil.Choices | |
matchConcepts :: HasUID c => [(c, [CodeConcept])] -> ConceptMatchMap Source #
Builds a ConceptMatchMap from an association list of chunks and CodeConcepts.
type SpaceMatch = Space -> [CodeType] Source #
matchSpaces :: [(Space, [CodeType])] -> SpaceMatch Source #
Builds a SpaceMatch from an association list of Spaces and CodeTypes.
data ImplementationType Source #
Program implementation options.
data ConstraintBehaviour Source #
Constraint behaviour options within program.
Comment implementation options.
Constructors
| CommentFunc | Function/method-level comments. |
| CommentClass | Class-level comments. |
| CommentMod | File/Module-level comments. |
Logging options for function calls and variable assignments. Eq instances required for Logging and Comments because generator needs to check membership of these elements in lists
data SoftwareDossierFile Source #
Currently we only support two kind of auxiliary files: sample input file, readme.
To generate a sample input file compatible with the generated program,
FilePath is the path to the user-provided file containing a sample set of input data.
Constructors
| SampleInput FilePath | |
| ReadME |
Instances
| Eq SoftwareDossierFile Source # | |
Defined in Language.Drasil.Choices Methods (==) :: SoftwareDossierFile -> SoftwareDossierFile -> Bool # (/=) :: SoftwareDossierFile -> SoftwareDossierFile -> Bool # | |
getSampleData :: Choices -> Maybe FilePath Source #
Gets the file path to a sample input data set from a Choices structure, if
the user chose to generate a sample input file.
hasSampleInput :: [SoftwareDossierFile] -> Bool Source #
Predicate that returns true if the list of SoftwareDossierFiles includes a SampleInput.
defaultChoices :: Choices Source #
Default choices to be used as the base from which design specifications can be built.
data InternalConcept Source #
Data type of internal concepts
Constructors
| InputConstraintsFn | |
| InputConstraintsMod | |
| WriteOutput | |
| DerivedValuesFn | |
| DerivedValuesMod | |
| GetInput | |
| InputParameters | |
| InputFormat | |
| OutputFormat | |
| Calculations | |
| Constants |
Instances
| Eq InternalConcept Source # | |
Defined in Language.Drasil.Choices Methods (==) :: InternalConcept -> InternalConcept -> Bool # (/=) :: InternalConcept -> InternalConcept -> Bool # | |
| Ord InternalConcept Source # | |
Defined in Language.Drasil.Choices Methods compare :: InternalConcept -> InternalConcept -> Ordering # (<) :: InternalConcept -> InternalConcept -> Bool # (<=) :: InternalConcept -> InternalConcept -> Bool # (>) :: InternalConcept -> InternalConcept -> Bool # (>=) :: InternalConcept -> InternalConcept -> Bool # max :: InternalConcept -> InternalConcept -> InternalConcept # min :: InternalConcept -> InternalConcept -> InternalConcept # | |