Some goodies to deal with type-annotated FlatCurry programs.
Author: Michael Hanus
Version: April 2018
readTypedFlatCurry
:: String -> IO (AProg TypeExpr)
Reads a typed FlatCurry program or exits with a failure message in case of some typing error. |
readTypedFlatCurryWithSpec
:: Options -> String -> IO (AProg TypeExpr)
Reads a typed FlatCurry program together with a possible _SPEC
program
(containing further contracts) or exits with a failure message
in case of some typing error.
|
unionTAProg
:: AProg TypeExpr -> AProg TypeExpr -> AProg TypeExpr
Returns the union of two typed FlatCurry programs. |
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.
|
ppTAExpr
:: AExpr TypeExpr -> String
Pretty prints an expression. |
setAnnPattern
:: TypeExpr -> APattern TypeExpr -> APattern TypeExpr
Sets the top annotation of a pattern. |
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)]
|
etaExpandFuncDecl
:: AFuncDecl TypeExpr -> AFuncDecl TypeExpr
Eta-expansion of user-defined function declarations. |
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 typed FlatCurry program or exits with a failure message in case of some typing error. |
Reads a typed FlatCurry program together with a possible |
Returns the union of two typed FlatCurry programs. |
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 |
Sets the top annotation of a pattern.
|
Is a qualified FlatCurry name primitive? |
Primitive operations of the prelude and their SMT names.
|
Primitive constructors from the prelude and their SMT names.
|
|
Eta-expansion of user-defined function declarations. |
|
|