ECOOP '01 Proceedings of the 15th European Conference on Object-Oriented Programming
High Integrity Software: The SPARK Approach to Safety and Security
High Integrity Software: The SPARK Approach to Safety and Security
abc: an extensible AspectJ compiler
Proceedings of the 4th international conference on Aspect-oriented software development
Aspect language features for concern coverage profiling
Proceedings of the 4th international conference on Aspect-oriented software development
Model variables: cleanly supporting abstraction in design by contract: Research Articles
Software—Practice & Experience
An overview of JML tools and applications
International Journal on Software Tools for Technology Transfer (STTT) - Special section on formal methods for industrial critical systems
Logical Foundations of Program Assertions: What do Practitioners Want?
SEFM '05 Proceedings of the Third IEEE International Conference on Software Engineering and Formal Methods
Preliminary design of JML: a behavioral interface specification language for java
ACM SIGSOFT Software Engineering Notes
FASE '09 Proceedings of the 12th International Conference on Fundamental Approaches to Software Engineering: Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2009
The spec# programming system: an overview
CASSIS'04 Proceedings of the 2004 international conference on Construction and Analysis of Safe, Secure, and Interoperable Smart Devices
Lessons learned from developing a dynamic OCL constraint enforcement tool for java
MoDELS'05 Proceedings of the 2005 international conference on Satellite Events at the MoDELS
Hi-index | 0.00 |
Providing a pair of pre and post-condition for a method or a procedure is a typical way of program specification. When specifying a post-condition, it is often necessary to compare the post-state value of a variable with its pre-state value. To access a pre-sate value at a post-condition, most contract languages such as Eiffel and JML provide an old expression; old(x) returns a pre-state value of variable x. However, old expressions pose several problems, most notably the lack of encapsulation; old(x) does not encapsulate an object graph rooted from the pre-state value of x. Thus, method-call expressions like x.equals(old(x)) should generally not be used, and instead each field of x should be compared individually as in x.f1==old(x.f1) & x.f2==old(x.f2). In this paper, we first describe this lack of encapsulation and other problems of old expressions in more detail. Then, to address those problems, we propose our novel past expression along with its formal semantics. We also describe how our past expression can be supported during runtime assertion checking. We explain the involved problems, and show how we solve them. We implement our solution by means of AOP where we exploit various primitive pointcuts including our custom branch pointcut.