Commit d33b8979 authored by Michael Hanus 's avatar Michael Hanus

Imports updated

parents 065be924 0a568845
Pipeline #311 failed with stages
--- Analyzing the residuation behavior of a module and returns
--- some statistical information.
import List ( intercalate, partition )
import FlatCurry.Types ( QName )
import CASS.Server ( analyzeGeneric )
import Analysis.ProgInfo ( progInfo2Lists )
import Analysis.Residuation -- ( demandAnalysis )
residuationInfoOf :: String
-> IO ([(QName,ResiduationInfo)],[(QName,ResiduationInfo)])
residuationInfoOf modname = do
analyzeGeneric residuationAnalysis modname
>>= return . either progInfo2Lists error
countResOps :: String -> IO [String]
countResOps mname = do
putStrLn $ "Analyzing module " ++ mname ++ "..."
(pubres,privres) <- residuationInfoOf mname
let (resops,nonresops) = partition (\(_,i) -> i==MayResiduate || i==NoResInfo)
(pubres ++ privres)
return [mname, show (length resops), show (length nonresops)]
printCountResOps :: [String] -> IO ()
printCountResOps mname = do
stats <- mapIO countResOps mname
putStrLn $ "Module | Residuating | Non-residuating"
mapIO_ (\row -> putStrLn (intercalate "|" row)) stats
main :: IO ()
main = printCountResOps baseModules
baseModules :: [String]
baseModules = ["Prelude","List","Char"]
allBaseModules :: [String]
allBaseModules =
["AllSolutions"
,"AnsiCodes"
,"Char"
,"Combinatorial"
,"CPNS"
,"Debug"
,"Dequeue"
,"Directory"
,"Distribution"
,"Either"
,"ErrorState"
,"FileGoodies"
,"FilePath"
,"Findall"
,"FiniteMap"
,"Float"
,"Format"
,"Function"
,"FunctionInversion"
,"GetOpt"
,"Global"
,"Integer"
,"IO"
,"IOExts"
,"List"
,"Maybe"
,"NamedSocket"
,"Nat"
,"Prelude"
,"Profile"
,"PropertyFile"
,"Random"
,"Read"
,"ReadNumeric"
,"ReadShowTerm"
,"RedBlackTree"
,"SearchTree"
,"SearchTreeGenerators"
,"SearchTreeTraversal"
,"SetFunctions"
,"SetRBT"
,"ShowS"
,"Socket"
,"Sort"
,"State"
,"System"
,"TableRBT"
,"Time"
,"Traversal"
,"Unsafe"
,"ValueSequence"
]
\ No newline at end of file
......@@ -7,10 +7,12 @@
"license": "BSD-3-Clause",
"licenseFile": "LICENSE",
"dependencies": {
"cass-analysis": ">= 2.0.0",
"flatcurry" : ">= 2.0.0",
"scc" : ">= 0.0.1",
"xml" : ">= 2.0.0"
"base" : ">= 1.0.0, < 2.0.0",
"cass-analysis" : ">= 2.0.0",
"currypath" : ">= 0.0.1",
"flatcurry" : ">= 2.0.0",
"scc" : ">= 0.0.1",
"xml" : ">= 2.0.0"
},
"compilerCompatibility": {
"pakcs": ">= 2.0.0",
......
......@@ -2,28 +2,28 @@
--- This is the main module to start the executable of the analysis system.
---
--- @author Michael Hanus
--- @version March 2017
--- @version December 2018
--------------------------------------------------------------------------
module CASS.Main(main) where
module CASS.Main ( main ) where
import Char (toLower)
import Distribution (stripCurrySuffix)
import FilePath ((</>), (<.>))
import Char ( toLower )
import FilePath ( (</>), (<.>) )
import GetOpt
import List (isPrefixOf)
import ReadNumeric (readNat)
import ReadShowTerm (readQTerm)
import Sort (sort)
import System (exitWith,getArgs)
import List ( isPrefixOf )
import ReadNumeric ( readNat )
import ReadShowTerm ( readQTerm )
import Sort ( sort )
import System ( exitWith, getArgs )
import Analysis.Files (deleteAllAnalysisFiles)
import Analysis.Logging (debugMessage)
import CASS.Doc (getAnalysisDoc)
import Analysis.Files ( deleteAllAnalysisFiles )
import Analysis.Logging ( debugMessage )
import CASS.Doc ( getAnalysisDoc )
import CASS.Server
import CASS.Configuration
import CASS.Registry
import CASS.Worker (startWorker)
import CASS.Worker ( startWorker )
import System.CurryPath ( stripCurrySuffix )
--- Main function to start the analysis system.
--- With option -s or --server, the server is started on a socket.
......
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