Language.Atom.Code
Description
Atom C code generation.
Synopsis
- data Config = Config {
- cFuncName :: String
- cStateName :: String
- cCode :: [Name] -> [Name] -> [(Name, Type)] -> (String, String)
- cRuleCoverage :: Bool
- cAssert :: Bool
- cAssertName :: String
- cCoverName :: String
- writeC :: Name -> Config -> StateHierarchy -> [Rule] -> Schedule -> [Name] -> [Name] -> [(Name, Type)] -> IO RuleCoverage
- defaults :: Config
- cType :: Type -> String
- type RuleCoverage = [(Name, Int, Int)]
Documentation
C code configuration parameters.
Constructors
Fields
- cFuncName :: String
Alternative primary function name. Leave empty to use compile name.
- cStateName :: String
Name of state variable structure. Default: state
- cCode :: [Name] -> [Name] -> [(Name, Type)] -> (String, String)
Custom C code to insert above and below, given assertion names, coverage names, and probe names and types.
- cRuleCoverage :: Bool
Enable rule coverage tracking.
- cAssert :: Bool
Enable assertions and functional coverage.
- cAssertName :: String
Name of assertion function. Type: void assert(int, bool, uint64_t);
- cCoverName :: String
Name of coverage function. Type: void cover(int, bool, uint64_t);
writeC :: Name -> Config -> StateHierarchy -> [Rule] -> Schedule -> [Name] -> [Name] -> [(Name, Type)] -> IO RuleCoverage Source
Default C code configuration parameters (default function name, no pre/post code, ANSI C types).
type RuleCoverage = [(Name, Int, Int)]Source