Eager and Delayed Contract Monitoring for Call-by-value and Call-by-name Evaluation

Markus Degen, Peter Thiemann, and Stefan Wehr

Journal of Logic and Algebraic Programming, 79(7):515-549, October 2010.


Contracts are a proven tool in software development. They provide specifications for operations that may be statically verified or dynamically validated by contract monitoring.

We investigate the properties of contract monitoring for languages with contracts and effects using a monadic semantics. We study three combinations of evaluation orders and contract monitoring styles: call-by-value and call-by-name with eager monitoring and call-by-name with delayed monitoring.

In each case, an effect system ensures that contract monitoring does not change the meaning of a program and guarantees that contract monitoring is idempotent. The monadic semantics enables us to study design choices, to formalize implementations, to pinpoint the differences between contracts in the three combinations, and to verify algebraic laws.


  author = {Markus Degen and Peter Thiemann and Stefan Wehr},
  title = {Eager and Delayed Contract Monitoring for Call-by-value and Call-by-name Evaluation},
  journal = {Journal of Logic and Algebraic Programming},
  publisher = {Elsevier},
  year = 2010,
  month = {October},
  pages = {515--549},
  volume = 79,
  number = 7


Extended version of the NWPT 2008 paper

Last modified: 2015-06-10T22:24:05+02:00