Module LiftCase

This module provides a transformation on FlatCurry programs. The result contains a new function for each nested case contained in the original program. The new functions have the names "case ... i" where i is a number and there are as many underscores as necessary to avoid name clashes. Example: case0.

In addition, all the cases are normalized, i.e., applied to a variable. This variable is always the last argument of the newly generated function. The first argument of liftCases is a boolean flag with the following meaning: False: introduce function for EACH case of the original program True: introduce function for nested and not normalized cases only

Author: bbr,sebf, bjp

Version: July 2013

Summary of exported operations:

isCaseAuxFuncName :: String -> Bool   
liftCases :: Bool -> AProg TypeExpr -> AProg TypeExpr   

Exported operations:

isCaseAuxFuncName :: String -> Bool   

liftCases :: Bool -> AProg TypeExpr -> AProg TypeExpr   

Example call:
(liftCases )
Parameters:
  • : the program to be transformed