Extending Design by Contract for Aspect-Oriented Programming
David H. Lorenz, Therapon Skotiniotis

TL;DR
This paper extends Design by Contract to Aspect-Oriented Programming, addressing runtime assertion enforcement and blame assignment challenges by classifying aspects and implementing a prototype tool.
Contribution
It introduces a classification of aspects for correct assertion validation order and presents Cona, a prototype tool integrating DbC with AOP.
Findings
No universal correct order for assertion validation in AOP
Classification of aspects guides assertion validation order
Prototype tool Cona demonstrates practical application
Abstract
Design by Contract (DbC) and runtime enforcement of program assertions enables the construction of more robust software. It also enables the assignment of blame in error reporting. Unfortunately, there is no support for runtime contract enforcement and blame assignment for Aspect-Oriented Programming (AOP). Extending DbC to also cover aspects brings forward a plethora of issues related to the correct order of assertion validation. We show that there is no generally correct execution sequence of object assertions and aspect assertions. A further classification of aspects as agnostic, obedient, or rebellious defines the order of assertion validation that needs to be followed. We describe the application of this classification in a prototyped DbC tool for AOP named Cona, where aspects are used for implementing contracts, and contracts are used for enforcing assertions on aspects.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdvanced Software Engineering Methodologies · Software Engineering Research · Software Reliability and Analysis Research
