Definition and some operations for non-fail conditions.
Author: Michael Hanus
Version: March 2024
nfcFalse
:: ([(Int,TypeExpr)],Expr) The always unsatisfiable non-fail condition. |
genNonFailCond
:: [(Int,TypeExpr)] -> Expr -> ([(Int,TypeExpr)],Expr) Generate a non-fail condition from a list of variables types and a list of Boolean expressions. |
combineNonFailConds
:: ([(Int,TypeExpr)],Expr) -> ([(Int,TypeExpr)],Expr) -> ([(Int,TypeExpr)],Expr) Combine two non-fail conditions. |
expandExpr
:: [(Int,TypeExpr,Expr)] -> Expr -> Expr |
renameAllVars
:: [(Int,Int)] -> Expr -> Expr |
nonfailSuffix
:: String The suffix of functions specifying non-fail conditions. |
nonFailCondsOfModule
:: Prog -> [((String,String),([(Int,TypeExpr)],Expr))] Extracts explicit non-fail conditions specified in a module as operations with suffix 'nonfail .
|
lookupPredefinedNonFailCond
:: (String,String) -> Maybe ([(Int,TypeExpr)],Expr) Returns the non-fail condition for particular predefined operations with non-trivial non-fail conditions. |
predefinedNonFailConds
:: [((String,String),([(Int,TypeExpr)],Expr))] |
intDivOps
:: [(String,String)] Integer division operators defined in the prelude. |
floatDivOps
:: [(String,String)] Float division operators defined in the prelude. |
showConditions
:: [FuncDecl] -> [((String,String),([(Int,TypeExpr)],Expr))] -> String Prints a list of conditions for operations (if not empty). |
genNonFailFunction
:: [FuncDecl] -> ((String,String),([(Int,TypeExpr)],Expr)) -> (String,FuncDecl) Generates the function representing the non-fail condition for a given function and non-fail condition. |
transTester
:: [((String,String),(Int,ConsType,[((String,String),Int)]))] -> (String,String) -> Expr -> Expr |
allFreeVars
:: Expr -> [Int] Gets all free variables (i.e., without let/free/pattern bound variables) occurring in an expression. |
Non-fail conditions are represented as a pair of typed variables occurring in the conditions and a Boolean expression (in FlatCurry representation).
Type synonym: NonFailCond = ([(Int,TypeExpr)],Expr)
The always unsatisfiable non-fail condition.
|
Generate a non-fail condition from a list of variables types and a list of Boolean expressions. |
Combine two non-fail conditions. |
|
|
The suffix of functions specifying non-fail conditions.
|
Extracts explicit non-fail conditions specified in a module as
operations with suffix |
Returns the non-fail condition for particular predefined operations with non-trivial non-fail conditions. |
|
Integer division operators defined in the prelude. |
Float division operators defined in the prelude. |
Prints a list of conditions for operations (if not empty). The first argument contains all function declarations of the current module. |
Generates the function representing the non-fail condition for a given function and non-fail condition. The first argument is the list of all functions of the module. |
|
Gets all free variables (i.e., without let/free/pattern bound variables) occurring in an expression. |