Module Analysis.ProgInfo

This module defines a datatype to represent the analysis information.

Author: Heiko Hoffmann, Michael Hanus

Version: January 2025

Summary of exported operations:

emptyProgInfo :: ProgInfo a  Deterministic 
The empty program information.
lookupProgInfo :: (String,String) -> ProgInfo a -> Maybe a  Deterministic 
Gets the information about an entity.
combineProgInfo :: ProgInfo a -> ProgInfo a -> ProgInfo a  Deterministic 
Combines two analysis informations.
lists2ProgInfo :: ([((String,String),a)],[((String,String),a)]) -> ProgInfo a  Deterministic 
Converts a public and a private analysis list into a program info.
publicListFromProgInfo :: ProgInfo a -> [((String,String),a)]  Deterministic 
Returns the infos of public operations as a list.
progInfo2Lists :: ProgInfo a -> ([((String,String),a)],[((String,String),a)])  Deterministic 
Transforms a program information into a pair of lists containing the information about public and private entities.
mapProgInfo :: (a -> b) -> ProgInfo a -> ProgInfo b  Deterministic 
Transforms a program information by applying a function to all information entities.
publicProgInfo :: ProgInfo a -> ProgInfo a  Deterministic 
Transforms a program information into a program information about interface entities only.
showProgInfo :: Show a => ProgInfo a -> String  Deterministic 
Show a ProgInfo as a string (used for debugging only).
equalProgInfo :: Eq a => ProgInfo a -> ProgInfo a -> Bool  Deterministic 
writeAnalysisFiles :: (ReadWrite a, Show a) => DLevel -> String -> ProgInfo a -> IO ()  Deterministic 
Writes a ProgInfo into a file.
readAnalysisFiles :: (Read a, ReadWrite a) => DLevel -> String -> IO (ProgInfo a)  Deterministic 
Reads a ProgInfo from the analysis files where the base file name is given.
readAnalysisPublicFile :: (Read a, ReadWrite a) => DLevel -> String -> IO (ProgInfo a)  Deterministic 
Reads the public ProgInfo from an existing public analysis file and set the private information to empty.
readAnalysisPrivateFile :: (Read a, ReadWrite a) => DLevel -> String -> IO (ProgInfo a)  Deterministic 
Reads the private ProgInfo from a private analysis file and set the public information to empty.
readAnalysisFile :: (Read a, ReadWrite a) => DLevel -> String -> IO (Map (String,String) a)  Deterministic 
Reads an existing file with (public or private) analysis information.

Exported datatypes:


ProgInfo

Type to represent analysis information. The first component are public declarations, the second the private ones.

Constructors:


Exported operations:

emptyProgInfo :: ProgInfo a  Deterministic 

The empty program information.

Further infos:
  • solution complete, i.e., able to compute all solutions

lookupProgInfo :: (String,String) -> ProgInfo a -> Maybe a  Deterministic 

Gets the information about an entity.

combineProgInfo :: ProgInfo a -> ProgInfo a -> ProgInfo a  Deterministic 

Combines two analysis informations.

lists2ProgInfo :: ([((String,String),a)],[((String,String),a)]) -> ProgInfo a  Deterministic 

Converts a public and a private analysis list into a program info.

publicListFromProgInfo :: ProgInfo a -> [((String,String),a)]  Deterministic 

Returns the infos of public operations as a list.

progInfo2Lists :: ProgInfo a -> ([((String,String),a)],[((String,String),a)])  Deterministic 

Transforms a program information into a pair of lists containing the information about public and private entities.

mapProgInfo :: (a -> b) -> ProgInfo a -> ProgInfo b  Deterministic 

Transforms a program information by applying a function to all information entities.

publicProgInfo :: ProgInfo a -> ProgInfo a  Deterministic 

Transforms a program information into a program information about interface entities only.

Further infos:
  • solution complete, i.e., able to compute all solutions

showProgInfo :: Show a => ProgInfo a -> String  Deterministic 

Show a ProgInfo as a string (used for debugging only).

equalProgInfo :: Eq a => ProgInfo a -> ProgInfo a -> Bool  Deterministic 

writeAnalysisFiles :: (ReadWrite a, Show a) => DLevel -> String -> ProgInfo a -> IO ()  Deterministic 

Writes a ProgInfo into a file.

readAnalysisFiles :: (Read a, ReadWrite a) => DLevel -> String -> IO (ProgInfo a)  Deterministic 

Reads a ProgInfo from the analysis files where the base file name is given.

readAnalysisPublicFile :: (Read a, ReadWrite a) => DLevel -> String -> IO (ProgInfo a)  Deterministic 

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)  Deterministic 

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)  Deterministic 

Reads an existing file with (public or private) analysis information.