Commit fe3c7ca9 authored by Michael Hanus 's avatar Michael Hanus

Imports updated

parent c4404745
......@@ -13,6 +13,7 @@
"flatcurry" : ">= 2.0.0",
"propertyfile" : ">= 0.0.1",
"scc" : ">= 0.0.1",
"socket" : ">= 0.0.1",
"xml" : ">= 2.0.0"
},
"compilerCompatibility": {
......
......@@ -5,7 +5,7 @@
--- by other Curry applications.
---
--- @author Heiko Hoffmann, Michael Hanus
--- @version January 2017
--- @version December 2018
--------------------------------------------------------------------------
module CASS.Server
......@@ -18,15 +18,17 @@ import ReadNumeric (readNat)
import Char (isSpace)
import Directory
import FileGoodies (splitDirectoryBaseName)
import FlatCurry.Types(QName)
import IO
import ReadShowTerm (readQTerm, showQTerm)
import Socket (Socket(..),listenOn,listenOnFresh,sClose,waitForSocketAccept)
import System (system, sleep, setEnviron, getArgs)
import Analysis.Logging (debugMessage)
import Analysis.Logging ( debugMessage )
import Analysis.ProgInfo
import Analysis.Types(Analysis,AOutFormat(..))
import Analysis.Types ( Analysis, AOutFormat(..) )
import FlatCurry.Types ( QName )
import Network.Socket ( Socket(..), listenOn, listenOnFresh
, close, waitForSocketAccept )
import CASS.Configuration
import CASS.Registry
import CASS.ServerFormats
......@@ -63,7 +65,7 @@ mainServer mbport = do
debugMessage 2 ("SERVER: port to workers: "++show workerport)
handles <- startWorkers numworkers workersocket serveraddress workerport []
serverLoop socket1 handles
sClose workersocket
close workersocket
else
serverLoop socket1 []
......@@ -122,7 +124,7 @@ analyzeModule ananame moduleName enforce aoutformat = do
handles <- startWorkers numworkers socket serveraddress port []
result <- runAnalysisWithWorkers ananame aoutformat enforce handles mname
stopWorkers handles
sClose socket
close socket
return result
else runAnalysisWithWorkers ananame aoutformat enforce [] mname
setCurrentDirectory curdir
......@@ -149,7 +151,7 @@ analyzeGeneric analysis moduleName = do
handles <- startWorkers numworkers socket serveraddress port []
result <- analyzeMain analysis mname handles False True
stopWorkers handles
sClose socket
close socket
return result
else
analyzeMain analysis mname [] False True
......@@ -269,7 +271,7 @@ serverLoopOnHandle socket1 whandles handle = do
stopWorkers whandles
sendServerResult handle ""
hClose handle
sClose socket1
close socket1
putStrLn "Stop Server"
removeServerPortNumber
where
......
......@@ -2,7 +2,7 @@
--- Implementation of the analysis computations on the server side
---
--- @author Heiko Hoffmann, Michael Hanus
--- @version January 2015
--- @version December 2018
------------------------------------------------------------------------
-- analysis computations on the server side
......@@ -11,7 +11,6 @@ module CASS.ServerFunctions where
import FlatCurry.Types (QName)
import FlatCurry.Goodies (progImports)
import Socket(Socket(..),listenOnFresh,sClose,waitForSocketAccept)
import IO(Handle(..),hClose,hFlush,hGetLine,hPutStrLn,hWaitForInput,hWaitForInputs)
import ReadShowTerm(readQTerm,showQTerm)
import System(system,sleep)
......
......@@ -2,17 +2,18 @@
--- Implementation of a worker client to analyze a module
---
--- @author Heiko Hoffmann, Michael Hanus
--- @version March 2013
--- @version December 2018
------------------------------------------------------------------------
module CASS.Worker(main, startWorker) where
import IO(Handle,hClose,hFlush,hWaitForInput,hPutStrLn,hGetLine)
import ReadShowTerm(readQTerm)
import Socket(connectToSocket)
import System(getArgs,setEnviron)
import Analysis.Logging ( debugMessage )
import Network.Socket ( connectToSocket )
import CASS.Configuration ( waitTime, getDefaultPath )
import CASS.Registry ( lookupRegAnaWorker )
import CASS.ServerFunctions ( WorkerMessage(..) )
......
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