module Syfco
(
Configuration(..)
, WriteFormat(..)
, WriteMode(..)
, Semantics(..)
, Target(..)
, Specification
, Error
, defaultCfg
, update
, verify
, source
, title
, description
, semantics
, target
, tags
, parameters
, signals
, inputs
, outputs
, symboltable
, fromTLSF
, apply
, checkGR
, version
) where
import Data.Types
( Semantics(..)
, Target(..)
)
import Data.Error
( Error
)
import Config
( Configuration(..)
, defaultCfg
, update
, verify
)
import Writer.Data
( WriteMode(..)
)
import Writer
( WriteFormat(..)
, apply
)
import Writer.Eval
( signals
)
import Data.Specification
( Specification
, source
, title
, description
, semantics
, target
, tags
)
import qualified Data.Specification as S
( symboltable
, parameters
)
import Reader
( fromTLSF
)
import Detection
( checkGR
)
import Data.Binding
( BindExpr(..)
)
import Data.SymbolTable
( IdRec(..)
, st2csv
)
import Data.Array
( (!)
)
import Writer.Eval
( eval
)
import Data.LTL
( Formula(..)
, fmlInputs
, fmlOutputs
)
import Data.Info
( version
)
parameters
:: Specification -> [String]
parameters s =
map (idName . ((S.symboltable s) !) . bIdent) $ S.parameters s
inputs
:: Configuration -> Specification -> Either Error [String]
inputs c s = case signals c s of
Left err -> Left err
Right (is,_) -> return is
outputs
:: Configuration -> Specification -> Either Error [String]
outputs c s = case signals c s of
Left err -> Left err
Right (_,os) -> return os
symboltable
:: Specification -> String
symboltable =
st2csv . S.symboltable