Operations to implement the client workers. In particular, it contains some simple fixpoint computations.
Author: Heiko Hoffmann, Michael Hanus
Version: July 2024
newProgInfoStoreRef
:: IO (IORef [(String,ProgInfo a)])
|
analysisClient
:: (Eq a, Show a, Read a, ReadWrite a) => Analysis a -> CConfig -> [String] -> IO ()
Analyze a list of modules (in the given order) with a given analysis. |
analysisClientWithStore
:: (Eq a, Show a, Read a, ReadWrite a) => CConfig -> IORef [(String,ProgInfo a)] -> Analysis a -> String -> String -> IO ()
|
getInterfaceInfosWS
:: (Read a, ReadWrite a) => CConfig -> IORef [(String,ProgInfo a)] -> String -> [String] -> IO (ProgInfo a)
|
getStartValues
:: Analysis a -> Prog -> IO [((String,String),a)]
Compute the start (bottom) values for a dependency analysis. |
funcInfos2ProgInfo
:: Prog -> [((String,String),a)] -> ProgInfo a
Compute a ProgInfo from a given list of infos for each function name w.r.t. |
typeInfos2ProgInfo
:: Prog -> [((String,String),a)] -> ProgInfo a
Compute a ProgInfo from a given list of infos for each type name w.r.t. |
map2
:: (a -> b) -> ([a],[a]) -> ([b],[b])
|
updateList
:: Eq a => [(a,b)] -> [(a,b)] -> [(a,b)]
Update a given value list (second argument) w.r.t. |
updateValue
:: Eq a => (a,b) -> [(a,b)] -> [(a,b)]
|
execCombinedAnalysis
:: (Eq a, Read a) => CConfig -> Analysis a -> Prog -> ProgInfo a -> [((String,String),a)] -> String -> String -> IO (ProgInfo a)
|
runAnalysis
:: (Eq a, Read a) => CConfig -> Analysis a -> Prog -> ProgInfo a -> [((String,String),a)] -> String -> IO (ProgInfo a)
Run an analysis but load default values (e.g., for external operations) before and do not analyse the operations or types for these defaults. |
executeAnalysis
:: Eq a => Analysis a -> Prog -> ProgInfo a -> [((String,String),a)] -> String -> ProgInfo a
Executes an anlysis on a given program w.r.t. |
unknownFixpointMessage
:: String
|
addCalledFunctions
:: FuncDecl -> (FuncDecl,[(String,String)])
Add the directly called functions to each function declaration. |
addUsedTypes
:: TypeDecl -> (TypeDecl,[(String,String)])
Add the directly used type constructors to each type declaration. |
consDeclsOfType
:: TypeDecl -> [ConsDecl]
Gets all constructors of datatype declaration. |
simpleIteration
:: Eq a => (b -> [((String,String),a)] -> a) -> (b -> (String,String)) -> ([(b,[(String,String)])],[(b,[(String,String)])]) -> ProgInfo a -> ProgInfo a -> ProgInfo a
Fixpoint iteration to compute analysis information. |
wlIteration
:: (Eq a, Eq b) => (a -> [((String,String),b)] -> b) -> (a -> (String,String)) -> [(a,[(String,String)])] -> [(a,[(String,String)])] -> RedBlackTree (String,String) -> ProgInfo b -> Map (String,String) b -> Map (String,String) b
|
lookupError
:: String -> (String,String) -> a
|
isVisibleFunc
:: FuncDecl -> Bool
|
isVisibleType
:: TypeDecl -> Bool
|
Type synonym: ProgInfoStore a = [(String,ProgInfo a)]
|
Analyze a list of modules (in the given order) with a given analysis. The analysis results are stored in the corresponding analysis result files. |
|
|
Compute the start (bottom) values for a dependency analysis. |
Compute a ProgInfo from a given list of infos for each function name w.r.t. a given program. |
Compute a ProgInfo from a given list of infos for each type name w.r.t. a given program. |
|
Update a given value list (second argument) w.r.t. new values given in the first argument list. |
|
|
Run an analysis but load default values (e.g., for external operations) before and do not analyse the operations or types for these defaults. |
Executes an anlysis on a given program w.r.t. an imported ProgInfo and some start values (for dependency analysis). The fixpoint iteration method to be applied is passed as the last argument. |
|
Add the directly called functions to each function declaration. |
Add the directly used type constructors to each type declaration. |
Gets all constructors of datatype declaration.
|
Fixpoint iteration to compute analysis information. The arguments are:
Result: fixpoint ProgInfo |
|
|
|
|