Module Main

A tool to verify non-failure properties of Curry operations.

Author: Michael Hanus

Version: April 2019

Summary of exported operations:

test :: Int -> String -> IO ()   
testv :: String -> IO ()   
testcv :: String -> IO ()   
:: String   
main :: IO ()   
verifyNonFailingModules :: Options -> [String] -> [String] -> IO ()   
verifyNonFailingMod :: Options -> String -> IO ()   
loadAnalysisWithImports :: Analysis a -> AProg TypeExpr -> IO (ProgInfo a)   
makeTransState :: Int -> [(Int,TypeExpr)] -> TransState   
incFreshVarIndex :: TransState -> TransState   
addVarTypes :: [(Int,TypeExpr)] -> TransState -> TransState   
proveNonFailingFuncs :: Options -> ProgInfo [((String,String),Int)] -> IORef VState -> [AFuncDecl TypeExpr] -> IO ()   
proveNonFailingFunc :: Options -> ProgInfo [((String,String),Int)] -> IORef VState -> AFuncDecl TypeExpr -> IO ()   
proveNonFailingRule :: Options -> ProgInfo [((String,String),Int)] -> IORef VState -> (String,String) -> TypeExpr -> ARule TypeExpr -> IO ()   
missingConsInBranch :: ProgInfo [((String,String),Int)] -> [ABranchExpr TypeExpr] -> [((String,String),Int)]   
simpExpr :: AExpr TypeExpr -> AExpr TypeExpr   
binding2SMT :: Bool -> VerifyInfo -> (Int,AExpr TypeExpr) -> TransState -> (Term,TransState)   
nonfailPreCondExpOf :: VerifyInfo -> (String,String) -> TypeExpr -> [(Int,TypeExpr)] -> TransState -> (Term,TransState)   
nonfailCondExpOf :: VerifyInfo -> (String,String) -> TypeExpr -> [(Int,TypeExpr)] -> TransState -> (([(Int,TypeExpr)],Term),TransState)   
preCondExpOf :: VerifyInfo -> (String,String) -> [(Int,TypeExpr)] -> TransState -> (Term,TransState)   
postCondExpOf :: VerifyInfo -> (String,String) -> [(Int,TypeExpr)] -> TransState -> (Term,TransState)   
applyFunc :: AFuncDecl TypeExpr -> [(Int,TypeExpr)] -> TransState -> (AExpr TypeExpr,TransState)   
pred2SMT :: AExpr TypeExpr -> TransState -> (Term,TransState)   
normalizeArgs :: [AExpr TypeExpr] -> TransState -> (([(Int,AExpr TypeExpr)],[AExpr TypeExpr]),TransState)   
getFreshVarsForTypes :: [TypeExpr] -> TransState -> ([(Int,TypeExpr)],TransState)   
renameLetVars :: TransState -> [((Int,TypeExpr),AExpr TypeExpr)] -> AExpr TypeExpr -> (([((Int,TypeExpr),AExpr TypeExpr)],AExpr TypeExpr),TransState)   
renameFreeVars :: TransState -> [(Int,TypeExpr)] -> AExpr TypeExpr -> (([(Int,TypeExpr)],AExpr TypeExpr),TransState)   
renamePatternVars :: TransState -> ABranchExpr TypeExpr -> (ABranchExpr TypeExpr,TransState)   
checkImplicationWithSMT :: Options -> IORef VState -> String -> [(Int,TypeExpr)] -> Term -> Term -> Term -> IO (Maybe Bool)   
axiomatizedOps :: [String]   
typedVar2SMT :: (Int,TypeExpr) -> Command   
tconsOfTypeExpr :: TypeExpr -> [(String,String)]   
testBoolCase :: [ABranchExpr TypeExpr] -> Maybe (AExpr TypeExpr,AExpr TypeExpr)   
Tests whether the given branches of a case expressions are a Boolean case distinction.
showWithLineNums :: String -> String   
Shows a text with line numbers prefixed:

Exported datatypes:


TransState

Constructors:

  • TransState :: Term -> Int -> [(Int,TypeExpr)] -> TransState

    Fields:

    • preCond :: Term
    • freshVar :: Int
    • varTypes :: [(Int,TypeExpr)]

Exported operations:

test :: Int -> String -> IO ()   

testv :: String -> IO ()   

testcv :: String -> IO ()   

main :: IO ()   

verifyNonFailingModules :: Options -> [String] -> [String] -> IO ()   

verifyNonFailingMod :: Options -> String -> IO ()   

makeTransState :: Int -> [(Int,TypeExpr)] -> TransState   

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

addVarTypes :: [(Int,TypeExpr)] -> TransState -> TransState   

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

proveNonFailingFuncs :: Options -> ProgInfo [((String,String),Int)] -> IORef VState -> [AFuncDecl TypeExpr] -> IO ()   

proveNonFailingFunc :: Options -> ProgInfo [((String,String),Int)] -> IORef VState -> AFuncDecl TypeExpr -> IO ()   

proveNonFailingRule :: Options -> ProgInfo [((String,String),Int)] -> IORef VState -> (String,String) -> TypeExpr -> ARule TypeExpr -> IO ()   

missingConsInBranch :: ProgInfo [((String,String),Int)] -> [ABranchExpr TypeExpr] -> [((String,String),Int)]   

binding2SMT :: Bool -> VerifyInfo -> (Int,AExpr TypeExpr) -> TransState -> (Term,TransState)   

nonfailPreCondExpOf :: VerifyInfo -> (String,String) -> TypeExpr -> [(Int,TypeExpr)] -> TransState -> (Term,TransState)   

nonfailCondExpOf :: VerifyInfo -> (String,String) -> TypeExpr -> [(Int,TypeExpr)] -> TransState -> (([(Int,TypeExpr)],Term),TransState)   

preCondExpOf :: VerifyInfo -> (String,String) -> [(Int,TypeExpr)] -> TransState -> (Term,TransState)   

postCondExpOf :: VerifyInfo -> (String,String) -> [(Int,TypeExpr)] -> TransState -> (Term,TransState)   

checkImplicationWithSMT :: Options -> IORef VState -> String -> [(Int,TypeExpr)] -> Term -> Term -> Term -> IO (Maybe Bool)   

axiomatizedOps :: [String]   

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

typedVar2SMT :: (Int,TypeExpr) -> Command   

tconsOfTypeExpr :: TypeExpr -> [(String,String)]   

testBoolCase :: [ABranchExpr TypeExpr] -> Maybe (AExpr TypeExpr,AExpr TypeExpr)   

Tests whether the given branches of a case expressions are a Boolean case distinction. If yes, the expressions of the False and True branch are returned.

showWithLineNums :: String -> String   

Shows a text with line numbers prefixed: