Module Analysis.RequiredValues

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
November 2024
Exported Datatypes:

Exported Datatypes


data AType

Constructors:

  • Cons :: [QName] -> AType
  • AnyC :: AType
  • Any :: AType

Known instances:


data 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

Known instances:


Exported Functions


lubAType :: AType -> AType -> AType  Deterministic 

Least upper bound of abstract values.


showAType :: AOutFormat -> AType -> String  Deterministic 


showAFType :: AOutFormat -> AFType -> String  Deterministic 


reqValueAnalysis :: Analysis AFType  Non-deterministic 

Required value analysis.