Module Test.Contract

This library defines some auxiliaries to check contracts based on specifications or pre- and postconditions provided in a Curry module. The interface might probably change with the further development of the contract implementation.

Author: Michael Hanus

Version: November 2023

Summary of exported operations:

withContract1 :: (Show a, Show b) => String -> (a -> Bool) -> (a -> b -> Bool) -> (b -> b) -> (a -> b) -> a -> b  Deterministic 
withContract1ND :: (Show a, Show b) => String -> (a -> Values Bool) -> (a -> b -> Values Bool) -> (b -> b) -> (a -> b) -> a -> b  Deterministic 
withContract2 :: (Show a, Show b, Show c) => String -> (a -> b -> Bool) -> (a -> b -> c -> Bool) -> (c -> c) -> (a -> b -> c) -> a -> b -> c  Deterministic 
withContract2ND :: (Show a, Show b, Show c) => String -> (a -> b -> Values Bool) -> (a -> b -> c -> Values Bool) -> (c -> c) -> (a -> b -> c) -> a -> b -> c  Deterministic 
withPreContract1 :: Show a => String -> (a -> Bool) -> (a -> b) -> a -> b  Deterministic 
withPreContract2 :: (Show a, Show b) => String -> (a -> b -> Bool) -> (a -> b -> c) -> a -> b -> c  Deterministic 
withPostContract0 :: Show a => String -> (a -> Bool) -> (a -> a) -> a -> a  Deterministic 
withPostContract0ND :: Show a => String -> (a -> Values Bool) -> (a -> a) -> a -> a  Deterministic 
withPostContract1 :: (Show a, Show b) => String -> (a -> b -> Bool) -> (b -> b) -> (a -> b) -> a -> b  Deterministic 
withPostContract1ND :: (Show a, Show b) => String -> (a -> b -> Values Bool) -> (b -> b) -> (a -> b) -> a -> b  Deterministic 
withPostContract2 :: (Show a, Show b, Show c) => String -> (a -> b -> c -> Bool) -> (c -> c) -> (a -> b -> c) -> a -> b -> c  Deterministic 
withPostContract2ND :: (Show a, Show b, Show c) => String -> (a -> b -> c -> Values Bool) -> (c -> c) -> (a -> b -> c) -> a -> b -> c  Deterministic 

Exported operations:

withContract1 :: (Show a, Show b) => String -> (a -> Bool) -> (a -> b -> Bool) -> (b -> b) -> (a -> b) -> a -> b  Deterministic 

withContract1ND :: (Show a, Show b) => String -> (a -> Values Bool) -> (a -> b -> Values Bool) -> (b -> b) -> (a -> b) -> a -> b  Deterministic 

withContract2 :: (Show a, Show b, Show c) => String -> (a -> b -> Bool) -> (a -> b -> c -> Bool) -> (c -> c) -> (a -> b -> c) -> a -> b -> c  Deterministic 

withContract2ND :: (Show a, Show b, Show c) => String -> (a -> b -> Values Bool) -> (a -> b -> c -> Values Bool) -> (c -> c) -> (a -> b -> c) -> a -> b -> c  Deterministic 

withPreContract1 :: Show a => String -> (a -> Bool) -> (a -> b) -> a -> b  Deterministic 

withPreContract2 :: (Show a, Show b) => String -> (a -> b -> Bool) -> (a -> b -> c) -> a -> b -> c  Deterministic 

withPostContract0 :: Show a => String -> (a -> Bool) -> (a -> a) -> a -> a  Deterministic 

withPostContract0ND :: Show a => String -> (a -> Values Bool) -> (a -> a) -> a -> a  Deterministic 

withPostContract1 :: (Show a, Show b) => String -> (a -> b -> Bool) -> (b -> b) -> (a -> b) -> a -> b  Deterministic 

withPostContract1ND :: (Show a, Show b) => String -> (a -> b -> Values Bool) -> (b -> b) -> (a -> b) -> a -> b  Deterministic 

withPostContract2 :: (Show a, Show b, Show c) => String -> (a -> b -> c -> Bool) -> (c -> c) -> (a -> b -> c) -> a -> b -> c  Deterministic 

withPostContract2ND :: (Show a, Show b, Show c) => String -> (a -> b -> c -> Values Bool) -> (c -> c) -> (a -> b -> c) -> a -> b -> c  Deterministic