Some goodies to deal with type-annotated FlatCurry programs.
Author: Michael Hanus
Version: March 2019
getAllFunctions
:: IORef VState -> [AFuncDecl TypeExpr] -> [(String,String)] -> IO [AFuncDecl TypeExpr]
Extract all user-defined typed FlatCurry functions that might be called by a given list of functions. |
funcsOfFuncDecl
:: AFuncDecl TypeExpr -> [(String,String)]
Returns the names of all functions/constructors occurring in the body of a function declaration. |
ndExpr
:: AExpr TypeExpr -> Bool
Returns True
if the expression is non-deterministic,
i.e., if Or
or Free
occurs in the expression.
|
isPrimOp
:: (String,String) -> Bool
Is a qualified FlatCurry name primitive? |
preludePrimOps
:: [(String,String)]
Primitive operations of the prelude and their SMT names. |
primCons
:: [(String,String)]
Primitive constructors from the prelude and their SMT names. |
standardConstructors
:: [(String,String)]
|
baseType
:: (String,String) -> TypeExpr
A base FlatCurry type. |
unitType
:: TypeExpr
|
charType
:: TypeExpr
|
boolType
:: TypeExpr
|
listType
:: TypeExpr -> TypeExpr
Constructs a list type from an element type. |
stringType
:: TypeExpr
|
tupleType
:: [TypeExpr] -> TypeExpr
Constructs a tuple type from list of component types. |
tupleExpr
:: [AExpr TypeExpr] -> AExpr TypeExpr
Constructs a tuple expression. |
string2TFCY
:: String -> AExpr TypeExpr
|
tupleCons
:: Int -> (String,String)
Generates an n -ary tuple constructor (only meaningful for n>1 ).
|
pre
:: String -> (String,String)
Transforms a name into a qualified name from the prelude. |
Type synonym: TAProg = AProg TypeExpr
Type synonym: TAFuncDecl = AFuncDecl TypeExpr
Type synonym: TARule = ARule TypeExpr
Type synonym: TAExpr = AExpr TypeExpr
Type synonym: TABranchExpr = ABranchExpr TypeExpr
Type synonym: TAPattern = APattern TypeExpr
Extract all user-defined typed FlatCurry functions that might be called by a given list of functions. |
Returns the names of all functions/constructors occurring in the body of a function declaration. |
Returns |
Is a qualified FlatCurry name primitive? |
Primitive operations of the prelude and their SMT names.
|
Primitive constructors from the prelude and their SMT names.
|
|
A base FlatCurry type.
|
Constructs a list type from an element type.
|
|
|
Generates an |
Transforms a name into a qualified name from the prelude.
|