copilot-0.22: A stream DSL for writing embedded C.Source codeContentsIndex
Language.Copilot.Analyser
Contents
Main error checking functions
Varied other things
Description
This module provides a way to check that a Copilot specification is compilable
Synopsis
check :: StreamableMaps Spec -> Maybe Error
data Error
= BadSyntax String Var
| BadDrop Int Var
| BadSamplingPhase Var Var Phase
| BadType Var Var
| NonNegativeWeightedClosedPath [Var] Weight
| DependsOnClosePast [Var] Var Weight Weight
| DependsOnFuture [Var] Var Weight
data SpecSet
= AllSpecSet
| FunSpecSet
| DropSpecSet
getExternalVars :: StreamableMaps Spec -> [(Type, Var, Phase)]
getAtomType :: Streamable a => Spec a -> Type
Main error checking functions
check :: StreamableMaps Spec -> Maybe Error
Check a Copilot specification. If it is not compilable, then returns an error describing the issue. Else, returns Nothing
data Error
Used for representing an error in the specification, detected by check
Constructors
BadSyntax String Varthe BNF is not respected
BadDrop Int VarA drop expression of less than 0 is used
BadSamplingPhase Var Var Phaseif an external variable is sampled at phase 0 then there is no time for the stream to be updated
BadType Var Vareither a variable is not defined, or not with the good type ; there is no implicit conversion of types in Copilot
NonNegativeWeightedClosedPath [Var] WeightThe algorithm to compile Copilot specification can only work if there is no negative weighted closed path in the specification, as described in the original research paper
DependsOnClosePast [Var] Var Weight WeightCould be compiled, but would need bigger prophecyArrays
DependsOnFuture [Var] Var WeightIf an output depends of a future of an input it will be hard to compile to say the least
show/hide Instances
data SpecSet
Constructors
AllSpecSet
FunSpecSet
DropSpecSet
show/hide Instances
Varied other things
getExternalVars :: StreamableMaps Spec -> [(Type, Var, Phase)]
getAtomType :: Streamable a => Spec a -> Type
Produced by Haddock version 2.6.1