copilot-1.0: A stream DSL for writing embedded C monitors.

Language.Copilot.Interface

Description

Used by the end-user to easily give its arguments to dispatch.

Synopsis

Documentation

interface :: Options -> IO ()Source

The main function that dispatches.

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.

setV :: Verbose -> Options -> OptionsSource

Set the verbosity level.

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".

setArrs :: [(String, Int)] -> Options -> OptionsSource

Set the external arrays.

setClock :: Clock -> Options -> OptionsSource

Sets the hardware clock. See http:github.comtomahawkinsatomblobmasterLanguageAtom/Code.hs.