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.

Abstract

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.

Bibtex

@ARTICLE{DegenThiemannWehr2010,
  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
}

Resources

Extended version of the NWPT 2008 paper

Imprint & privacy policy // Last modified: 2024-09-10T10:21:26+02:00