Module CASS.Server

This is the main module of the analysis server. It provides operations to initialize the server system, start the server on a socket, or use the analysis server by other Curry applications.

Author: Heiko Hoffmann, Michael Hanus

Version: February 2023

Summary of exported operations:

initializeAnalysisSystem :: IO ()  Deterministic 
Initializations to be done when the system is started.
mainServer :: CConfig -> Maybe Int -> IO ()  Non-deterministic 
Start the analysis server on a socket.
analyzeModuleAndPrint :: CConfig -> String -> String -> Bool -> Bool -> IO ()  Non-deterministic 
Run the analysis system and print the analysis results in standard textual representation.
analyzeModuleAsText :: CConfig -> String -> String -> Bool -> Bool -> IO String  Non-deterministic 
Run the analysis system and show the analysis results in standard textual representation.
analyzeModuleForBrowser :: String -> String -> AOutFormat -> IO [((String,String),String)]  Non-deterministic 
Run the analysis system to show the analysis results in the BrowserGUI.
analyzeFunctionForBrowser :: String -> (String,String) -> AOutFormat -> IO String  Non-deterministic 
Run the analysis system to show the analysis result of a single function in the BrowserGUI.
analyzeGeneric :: (Read a, Show a) => Analysis a -> String -> IO (Either (ProgInfo a) String)  Non-deterministic 
Start the analysis system with a particular analysis.
analyzeGenericWithDebug :: (Read a, Show a) => Maybe Int -> Analysis a -> String -> IO (Either (ProgInfo a) String)  Non-deterministic 
Start the analysis system with a particular analysis and an optional debug level (first argument).
analyzePublic :: (Read a, Show a) => Analysis a -> String -> IO (Either (ProgInfo a) String)  Non-deterministic 
Start the analysis system with a given analysis to compute properties of a module interface.
analyzeInterface :: (Read a, Show a) => Analysis a -> String -> IO (Either [((String,String),a)] String)  Non-deterministic 
Start the analysis system with a given analysis to compute properties of a module interface.

Exported operations:

initializeAnalysisSystem :: IO ()  Deterministic 

Initializations to be done when the system is started.

mainServer :: CConfig -> Maybe Int -> IO ()  Non-deterministic 

Start the analysis server on a socket.

analyzeModuleAndPrint :: CConfig -> String -> String -> Bool -> Bool -> IO ()  Non-deterministic 

Run the analysis system and print the analysis results in standard textual representation. If the fourth argument is true, all operations are shown, otherwise only the interface operations. The fifth argument is a flag indicating whether the (re-)analysis should be enforced.

analyzeModuleAsText :: CConfig -> String -> String -> Bool -> Bool -> IO String  Non-deterministic 

Run the analysis system and show the analysis results in standard textual representation. If the fourth argument is true, all operations are shown, otherwise only the interface operations. The fifth argument is a flag indicating whether the (re-)analysis should be enforced. Note that, before its first use, the analysis system must be initialized by initializeAnalysisSystem.

analyzeModuleForBrowser :: String -> String -> AOutFormat -> IO [((String,String),String)]  Non-deterministic 

Run the analysis system to show the analysis results in the BrowserGUI. The options are read from the rc file.

analyzeFunctionForBrowser :: String -> (String,String) -> AOutFormat -> IO String  Non-deterministic 

Run the analysis system to show the analysis result of a single function in the BrowserGUI. The options are read from the rc file.

analyzeGeneric :: (Read a, Show a) => Analysis a -> String -> IO (Either (ProgInfo a) String)  Non-deterministic 

Start the analysis system with a particular analysis. The analysis must be a registered one if workers are used. If it is a combined analysis, the base analysis must be also a registered one. The options are read from the rc file. Returns either the analysis information or an error message.

analyzeGenericWithDebug :: (Read a, Show a) => Maybe Int -> Analysis a -> String -> IO (Either (ProgInfo a) String)  Non-deterministic 

Start the analysis system with a particular analysis and an optional debug level (first argument). The analysis must be a registered one if workers are used. If it is a combined analysis, the base analysis must be also a registered one. The options are read from the rc file. Returns either the analysis information or an error message.

analyzePublic :: (Read a, Show a) => Analysis a -> String -> IO (Either (ProgInfo a) String)  Non-deterministic 

Start the analysis system with a given analysis to compute properties of a module interface. The analysis must be a registered one if workers are used. If it is a combined analysis, the base analysis must be also a registered one. Returns either the analysis information or an error message.

analyzeInterface :: (Read a, Show a) => Analysis a -> String -> IO (Either [((String,String),a)] String)  Non-deterministic 

Start the analysis system with a given analysis to compute properties of a module interface. The analysis must be a registered one if workers are used. If it is a combined analysis, the base analysis must be also a registered one.