arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 1905.01453cs.PL
收藏

具有继承、子类型和交换的一级层的类型系统

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

Hiroaki Inoue, Atsushi Igarashi

摘要:

面向上下文编程(COP)是一种鼓励上下文相关软件模块化的编程范式。COP的关键特征是层-描述软件系统的上下文相关行为变化的模块-以及它们的动态激活,它可以修改已经实例化的多个对象的行为。用COP语言编写的程序很难进行类型检查,因为层的激活甚至会改变对象的接口。Inoue等人已经非正式地讨论了如何制作JCop,这是Appeltauer等人为COP开发的Java扩展,类型安全在这篇文章中,我们形式化的一个小COP语言称为上下文FJ $_{<:}$与它的操作语义和类型系统,并显示其类型的可靠性。JCop的类型安全版本的语言模型主要特性,包括动态激活的第一类层、层定义的继承、层子类型和层交换。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑