Sequence Operators: Specifying Behavioral Interfaces of Smalltalk Blocks

  • Authors:
  • Yoonsik Cheon;Heung-Nam Kim

  • Affiliations:
  • -;-

  • Venue:
  • APSEC '99 Proceedings of the Sixth Asia Pacific Software Engineering Conference
  • Year:
  • 1999

Quantified Score

Hi-index 0.01

Visualization

Abstract

The ability to treat code as data within a programming language is a powerful feature. Smalltalk introduces an object called a block that represents code as data. We propose a formal description technique to specify the behavior of Smalltalk blocks. The traditional Hoare-style pre- and postcondition technique is extended to incorporate two new predicate composition operators called a sequence operator and a sequential quantifier. The sequence operator combines two predicates by identifying the post-state of the first predicate and the pre-state of the second predicate. The sequential quantifier is an extension of sequence operator to a sequence of predicates. We illustrate our approach by using Smalltalk blocks, but the approach is not in any way Smalltalk specific. It can be applied to closures in other programming languages