copilot-core-4.4: An intermediate representation for Copilot.
Copyright(c) 2011 National Institute of Aerospace / Galois Inc.
Safe HaskellSafe
LanguageHaskell2010

Copilot.Core.Expr

Description

 
Synopsis

Documentation

type Id = Int Source #

A stream identifier.

type Name = String Source #

A name of a trigger, an external variable, or an external function.

data Expr a where Source #

Internal representation of Copilot stream expressions.

The Core representation mimics the high-level Copilot stream, but the Core representation contains information about the types of elements in the stream.

Constructors

Const :: forall a. Typeable a => Type a -> a -> Expr a 
Drop :: forall a. Typeable a => Type a -> DropIdx -> Id -> Expr a 
Local :: forall a1 a. Typeable a1 => Type a1 -> Type a -> Name -> Expr a1 -> Expr a -> Expr a 
Var :: forall a. Typeable a => Type a -> Name -> Expr a 
ExternVar :: forall a. Typeable a => Type a -> Name -> Maybe [a] -> Expr a 
Op1 :: forall a1 a. Typeable a1 => Op1 a1 a -> Expr a1 -> Expr a 
Op2 :: forall a1 b a. (Typeable a1, Typeable b) => Op2 a1 b a -> Expr a1 -> Expr b -> Expr a 
Op3 :: forall a1 b c a. (Typeable a1, Typeable b, Typeable c) => Op3 a1 b c a -> Expr a1 -> Expr b -> Expr c -> Expr a 
Label :: forall a. Typeable a => Type a -> String -> Expr a -> Expr a 

data UExpr Source #

A untyped expression that carries the information about the type of the expression as a value, as opposed to exposing it at type level (using an existential).

Constructors

Typeable a => UExpr 

Fields

  • uExprType :: Type a

    Deprecated: These fields are deprecated in Copilot 4.2. Use pattern matching instead.

  • uExprExpr :: Expr a

    Deprecated: These fields are deprecated in Copilot 4.2. Use pattern matching instead.

type DropIdx = Word32 Source #

An index for the drop operator.