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.

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.