Commit f18d26b0 authored by Michael Hanus 's avatar Michael Hanus
Browse files

Option --all added to CASS

parent 7d1b0f6c
......@@ -5,7 +5,7 @@
--- by other Curry applications.
---
--- @author Heiko Hoffmann, Michael Hanus
--- @version June 2016
--- @version January 2017
--------------------------------------------------------------------------
module AnalysisServer(mainServer, initializeAnalysisSystem, analyzeModuleAsText,
......@@ -68,14 +68,16 @@ mainServer mbport = do
--- Run the analysis system and show the analysis results in standard textual
--- representation.
--- The third argument is a flag indicating whether the
--- If the third argument is true, all operations are shown,
--- otherwise only the interface operations.
--- The fourth 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'.
analyzeModuleAsText :: String -> String -> Bool -> IO String
analyzeModuleAsText ananame mname enforce =
analyzeModuleAsText :: String -> String -> Bool -> Bool -> IO String
analyzeModuleAsText ananame mname optall enforce =
analyzeModule ananame (stripSuffix mname) enforce AText >>=
return . formatResult mname "Text" Nothing True
return . formatResult mname "Text" Nothing (not optall)
--- Run the analysis system to show the analysis results in the BrowserGUI.
--- Note that, before its first use, the analysis system must be initialized
......
......@@ -6,7 +6,7 @@
--- the analysis server (which is implicitly started if necessary).
---
--- @author Michael Hanus
--- @version August 2016
--- @version January 2017
--------------------------------------------------------------------------
module Configuration
......@@ -31,7 +31,7 @@ import Char(isSpace)
systemBanner :: String
systemBanner =
let bannerText = "CASS: Curry Analysis Server System ("++
"version of 25/08/2016 for "++curryCompiler++")"
"version of 12/01/2017 for "++curryCompiler++")"
bannerLine = take (length bannerText) (repeat '=')
in bannerLine ++ "\n" ++ bannerText ++ "\n" ++ bannerLine
......
......@@ -2,7 +2,7 @@
--- This is the main module to start the executable of the analysis system.
---
--- @author Michael Hanus
--- @version August 2016
--- @version January 2017
--------------------------------------------------------------------------
module Main(main) where
......@@ -48,7 +48,7 @@ main = do
fullananame <- checkAnalysisName ananame
putStrLn $ "Computing results for analysis `" ++ fullananame ++ "'"
analyzeModuleAsText fullananame (stripCurrySuffix mname)
(optReAna opts) >>= putStrLn
(optAll opts) (optReAna opts) >>= putStrLn
where
deleteFiles args = case args of
[aname] -> do fullaname <- checkAnalysisName aname
......@@ -79,6 +79,7 @@ data Options = Options
, optVerb :: Int -- verbosity level
, optServer :: Bool -- start CASS in server mode?
, optPort :: Int -- port number (if used in server mode)
, optAll :: Bool -- show analysis results for all operations?
, optReAna :: Bool -- force re-analysis?
, optDelete :: Bool -- delete analysis files?
, optProp :: [(String,String)] -- property (of ~/.curryanalsisrc) to be set
......@@ -91,6 +92,7 @@ defaultOptions = Options
, optVerb = -1
, optServer = False
, optPort = 0
, optAll = False
, optReAna = False
, optDelete = False
, optProp = []
......@@ -106,18 +108,21 @@ options =
, Option "v" ["verbosity"]
(ReqArg (safeReadNat checkVerb) "<n>")
"verbosity/debug level:\n0: quiet (same as `-q')\n1: show worker activity, e.g., timings\n2: show server communication\n3: ...and show read/store information\n4: ...show also stored/computed analysis data\n(default: see debugLevel in ~/.curryanalysisrc)"
, Option "s" ["server"]
(NoArg (\opts -> opts { optServer = True }))
"start analysis system in server mode"
, Option "p" ["port"]
(ReqArg (safeReadNat (\n opts -> opts { optPort = n })) "<n>")
"port number for communication\n(only for server mode;\n if omitted, a free port number is selected)"
, Option "a" ["all"]
(NoArg (\opts -> opts { optAll = True }))
"show-analysis results for all operations\n(i.e., also for non-exported operations)"
, Option "r" ["reanalyze"]
(NoArg (\opts -> opts { optReAna = True }))
"force re-analysis \n(i.e., ignore old analysis information)"
, Option "d" ["delete"]
(NoArg (\opts -> opts { optDelete = True }))
"delete existing analysis results"
, Option "s" ["server"]
(NoArg (\opts -> opts { optServer = True }))
"start analysis system in server mode"
, Option "p" ["port"]
(ReqArg (safeReadNat (\n opts -> opts { optPort = n })) "<n>")
"port number for communication\n(only for server mode;\n if omitted, a free port number is selected)"
, Option "D" []
(ReqArg checkSetProperty "name=v")
"set property (of ~/.curryanalysisrc)\n`name' as `v'"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment