Specifying subtypes in SCJ programs

  • Authors:
  • Ghaith Haddad;Gary T. Leavens

  • Affiliations:
  • University of Central Florida, Orlando, FL;University of Central Florida, Orlando, FL

  • Venue:
  • Proceedings of the 9th International Workshop on Java Technologies for Real-Time and Embedded Systems
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

Modular reasoning about programs that use subtypes requires that an overriding method in a subtype obeys the specifications of all methods that it overrides. For example, if method m is specified in a supertype T to take at most 42 nanoseconds to execute, then m cannot take more than 42 nanoseconds to execute in any subtype of T. Subtyping is an important aid to maintenance of programs, since it allows one to write polymorphic code (reducing code size and increasing reuse), and allows for convenient extension and enhancement of programs, all of which could be very useful in real-time programming. In this paper we show how to specify timing constraints for subtypes in a way that: permits modular reasoning about timing constraints, supports subtype polymorphism and object-oriented design patterns, and still permits precise reasoning about execution times. This technique supports object-oriented coding and design patterns based on subtype polymorphism, with all their maintenance advantages, to be used in real-time software.