Safe Haskell | None |
---|---|
Language | Haskell98 |
- data InferMode
- data InferState = IS {}
- type EvalLog = [(String, Variable)]
- type LogLine = (SrcSpan, Either [([Variable], Specification)] (String, Variable))
- type Inferer = WriterT [LogLine] (ReaderT (Cycles, ProgramUnitName, TypeEnv A) (State InferState))
- type Cycles = [(Name, Name)]
- type Params = (?flowsGraph :: FlowsGraph A, ?nameMap :: NameMap)
- runInferer :: InductionVarMapByASTBlock -> Cycles -> ProgramUnitName -> TypeEnv A -> Inferer a -> (a, [LogLine])
- stencilInference :: NameMap -> InferMode -> ProgramFile (Analysis A) -> (ProgramFile (Analysis A), [LogLine])
- findVarFlowCycles :: Data a => ProgramFile a -> [(Name, Name)]
- findVarFlowCycles' :: Data a => ProgramFile (Analysis a) -> [(Name, Name)]
- genSpecsAndReport :: Params => InferMode -> SrcSpan -> [Neighbour] -> [Block (Analysis A)] -> Inferer [([Variable], Specification)]
- isArraySubscript :: Expression (Analysis A) -> Maybe [Index (Analysis A)]
- fromJustMsg :: [Char] -> Maybe t -> t
- perBlockInfer :: Params => InferMode -> Block (Analysis A) -> Inferer (Block (Analysis A))
- genSpecifications :: Params => InductionVarMapByASTBlock -> [Neighbour] -> [Block (Analysis A)] -> Writer EvalLog [([Variable], Specification)]
- genSubscripts :: Params => Bool -> Block (Analysis A) -> State [Int] (Map Variable [[Index (Analysis A)]])
- genRHSsubscripts :: Block (Analysis A) -> Map Variable [[Index (Analysis A)]]
- getInductionVar :: Maybe (DoSpecification (Analysis A)) -> [Variable]
- isStencilDo :: Block (Analysis A) -> Bool
- padZeros :: [[Int]] -> [[Int]]
- indicesToSpec :: InductionVarMapByASTBlock -> Variable -> [Neighbour] -> [[Index (Analysis Annotation)]] -> Writer EvalLog (Maybe Specification)
- relativise :: [Neighbour] -> [[Neighbour]] -> [[Neighbour]]
- consistentIVSuse :: [Neighbour] -> [[Neighbour]] -> Bool
- relativeIxsToSpec :: [[Int]] -> Maybe Specification
- isNeighbour :: Data a => Index (Analysis a) -> [Variable] -> Bool
- neighbourIndex :: InductionVarMapByASTBlock -> [Index (Analysis Annotation)] -> Maybe [Neighbour]
- data Neighbour
- = Neighbour Variable Int
- | Constant (Value ())
- | NonNeighbour
- neighbourToOffset :: Neighbour -> Maybe Int
- ixToNeighbour :: InductionVarMapByASTBlock -> Index (Analysis Annotation) -> Neighbour
- ixToNeighbour' :: Data a => [Variable] -> Index (Analysis a) -> Neighbour
- expToNeighbour :: forall a. Data a => [Variable] -> Expression (Analysis a) -> Neighbour
- isUnaryOrBinaryExpr :: Expression a -> Bool
- isVariableExpr :: Expression a -> Bool
- type TypeEnv a = Map TypeScope (Map String IDType)
- isArrayType :: TypeEnv A -> ProgramUnitName -> String -> Bool
Documentation
type Inferer = WriterT [LogLine] (ReaderT (Cycles, ProgramUnitName, TypeEnv A) (State InferState)) Source #
runInferer :: InductionVarMapByASTBlock -> Cycles -> ProgramUnitName -> TypeEnv A -> Inferer a -> (a, [LogLine]) Source #
stencilInference :: NameMap -> InferMode -> ProgramFile (Analysis A) -> (ProgramFile (Analysis A), [LogLine]) Source #
findVarFlowCycles :: Data a => ProgramFile a -> [(Name, Name)] Source #
Return list of variable names that flow into themselves via a 2-cycle
findVarFlowCycles' :: Data a => ProgramFile (Analysis a) -> [(Name, Name)] Source #
1 . Core inference over blocks
genSpecsAndReport :: Params => InferMode -> SrcSpan -> [Neighbour] -> [Block (Analysis A)] -> Inferer [([Variable], Specification)] Source #
fromJustMsg :: [Char] -> Maybe t -> t Source #
genSpecifications :: Params => InductionVarMapByASTBlock -> [Neighbour] -> [Block (Analysis A)] -> Writer EvalLog [([Variable], Specification)] Source #
genSubscripts :: Params => Bool -> Block (Analysis A) -> State [Int] (Map Variable [[Index (Analysis A)]]) Source #
isStencilDo :: Block (Analysis A) -> Bool Source #
2 .Conversion from indexing expressions
indicesToSpec :: InductionVarMapByASTBlock -> Variable -> [Neighbour] -> [[Index (Analysis Annotation)]] -> Writer EvalLog (Maybe Specification) Source #
relativeIxsToSpec :: [[Int]] -> Maybe Specification Source #
neighbourIndex :: InductionVarMapByASTBlock -> [Index (Analysis Annotation)] -> Maybe [Neighbour] Source #
Neighbour Variable Int | |
Constant (Value ()) | |
NonNeighbour |
ixToNeighbour :: InductionVarMapByASTBlock -> Index (Analysis Annotation) -> Neighbour Source #
isUnaryOrBinaryExpr :: Expression a -> Bool Source #
isVariableExpr :: Expression a -> Bool Source #