Regular Object Types

Regular Object Types
复制标题

常规对象类型

DOI:
10.1007/978-3-540-45070-2_8
复制
发表时间:
2003
期刊:
--
影响因子:
--
通讯作者:
B. Pierce
B. Pierce
中科院分区:
--
文献类型:
--
作者:
V. Gapeyev;B. Pierce

文献摘要

被引文献

相似文献

正则类型已经被提议作为XML和其他形式的树结构数据的静态类型处理的基础。然而,到目前为止,正则类型只在特殊用途语言(例如XDuce、CDuce和xquery)中进行了探索,这些语言的类型系统“从头开始”围绕正则类型设计。xhtml语言的目标是将常规类型作为流行的面向对象语言c#的轻量级扩展提供给广泛的受众。我们在这里开发xdata设计的正式核心——xduce的树形结构数据模型和传统面向对象语言的类与对象数据模型的组合。我们进行这项调查的工具是一种名为FX的小型语言,其功能来自轻量级Java (FJ)和xduce的核心。感兴趣的点包括:(1)两个数据模型的平滑交错,其中xduce的树结构被嫁接到FJ的类层次结构中,而对象和对象类型扮演xduce的标签值和标签类型的角色;(2)对子类型关系的直观的“语义”定义,继承自xduce并扩展到对象;(3)使用简单形式的单例类对XML文档及其模式进行自然编码。
Regular types have been proposed as a foundation for statically typed processing of XML and other forms of tree-structured data. To date, however, regular types have only been explored in special-purpose languages (e.g.,XDuce,CDuce, andXQuery) with type systems designed around regular types “from the ground up.” The goal of theXtaticlanguage is to bring regular types to a broad audience by offering them as a lightweight extension of a popular object-oriented language, C#.We develop here the formal core of theXtaticdesign-a combination of the tree-structured data model ofXDuceand the classes-and-objects data model of a conventional object-oriented language. Our tool for this investigation is a tiny language called FX with features drawn from Featherweight Java (FJ) and from the core ofXDuce. Points of interest include (1) a smooth interleaving of the two data models, in whichXDuce’s tree structures are grafted into of FJ’s class hierarchy while objects and object types play the role ofXDuce’s label values and label types; (2) an intuitive “semantic” definition of the subtype relation, inherited fromXDuceand extended to objects; and (3) a natural encoding of XML documents and their schemas using a simple form of singleton classes.