首页> 外文学位 >Structural abstraction A mechanism for modular program construction.
【24h】

Structural abstraction A mechanism for modular program construction.

机译:结构抽象一种用于模块化程序构建的机制。

获取原文
获取原文并翻译 | 示例

摘要

Much of programming languages research has been directed at developing abstraction mechanisms to support the "separation of concerns": Orthogonal pieces of functionality should be developed separately; complex software can then be constructed through the composition of these pieces. The effectiveness of such mechanisms is derived from their support for modularity and reusability: The behavior of a piece of code should be reasoned about modularly---independently of the specific compositions it may participate in; the computation of a piece of code should allow specialization, so that it is reusable for different compositions. This dissertation introduces structural abstraction: a new abstraction mechanism that advances the state of the art in modularity and reusability by allowing the writing of highly reusable code---code whose structure can be specialized per composition, while maintaining a high level of support for modularity.;Structural abstraction addresses the reliance of mainstream abstraction mechanisms on fixed structures. Although abstraction mechanisms have been developed to allow code to be reused over ranges of values (e.g., procedural abstraction) and ranges of types (e.g., type genericity), their modularity guarantees crucially rely on separately developed pieces of code having fixed structures: A procedure is a structure with a fixed name and a fixed number of argument types, a type-generic procedure is a similar structure with a fixed number of type variables. This rigid notion of abstraction means a piece of code cannot be reused for clients with different structures, and thus often leads to the same piece of functionality having to be manually specialized for the (possibly infinite number of) different structures it may be composed with. Structural abstraction addresses this limitation by providing a disciplined way for code to inspect the structure of its clients in composition, and declare its own structure accordingly. The hallmark feature of structural abstraction is that, despite its emphasis on generality and greater reusability, it still allows modular type checking: A piece of structurally abstract code can be type-checked independently of its uses in compositions. Thus, errors in generic code are detected before composition time---an invaluable feature for highly reusable components that will be statically composed by other programmers.;This dissertation introduces two specific techniques supporting structural abstraction: static type conditions, and morphing. Static type conditions allow code to be conditionally declared based on subtyping constraints. A client of such a piece of code can configure a desirable set of features by composing the code with types whose positions in a subtyping structure satisfy the appropriate typing conditions. Morphing allows code to be iteratively declared, by statically reflecting over the structural members of code that it would be composed with. A morphing piece of code can mimic the structure of its clients in composition, or change its shape according to its clients in a pattern-based manner. Thus, using either static type conditions or morphing, the structure of a piece of code is not statically determined, but can be automatically specialized to reflect the structure of its clients in composition.;We show how these structural abstraction techniques can be smoothly integrated with a modern Object-Oriented language, by implementing the languages cJ (for static type conditions) and MorphJ (for morphing), both of which are extensions of Java. We demonstrate the practical impact of structural abstraction by reimplementing a number of real world applications using cJ or MorphJ. We show that the reimplementations are more reusable, and, at the same time, modularly type-safe.
机译:许多编程语言研究都致力于开发抽象机制来支持“关注点分离”:正交的功能应该分开开发;然后,可以通过这些部分的组合来构建复杂的软件。这种机制的有效性源于它们对模块化和可重用性的支持:应该以模块化的方式来推理一段代码的行为-与它可能参与的特定组成无关;一段代码的计算应允许专门化,以便可用于不同的组合。这篇论文介绍了结构抽象:一种新的抽象机制,通过允许编写高度可重用的代码来推进模块化和可重用性方面的最新技术,该代码的结构可以针对每个组合进行专用,同时保持对模块化的高度支持。;结构抽象解决了主流抽象机制对固定结构的依赖。尽管已经开发了抽象机制以允许在值的范围(例如,过程抽象)和类型的范围(例如,类型通用性)上重用代码,但是它们的模块化保证了关键地依赖于具有固定结构的单独开发的代码段:是具有固定名称和固定数量的参数类型的结构,类型通用过程是具有固定数量的类型变量的类似结构。这种严格的抽象概念意味着一段代码不能为具有不同结构的客户端所重用,因此常常导致同一功能块必须手动专用于可能构成的不同结构(可能是无数个)。结构抽象通过为代码提供一种规范的方法来检查其组合中的客户结构,并相应地声明其自身的结构,从而解决了这一限制。结构抽象的标志性特征是,尽管它强调通用性和更高的可重用性,但它仍允许进行模块化类型检查:可以独立于组合中的使用对结构上抽象的代码进行类型检查。因此,在组成时间之前就检测到了通用代码中的错误,这是其他程序员将静态组成的,具有高度可重用性的组件的宝贵功能。本论文介绍了两种支持结构抽象的特定技术:静态类型条件和变形。静态类型条件允许根据子类型约束有条件地声明代码。此类代码的客户可以通过将代码与子类型结构中的位置满足适当键入条件的类型组成代码来配置所需的功能集。变形通过静态反映将与之组成的代码的结构性成员,可以迭代地声明代码。一段变形的代码可以模仿其客户的结构,或根据其客户以基于模式的方式更改其形状。因此,使用静态类型条件或变体,一段代码的结构不是静态确定的,而是可以自动进行专业化以反映其客户的结构。;我们展示了如何将这些结构抽象技术与通过实现语言cJ(用于静态类型条件)和MorphJ(用于变形)来实现现代的面向对象语言,这两种语言都是Java的扩展。我们通过使用cJ或MorphJ重新实现许多实际应用程序来演示结构抽象的实际影响。我们表明,重新实现具有更高的可重用性,并且同时具有模块化的类型安全性。

著录项

  • 作者

    Huang, Shan Shan.;

  • 作者单位

    Georgia Institute of Technology.;

  • 授予单位 Georgia Institute of Technology.;
  • 学科 Computer Science.
  • 学位 Ph.D.
  • 年度 2009
  • 页码 201 p.
  • 总页数 201
  • 原文格式 PDF
  • 正文语种 eng
  • 中图分类
  • 关键词

  • 入库时间 2022-08-17 11:38:20

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号