This module defines a datatype to represent the analysis information.
data ProgInfo a
Type to represent analysis information. The first component are public declarations, the second the private ones.
emptyProgInfo
:: ProgInfo a
The empty program information.
lookupProgInfo
:: (String, String) -> ProgInfo a -> Maybe a
Gets the information about an entity.
combineProgInfo
:: ProgInfo a -> ProgInfo a -> ProgInfo a
Combines two analysis informations.
lists2ProgInfo
:: ([((String, String), a)], [((String, String), a)]) -> ProgInfo a
Converts a public and a private analysis list into a program info.
publicMap2ProgInfo
:: Map (String, String) a -> ProgInfo a
Converts a map of public analysis infos into a program info.
publicListFromProgInfo
:: ProgInfo a -> [((String, String), a)]
Returns the infos of public operations as a list.
progInfo2Lists
:: ProgInfo a -> ([((String, String), a)], [((String, String), a)])
Transforms a program information into a pair of lists containing the information about public and private entities.
mapProgInfo
:: (a -> b) -> ProgInfo a -> ProgInfo b
Transforms a program information by applying a function to all information entities.
publicProgInfo
:: ProgInfo a -> ProgInfo a
Transforms a program information into a program information about interface entities only.
showProgInfo
:: Show a => ProgInfo a -> String
Show a ProgInfo as a string (used for debugging only).
equalProgInfo
:: Eq a => ProgInfo a -> ProgInfo a -> Bool
writeAnalysisFiles
:: (ReadWrite a, Show a) => DLevel -> String -> ProgInfo a -> IO ()
Writes a ProgInfo into a file.
readAnalysisFiles
:: (Read a, ReadWrite a) => DLevel -> String -> IO (ProgInfo a)
Reads a ProgInfo from the analysis files where the base file name is given.
readAnalysisPublicFile
:: (Read a, ReadWrite a) => DLevel -> String -> IO (ProgInfo a)
Reads the public ProgInfo
from an existing public analysis file and
set the private information to empty.
If the file is buggy, an error is raised.
readAnalysisPrivateFile
:: (Read a, ReadWrite a) => DLevel -> String -> IO (ProgInfo a)
Reads the private ProgInfo
from a private analysis file and
set the public information to empty. If the private analysis file
does not exist, the empty ProgInfo
is returned.
If the file is buggy, an error is raised.
readAnalysisFile
:: (Read a, ReadWrite a) => DLevel -> String -> IO (Map (String, String) a)
Reads an existing file with (public or private) analysis information.