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 (FlowsGraph A) (State InferState))
- type Params = (?flowsGraph :: FlowsGraph A, ?nameMap :: NameMap)
- runInferer :: InductionVarMapByASTBlock -> FlowsGraph A -> Inferer a -> (a, [LogLine])
- stencilInference :: NameMap -> InferMode -> Char -> ProgramFile (Analysis A) -> (ProgramFile (Analysis A), [LogLine])
- 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 -> Char -> Block (Analysis A) -> Inferer (Block (Analysis A))
- genSpecifications :: Params => InductionVarMapByASTBlock -> [Neighbour] -> [Block (Analysis A)] -> Writer EvalLog [([Variable], Specification)]
- genOffsets :: Params => InductionVarMapByASTBlock -> [Neighbour] -> [Block (Analysis A)] -> Writer EvalLog [(Variable, (Bool, [[Int]]))]
- strength :: Monad m => (a, m b) -> m (a, b)
- 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)
- indicesToRelativisedOffsets :: InductionVarMapByASTBlock -> Variable -> [Neighbour] -> [[Index (Analysis Annotation)]] -> Writer EvalLog (Maybe (Bool, [[Int]]))
- 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 (FlowsGraph A) (State InferState)) Source #
runInferer :: InductionVarMapByASTBlock -> FlowsGraph A -> Inferer a -> (a, [LogLine]) Source #
stencilInference :: NameMap -> InferMode -> Char -> ProgramFile (Analysis A) -> (ProgramFile (Analysis A), [LogLine]) 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 #
perBlockInfer :: Params => InferMode -> Char -> Block (Analysis A) -> Inferer (Block (Analysis A)) Source #
genSpecifications :: Params => InductionVarMapByASTBlock -> [Neighbour] -> [Block (Analysis A)] -> Writer EvalLog [([Variable], Specification)] Source #
genOffsets :: Params => InductionVarMapByASTBlock -> [Neighbour] -> [Block (Analysis A)] -> Writer EvalLog [(Variable, (Bool, [[Int]]))] 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 #
indicesToRelativisedOffsets :: InductionVarMapByASTBlock -> Variable -> [Neighbour] -> [[Index (Analysis Annotation)]] -> Writer EvalLog (Maybe (Bool, [[Int]])) 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 #