loading
Papers Papers/2022 Papers Papers/2022

Research.Publish.Connect.

Paper

Paper Unlock

Authors: Sérgio Agostinho 1 ; Pedro Guerreiro 2 and Hugo Taborda 1

Affiliations: 1 Universidade Nova de Lisboa, Portugal ; 2 Universidade do Algarve, Portugal

Abstract: Several techniques exist for introducing Design by Contract in languages providing no direct support for it, such as Java. One such technique uses aspects that introduce preconditions and postconditions by means of before and after advices. For using this, programmers must be knowledgeable of the aspect language, even if they would rather concentrate on Design by Contract alone. On the other hand, we can use aspects to weave in preconditions, preconditions and invariants that have been programmed in the source language, as regular Boolean functions. In doing this, we must find ways to automatically “inherit” preconditions and postconditions when redefining functions in subclasses and we must be able to record the initial state of the object when calling a modifier, so that it can be observed in the postconditions. With such a system, during development, the program will be compiled together with the aspects providing the Design by Contract facilities, using the compiler for the aspec t language, and the running program will automatically check all the weaved in assertions, raising an exception when they evaluate to false. For the release build, it suffices to compile using the source language compiler, ignoring the aspects, and the assertions will be left out. (More)

CC BY-NC-ND 4.0

Sign In Guest: Register as new SciTePress user now for free.

Sign In SciTePress user: please login.

PDF ImageMy Papers

You are not signed in, therefore limits apply to your IP address 18.225.255.134

In the current month:
Recent papers: 100 available of 100 total
2+ years older papers: 200 available of 200 total

Paper citation in several formats:
Agostinho, S.; Guerreiro, P. and Taborda, H. (2008). An Aspect for Design by Contract in Java. In Proceedings of the 6th International Workshop on Modelling, Simulation, Verification and Validation of Enterprise Information Systems (ICEIS 2008) - MSVVEIS; ISBN 978-989-8111-43-2, SciTePress, pages 119-128. DOI: 10.5220/0001743001190128

@conference{msvveis08,
author={Sérgio Agostinho. and Pedro Guerreiro. and Hugo Taborda.},
title={An Aspect for Design by Contract in Java},
booktitle={Proceedings of the 6th International Workshop on Modelling, Simulation, Verification and Validation of Enterprise Information Systems (ICEIS 2008) - MSVVEIS},
year={2008},
pages={119-128},
publisher={SciTePress},
organization={INSTICC},
doi={10.5220/0001743001190128},
isbn={978-989-8111-43-2},
}

TY - CONF

JO - Proceedings of the 6th International Workshop on Modelling, Simulation, Verification and Validation of Enterprise Information Systems (ICEIS 2008) - MSVVEIS
TI - An Aspect for Design by Contract in Java
SN - 978-989-8111-43-2
AU - Agostinho, S.
AU - Guerreiro, P.
AU - Taborda, H.
PY - 2008
SP - 119
EP - 128
DO - 10.5220/0001743001190128
PB - SciTePress