• Cite Icon57
  • https://doi.org/10.1145/1330017.1330022Copy DOI Icon

FeatherTrait

Show More
  • Abstract
  • Literature Map
  • References
  • Citations
  • Similar Papers
Abstract

In the context of statically typed, class-based languages , we investigate classes that can be extended with trait composition. A trait is a collection of methods without state; it can be viewed as an incomplete stateless class . Traits can be composed in any order, but only make sense when imported by a class that provides state variables and additional methods to disambiguate conflicting names arising between the imported traits. We introduce FeatherTrait Java (FTJ), a conservative extension of the simple lightweight class-based calculus Featherweight Java (FJ) with statically typed traits . In FTJ, classes can be built using traits as basic behavioral bricks; method conflicts between imported traits must be resolved explicitly by the user either by (i) aliasing or excluding method names in traits, or by (ii) overriding explicitly the conflicting methods in the class or in the trait itself. We present an operational semantics with a lookup algorithm, and a sound type system that guarantees that evaluating a well-typed expression never yields a message-not-understood run-time error nor gets the interpreter stuck. We give examples of the increased expressive power of the trait-based inheritance model. The resulting calculus appears to be a good starting point for a rigorous mathematical analysis of typed class-based languages featuring trait-based inheritance.

Similar Papers
  • Research Article
  • Citations17

Modular session types for distributed object-oriented programming

  • Jan 02, 2010
  • ACM SIGPLAN Notices
  • Simon J Gay +4
  • Conference Article
  • Citations7

Type safe dynamic object delegation in class-based languages

  • Sep 09, 2008
  • Lorenzo Bettini +1
  • Research Article
  • Citations16

Java & Lambda: a Featherweight Story

  • Sep 05, 2018
  • Logical Methods in Computer Science
  • Lorenzo Bettini +4
  • Conference Article
  • Citations1

Runtime Support for Type-Safe and Context-Based Behavior Adaptation

  • Oct 01, 2012
  • Yinliang Zhao +3
  • Dissertation
  • Citations3

An object-oriented event calculus

  • Apr 17, 2014
  • Jeremiah Samuel Patterson
  • Conference Article
  • Citations1

Type-preserving compilation of featherweight java

  • Jan 01, 2003
  • C League +2
  • Book Chapter
  • Citations91

EventJava: An Extension of Java for Event Correlation

  • Jan 01, 2009
  • Patrick Eugster +1
  • Dissertation
  • Citations2

Operational Semantics for Featherweight Lua

  • May 13, 2015
  • Hanshu Lin
  • Conference Article
  • Citations24

Union types for object-oriented programming

  • Apr 23, 2006
  • Atsushi Igarashi +1
  • Research Article
  • Citations4

Validation and Numerical Convergence of the Hankel-Bessel and Mathieu Rigorous Coupled Wave Analysis Algorithms for Radially and Azimuthally- Inhomogeneous, Elliptical, Cylindrical Systems - Abstract

  • Jan 01, 2002
  • Journal of Electromagnetic Waves and Applications
  • J.M Jarem
  • Research Article
  • Citations66

Nonlinear Stable Transportation Control for Double-Pendulum Shipboard Cranes With Ship-Motion-Induced Disturbances

  • Dec 01, 2019
  • IEEE Transactions on Industrial Electronics
  • Ning Sun +3
  • Research Article
  • Citations10

Assembly-Oriented Finite-Time Coordinated Control of Underactuated Dual Rotary Cranes for Payload Position and Attitude Regulation

  • Jul 01, 2024
  • IEEE Transactions on Automation Science and Engineering
  • Zhuoqing Liu +4
  • Book Chapter

Damage of Materials: Damaging Effects of Macroscopic Vanishing Motions

  • Jan 01, 2005
  • Elena Bonetti +1
  • Conference Article

Rigorous coupled-wave approach to scattering from cylindrical and spherical inhomogeneous objects

  • Jul 09, 2001
  • Proceedings of SPIE, the International Society for Optical Engineering/Proceedings of SPIE
  • John M Jarem
  • Research Article
  • Citations1

Representing Java classes in a typed intermediate language

  • Sep 01, 1999
  • ACM SIGPLAN Notices
  • Christopher League +2
Cactus Communications logo

Copyright 2026 Cactus Communications. All rights reserved.