Teaching Design-by-Contract for the Modeling and Implementation of Software Systems

Mert Ozkaya

2019

Abstract

Defensive programming is considered as a software design approach that promotes the reliable software development via the considerations of different cases for the software modules. Design-by-Contract (DbC) applies defensive programming systematically in terms of contracts that are a pair of pre-conditions on the module input and post-conditions on the module output. In this paper, a DbC-based teaching methodology is proposed, which aims to teach undergraduate students how to use contracts for the modeling and implementation of software systems. The teaching methodology consists of three consecutive steps. Firstly, the students will learn how to model software architectures in terms of components and their communication links. The component behaviours are specified as contracts, which are attached to the messages that the components exchange. In the second step, the students will learn how to implement the contractual software architectures in Java using Java’s assertion mechanisms in a way that the contractual design decisions are all preserved in the code. Lastly, the students will learn the Java Modeling Language for combining the contractual modeling and Java implementation in a single model to avoid any inconsistencies between the model and implementation and automatically verify the correctness of the implementation against the modeled behaviours.

Download


Paper Citation


in Harvard Style

Ozkaya M. (2019). Teaching Design-by-Contract for the Modeling and Implementation of Software Systems.In Proceedings of the 14th International Conference on Software Technologies - Volume 1: ICSOFT, ISBN 978-989-758-379-7, pages 499-507. DOI: 10.5220/0007950904990507


in Bibtex Style

@conference{icsoft19,
author={Mert Ozkaya},
title={Teaching Design-by-Contract for the Modeling and Implementation of Software Systems},
booktitle={Proceedings of the 14th International Conference on Software Technologies - Volume 1: ICSOFT,},
year={2019},
pages={499-507},
publisher={SciTePress},
organization={INSTICC},
doi={10.5220/0007950904990507},
isbn={978-989-758-379-7},
}


in EndNote Style

TY - CONF

JO - Proceedings of the 14th International Conference on Software Technologies - Volume 1: ICSOFT,
TI - Teaching Design-by-Contract for the Modeling and Implementation of Software Systems
SN - 978-989-758-379-7
AU - Ozkaya M.
PY - 2019
SP - 499
EP - 507
DO - 10.5220/0007950904990507