Module Analysis.RequiredValue

Required value analysis for Curry programs

This analysis checks for each function in a Curry program whether the arguments of a function must have a particular shape in order to compute some value of this function. For instance, the negation operation not requires the argument value False in order to compute the result True and it requires the argument True to compute the result False.

Author: Michael Hanus

Version: April 2018

Summary of exported operations:

lubAType :: AType -> AType -> AType   
Least upper bound of abstract values.
showAType :: AOutFormat -> AType -> String   
showAFType :: AOutFormat -> AFType -> String   
reqValueAnalysis :: Analysis AFType   
Required value analysis.

Exported datatypes:


AType

Constructors:

  • Any :: AType
  • AnyC :: AType
  • Cons :: QName -> AType
  • Empty :: AType

AFType

The abstract type of a function. It is either EmptyFunc, i.e., contains no information about the possible result of the function, or a list of possible argument/result type pairs.

Constructors:

  • EmptyFunc :: AFType
  • AFType :: [([AType],AType)] -> AFType

Exported operations:

lubAType :: AType -> AType -> AType   

Least upper bound of abstract values.

showAType :: AOutFormat -> AType -> String   

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

showAFType :: AOutFormat -> AFType -> String   

reqValueAnalysis :: Analysis AFType   

Required value analysis.