Ferret: Programming language support for multiple dynamic classification

  • Authors:
  • Bard Bloom;Paul Keyser;Ian Simmonds;Mark Wegman

  • Affiliations:
  • IBM T.J. Watson Research Center, 19 Skyline Drive, Hawthorne, NY 10532, USA;IBM T.J. Watson Research Center, 19 Skyline Drive, Hawthorne, NY 10532, USA;IBM T.J. Watson Research Center, 19 Skyline Drive, Hawthorne, NY 10532, USA;IBM T.J. Watson Research Center, 19 Skyline Drive, Hawthorne, NY 10532, USA

  • Venue:
  • Computer Languages, Systems and Structures
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

Abstract

We introduce a concept of multiple dynamic classification, a powerful generalization of single-inheritance OO, and a language Ferret which implements it. Multiple classification allows Male, Female, and Married to be subclasses of Person, arranged so that a single Person object may be both Male and Married, but may not be both Male and Female. Dynamic classification allows classes to change: a Person may acquire or lose Married status. The subclasses are true subclasses. Married carries fields (e.g., spouse) which are specific to married people. Methods may be defined on classes, and even on Boolean combinations of class: Male&Married. Ferret provides a generalization of superclass calls, so that the methods for Male&Married can be based on those for Male and Married, without losing other classifications like Employee. Ferret has mutators, analogous to constructors but applicable when objects change class. The resulting language is powerful and highly expressive.