Language.Copilot.Interface
Description
Used by the end-user to easily give its arguments to dispatch.
- data Options
- baseOpts :: Options
- test :: Int -> Options -> IO ()
- interpret :: Streams -> Int -> Options -> IO ()
- compile :: Streams -> Name -> Options -> IO ()
- verify :: FilePath -> Int -> IO ()
- interface :: Options -> IO ()
- help :: IO ()
- setS :: DistributedStreams -> Options -> Options
- setE :: Vars -> Options -> Options
- setC :: String -> Options -> Options
- setO :: Name -> Options -> Options
- setP :: Period -> Options -> Options
- setI :: Options -> Options
- setPP :: (String, String) -> Options -> Options
- setN :: Int -> Options -> Options
- setV :: Verbose -> Options -> Options
- setR :: Int -> Options -> Options
- setDir :: String -> Options -> Options
- setGCC :: String -> Options -> Options
- setTriggers :: [(Var, String)] -> Options -> Options
- setArrs :: [(String, Int)] -> Options -> Options
- module Language.Copilot.Dispatch
Documentation
setS :: DistributedStreams -> Options -> OptionsSource
setE :: Vars -> Options -> OptionsSource
Sets the environment for simulation by giving a mapping of external variables to lists of values. E.g.,
setE (emptySM {w32Map = fromList [("ext", [0,1..])]}) ...
sets the external variable names ext to take the natural numbers, up to the limit of Word32.
setC :: String -> Options -> OptionsSource
Sets the options for the compiler, e.g.,
setC "-O2" ...
Sets gcc options.
setP :: Period -> Options -> OptionsSource
Manually set the period for the program. Otherwise, the minimum required period is computed automatically. E.g.,
setP 100 ...
sets the period to be 100. The period must be at least 1.
setPP :: (String, String) -> Options -> OptionsSource
Sets the code to precede and follow the copilot specification If nothing, then code appropriate for communication with the interpreter is generated
setN :: Int -> Options -> OptionsSource
Sets the number of iterations of the program to simulation:
setN 50
simulations the program for 50 steps.
setDir :: String -> Options -> OptionsSource
Sets the directory into which the output of compiled programs should be placed. If the directory does not exist, it will be created.
setGCC :: String -> Options -> OptionsSource
Sets the compiler to use, given as a path to the executable. The default is "gcc".
setTriggers :: [(Var, String)] -> Options -> OptionsSource
Give C function triggers for Copilot Boolean streams. The tiggers fire if the stream becoms true.
module Language.Copilot.Dispatch