Module Test.Contract

Author
Michael Hanus
Version
November 2023

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.

Exported Functions


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

Further infos:
  • might behave indeterministically

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

Further infos:
  • might behave indeterministically

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

Further infos:
  • might behave indeterministically

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 

Further infos:
  • might behave indeterministically

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

Further infos:
  • partially defined
  • might behave indeterministically

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

Further infos:
  • partially defined
  • might behave indeterministically

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

Further infos:
  • partially defined
  • might behave indeterministically

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

Further infos:
  • partially defined
  • might behave indeterministically

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

Further infos:
  • might behave indeterministically

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

Further infos:
  • might behave indeterministically

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

Further infos:
  • might behave indeterministically

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

Further infos:
  • might behave indeterministically