Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data InferMode
- data InferState = IS {
- ivMap :: InductionVarMapByASTBlock
- hasSpec :: [(SrcSpan, Variable)]
- type EvalLog = [(String, Variable)]
- type LogLine = (SrcSpan, Either [([Variable], Specification)] (String, Variable))
- type Inferer = WriterT [LogLine] (ReaderT (Cycles, ProgramUnitName) (State InferState))
- type Cycles = [(Name, Name)]
- type Params = (?flowsGraph :: FlowsGraph A, ?nameMap :: NameMap)
- runInferer :: InductionVarMapByASTBlock -> Cycles -> ProgramUnitName -> 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
- 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
Documentation
data InferState Source #
type Inferer = WriterT [LogLine] (ReaderT (Cycles, ProgramUnitName) (State InferState)) Source #
runInferer :: InductionVarMapByASTBlock -> Cycles -> ProgramUnitName -> 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 #
isArraySubscript :: Expression (Analysis A) -> Maybe [Index (Analysis A)] 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 #
getInductionVar :: Maybe (DoSpecification (Analysis A)) -> [Variable] 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 #
expToNeighbour :: forall a. Data a => [Variable] -> Expression (Analysis a) -> Neighbour Source #
isUnaryOrBinaryExpr :: Expression a -> Bool Source #
isVariableExpr :: Expression a -> Bool Source #