Module Verify.Domain

The definition of the operations on the abstract domain used for call types, in/out types, and verification of programs.

Author: Michael Hanus

Version: October 2023

Summary of exported operations:

valueAnalysis :: Analysis AType  Non-deterministic 
The CASS analysis to approximate result values.
emptyType :: AType  Deterministic 
Abstract representation of no possible value.
isEmptyType :: AType -> Bool  Deterministic 
Does an abstract type represent no value?
anyType :: AType  Deterministic 
Abstract representation of the type of all values.
isAnyType :: AType -> Bool  Deterministic 
Does an abstract type represent any value?
lubType :: AType -> AType -> AType  Deterministic 
Least upper bound of abstract values.
joinType :: AType -> AType -> AType  Deterministic 
Join two abstract values.
aCons :: (String,String) -> [AType] -> AType  Deterministic 
The representation of a constructor application to a list of abstract argument types.
aLit :: Literal -> AType  Deterministic 
litAsCons :: Literal -> (String,String)  Deterministic 
The representation of a literal as a constructor.
consOfType :: AType -> [(String,String)]  Deterministic 
The list of top-level constructors covered by an abstract type.
argTypesOfCons :: (String,String) -> Int -> AType -> [AType]  Deterministic 
The argument types of an abstract type (given as the last argument) when it matches a given constructor/arity.
showType :: AType -> String  Deterministic 
Shows an abstract value.

Exported datatypes:


AType

The type of the abstract domain.

Type synonym: AType = AType


Exported operations:

valueAnalysis :: Analysis AType  Non-deterministic 

The CASS analysis to approximate result values.

emptyType :: AType  Deterministic 

Abstract representation of no possible value.

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

isEmptyType :: AType -> Bool  Deterministic 

Does an abstract type represent no value?

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

anyType :: AType  Deterministic 

Abstract representation of the type of all values.

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

isAnyType :: AType -> Bool  Deterministic 

Does an abstract type represent any value?

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

lubType :: AType -> AType -> AType  Deterministic 

Least upper bound of abstract values.

joinType :: AType -> AType -> AType  Deterministic 

Join two abstract values. The result is emptyType if they are not compatible.

aCons :: (String,String) -> [AType] -> AType  Deterministic 

The representation of a constructor application to a list of abstract argument types.

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

aLit :: Literal -> AType  Deterministic 

litAsCons :: Literal -> (String,String)  Deterministic 

The representation of a literal as a constructor.

consOfType :: AType -> [(String,String)]  Deterministic 

The list of top-level constructors covered by an abstract type. The list is empty for anyType.

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

argTypesOfCons :: (String,String) -> Int -> AType -> [AType]  Deterministic 

The argument types of an abstract type (given as the last argument) when it matches a given constructor/arity. For the top constructor domain, the arguments have always any type.

showType :: AType -> String  Deterministic 

Shows an abstract value.