The Atom language.
- module Language.Atom.Expressions
- type Atom = Atom
- atom :: Name -> Atom a -> Atom a
- period :: Int -> Atom a -> Atom a
- getPeriod :: Atom Int
- cond :: E Bool -> Atom ()
- class Expr a => Assign a where
- incr :: (Assign a, NumE a) => V a -> Atom ()
- decr :: (Assign a, NumE a) => V a -> Atom ()
- var :: Name -> Const -> Atom (V a)
- var' :: Name -> Type -> Atom (V a)
- bool :: Name -> Bool -> Atom (V Bool)
- bool' :: Name -> Atom (V Bool)
- int8 :: Name -> Int8 -> Atom (V Int8)
- int8' :: Name -> Atom (V Int8)
- int16 :: Name -> Int16 -> Atom (V Int16)
- int16' :: Name -> Atom (V Int16)
- int32 :: Name -> Int32 -> Atom (V Int32)
- int32' :: Name -> Atom (V Int32)
- int64 :: Name -> Int64 -> Atom (V Int64)
- int64' :: Name -> Atom (V Int64)
- word8 :: Name -> Word8 -> Atom (V Word8)
- word8' :: Name -> Atom (V Word8)
- word16 :: Name -> Word16 -> Atom (V Word16)
- word16' :: Name -> Atom (V Word16)
- word32 :: Name -> Word32 -> Atom (V Word32)
- word32' :: Name -> Atom (V Word32)
- word64 :: Name -> Word64 -> Atom (V Word64)
- word64' :: Name -> Atom (V Word64)
- float :: Name -> Float -> Atom (V Float)
- float' :: Name -> Atom (V Float)
- double :: Name -> Double -> Atom (V Double)
- double' :: Name -> Atom (V Double)
- action :: ([String] -> String) -> [UE] -> Atom ()
- assert :: Name -> E Bool -> Atom ()
- probe :: Expr a => Name -> E a -> Atom ()
- probes :: Atom [(String, Type, E Word64)]
- type Name = String
- liftIO :: MonadIO m => forall a. IO a -> m a
- path :: Atom String
- clock :: E Word64
- nextCoverage :: Atom (E Word32, E Word32)
Documentation
module Language.Atom.Expressions
Primary Language Containers
A Atom captures declarations including inputs, outputs, variables, and assertions and actions including guard conditions and variable assignments.
Hierarchical Rule Declarations
atom :: Name -> Atom a -> Atom aSource
Creates a hierarical node, where each node could be a atomic rule.
period :: Int -> Atom a -> Atom aSource
Defines the period of execution of sub rules as a factor of the base rate of the system. Rule period is bound by the closest period assertion. For example:
period 10 $ period 2 a -- Rules in 'a' have a period of 2, not 10.
Action Directives
cond :: E Bool -> Atom ()Source
Adds an enabling condition to an atom subtree of rules. This condition must be true before any rules in heirarchy are allowed to execute.