Log In Sign Up

A Type System for First-Class Layers with Inheritance, Subtyping, and Swapping

by   Hiroaki Inoue, et al.

Context-Oriented Programming (COP) is a programming paradigm to encourage modularization of context-dependent software. Key features of COP are layers---modules to describe context-dependent behavioral variations of a software system---and their dynamic activation, which can modify the behavior of multiple objects that have already been instantiated. Typechecking programs written in a COP language is difficult because the activation of a layer can even change objects' interfaces. Inoue et al. have informally discussed how to make JCop, an extension of Java for COP by Appeltauer et al., type-safe. In this article, we formalize a small COP language called ContextFJ_<: with its operational semantics and type system and show its type soundness. The language models main features of the type-safe version of JCop, including dynamically activated first-class layers, inheritance of layer definitions, layer subtyping, and layer swapping.


Programming in Alma-0, or Imperative and Declarative Programming Reconciled

In (Apt et al, TOPLAS 1998) we introduced the imperative programming lan...

A metalanguage for cost-aware denotational semantics

We present two metalanguages for developing synthetic cost-aware denotat...

Type Safe Redis Queries: A Case Study of Type-Level Programming in Haskell

Redis is an in-memory data structure store, often used as a database, wi...

A Co-contextual Type Checker for Featherweight Java (incl. Proofs)

This paper addresses compositional and incremental type checking for obj...

Detecting unanticipated mutual recursion using Elegant Objects representation of object-oriented programs

Elegant Objects (EO) is a variation of the object-oriented programming p...

Context-Oriented Behavioral Programming

Modern systems require programmers to develop code that dynamically adap...

A novel highly efficient Lagrangian model for massively multidomain simulations: parallel context

A new method for the simulation of evolving multi-domains problems has b...