Module TransformPluralArguments

A tool to support plural arguments by a transformation on Curry programs.

Author: Michael Hanus

Version: July 2021

Summary of exported operations:

:: String  Deterministic 
defaultTParam :: TParam  Deterministic 
setRunQuiet :: TParam -> TParam  Deterministic 
setCompile :: TParam -> TParam  Deterministic 
setExec :: TParam -> TParam  Deterministic 
main :: IO ()  Non-deterministic 
usageInfo :: String  Deterministic 
transformPlural :: TParam -> String -> IO ()  Non-deterministic 
compileAcyFcy :: Bool -> String -> IO ()  Deterministic 
pluralArgsOfProg :: CurryProg -> [((String,String),[Int])]  Deterministic 
pluralArgsOfFunc :: CFuncDecl -> [((String,String),[Int])]  Deterministic 
pluralArgsOfType :: Int -> CTypeExpr -> [Int]  Deterministic 
tcPlural :: (String,String)  Deterministic 
tcPluralArg :: (String,String)  Deterministic 
tcplural :: (String,String)  Deterministic 
tPluralProg :: [((String,String),[Int])] -> CurryProg -> CurryProg  Deterministic 
tPluralFunc :: String -> [((String,String),[Int])] -> CFuncDecl -> CFuncDecl  Deterministic 
tPluralType :: [Int] -> Int -> CTypeExpr -> CTypeExpr  Deterministic 
tPluralRule :: String -> [((String,String),[Int])] -> [Int] -> CRule -> CRule  Deterministic 
replacePluralCPatterns :: [Int] -> (Int,CPattern) -> CPattern  Deterministic 
funPatError :: a  Deterministic 
lazyPatError :: a  Deterministic 
recPatError :: a  Deterministic 
freshVar :: Int -> (Int,String)  Deterministic 
matchForPluralCPatterns :: String -> [Int] -> (Int,CPattern) -> [CExpr]  Deterministic 
pluralVarsOfPattern :: String -> [Int] -> (Int,CPattern) -> ([((Int,String),CExpr)],[CFuncDecl])  Deterministic 
pluralVarsOfPattern' :: String -> [Int] -> (Int,String) -> (Int,CPattern) -> ([((Int,String),CExpr)],[CFuncDecl])  Deterministic 
projectPluralPatternVars :: String -> (Int,String) -> String -> (Int,CPattern) -> [((Int,String),CExpr)]  Deterministic 
projectFunctions :: String -> CPattern -> String -> (Int,CPattern) -> [CFuncDecl]  Deterministic 
tPluralExp :: [((String,String),[Int])] -> [((Int,String),CExpr)] -> CExpr -> CExpr  Deterministic 
tPluralBranch :: [((String,String),[Int])] -> [((Int,String),CExpr)] -> (CPattern,CRhs) -> (CPattern,CRhs)  Deterministic 
tPluralRhs :: [((String,String),[Int])] -> [((Int,String),CExpr)] -> CRhs -> CRhs  Deterministic 
tPluralLocalDecl :: [((String,String),[Int])] -> [((Int,String),CExpr)] -> CLocalDecl -> CLocalDecl  Deterministic 
tPluralStat :: [((String,String),[Int])] -> [((Int,String),CExpr)] -> CStatement -> CStatement  Deterministic 
tPluralApply :: [((String,String),[Int])] -> [((Int,String),CExpr)] -> CExpr -> CExpr -> CExpr  Deterministic 
apply2funcall :: CExpr -> Maybe ((String,String),[CExpr])  Deterministic 
preTrue :: CExpr  Deterministic 
list2conj :: [CExpr] -> CExpr  Deterministic 

Exported datatypes:


TParam

Constructors:

  • TParam :: Bool -> Bool -> Bool -> TParam

Exported operations:

defaultTParam :: TParam  Deterministic 

Further infos:
  • solution complete, i.e., able to compute all solutions

setRunQuiet :: TParam -> TParam  Deterministic 

Further infos:
  • solution complete, i.e., able to compute all solutions

setCompile :: TParam -> TParam  Deterministic 

Further infos:
  • solution complete, i.e., able to compute all solutions

setExec :: TParam -> TParam  Deterministic 

Further infos:
  • solution complete, i.e., able to compute all solutions

main :: IO ()  Non-deterministic 

usageInfo :: String  Deterministic 

transformPlural :: TParam -> String -> IO ()  Non-deterministic 

compileAcyFcy :: Bool -> String -> IO ()  Deterministic 

pluralArgsOfProg :: CurryProg -> [((String,String),[Int])]  Deterministic 

pluralArgsOfFunc :: CFuncDecl -> [((String,String),[Int])]  Deterministic 

pluralArgsOfType :: Int -> CTypeExpr -> [Int]  Deterministic 

tcPlural :: (String,String)  Deterministic 

Further infos:
  • solution complete, i.e., able to compute all solutions

tcPluralArg :: (String,String)  Deterministic 

Further infos:
  • solution complete, i.e., able to compute all solutions

tcplural :: (String,String)  Deterministic 

Further infos:
  • solution complete, i.e., able to compute all solutions

tPluralProg :: [((String,String),[Int])] -> CurryProg -> CurryProg  Deterministic 

tPluralFunc :: String -> [((String,String),[Int])] -> CFuncDecl -> CFuncDecl  Deterministic 

tPluralType :: [Int] -> Int -> CTypeExpr -> CTypeExpr  Deterministic 

tPluralRule :: String -> [((String,String),[Int])] -> [Int] -> CRule -> CRule  Deterministic 

replacePluralCPatterns :: [Int] -> (Int,CPattern) -> CPattern  Deterministic 

funPatError :: a  Deterministic 

lazyPatError :: a  Deterministic 

recPatError :: a  Deterministic 

freshVar :: Int -> (Int,String)  Deterministic 

matchForPluralCPatterns :: String -> [Int] -> (Int,CPattern) -> [CExpr]  Deterministic 

pluralVarsOfPattern :: String -> [Int] -> (Int,CPattern) -> ([((Int,String),CExpr)],[CFuncDecl])  Deterministic 

pluralVarsOfPattern' :: String -> [Int] -> (Int,String) -> (Int,CPattern) -> ([((Int,String),CExpr)],[CFuncDecl])  Deterministic 

projectPluralPatternVars :: String -> (Int,String) -> String -> (Int,CPattern) -> [((Int,String),CExpr)]  Deterministic 

projectFunctions :: String -> CPattern -> String -> (Int,CPattern) -> [CFuncDecl]  Deterministic 

tPluralExp :: [((String,String),[Int])] -> [((Int,String),CExpr)] -> CExpr -> CExpr  Deterministic 

tPluralBranch :: [((String,String),[Int])] -> [((Int,String),CExpr)] -> (CPattern,CRhs) -> (CPattern,CRhs)  Deterministic 

tPluralRhs :: [((String,String),[Int])] -> [((Int,String),CExpr)] -> CRhs -> CRhs  Deterministic 

tPluralLocalDecl :: [((String,String),[Int])] -> [((Int,String),CExpr)] -> CLocalDecl -> CLocalDecl  Deterministic 

tPluralStat :: [((String,String),[Int])] -> [((Int,String),CExpr)] -> CStatement -> CStatement  Deterministic 

tPluralApply :: [((String,String),[Int])] -> [((Int,String),CExpr)] -> CExpr -> CExpr -> CExpr  Deterministic 

apply2funcall :: CExpr -> Maybe ((String,String),[CExpr])  Deterministic 

preTrue :: CExpr  Deterministic 

list2conj :: [CExpr] -> CExpr  Deterministic