Some goodies to deal with type-annotated FlatCurry programs.
Author: Michael Hanus
Version: September 2017
readTypedFlatCurry
:: String -> IO (AProg TypeExpr)
Reads a type FlatCurry program or exit with a failure message in case of some typing error. |
getAllFunctions
:: [AFuncDecl TypeExpr] -> [AProg 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 and their SMT names. |
standardConstructors
:: [(String,String)]
|
pre
:: String -> (String,String)
|
showQName
:: (String,String) -> String
|
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
Reads a type FlatCurry program or exit with a failure message in case of some typing error. |
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 and their SMT names.
|
|
|
|