atom-0.0.1: A DSL for embedded hard realtime applications.

Language.Atom.Elaboration

Contents

Synopsis

Atom monad and container.

type Atom = StateT (Global, AtomDB) IOSource

The Atom container holds top level IO, Var, and Rule definitions.

data AtomDB Source

Constructors

AtomDB 

Fields

atomId :: Int
 
atomName :: Name
 
atomNames :: [Name]
 
atomEnable :: UE
 
atomSubs :: [AtomDB]
 
atomPeriod :: Int
 
atomAssigns :: [(UV, UE)]
 
atomActions :: [([String] -> String, [UE])]
 

Instances

data Global Source

Constructors

Global 

Fields

gId :: Int
 
gProbes :: [(String, Type, E Word64)]
 
gUVs :: [UV]
 
gPeriod :: Int
 
gAsserts :: [(String, UE)]
 

data Rule Source

Constructors

Rule 

Fields

ruleId :: Int
 
ruleName :: Name
 
ruleEnable :: UE
 
ruleAssigns :: [(UV, UE)]
 
ruleActions :: [([String] -> String, [UE])]
 
rulePeriod :: Int
 

Instances

Type Aliases and Utilities

type UID = IntSource

type Name = StringSource

A name.

type Path = [Name]Source

A heirarchical name.

elaborate :: Name -> Atom () -> IO (Maybe ([Rule], [UV], [(String, UE)]))Source

A Relation is used for relative performance constraints between Actions. data Relation = Higher UID | Lower UID deriving (Show, Eq)

Given a top level name and design, elabortes design and returns a design database.

var :: Name -> Const -> Atom (V a)Source

Generic variable declaration.