首页> 外文会议>European conference on object-oriented programming >Trustworthy Proxies Virtualizing Objects with Invariants
【24h】

Trustworthy Proxies Virtualizing Objects with Invariants

机译:可信赖的代理,使用不变性虚拟化对象

获取原文
获取外文期刊封面目录资料

摘要

Proxies are a common technique to virtualize objects in object-oriented languages. A proxy is a placeholder object that emulates or wraps another target object. Both the proxy's representation and behavior may differ substantially from that of its target object. In many OO languages, objects may have language-enforced invariants associated with them. For instance, an object may declare immutable fields, which are guaranteed to point to the same value throughout the execution of the program. Clients of an object can blindly rely on these invariants, as they are enforced by the language. In a language with both proxies and objects with invariants, these features interact. Can a proxy emulate or replace a target object purporting to uphold such invariants? If yes, does the client of the proxy need to trust the proxy to uphold these invariants, or are they still enforced by the language? This paper sheds light on these questions in the context of a Javascript-like language, and describes the design of a Proxy API that allows proxies to emulate objects with invariants, yet have these invariants continue to be language-enforced. This design forms the basis of proxies in ECMAScript 6.
机译:代理是一种以面向对象的语言虚拟化对象的常用技术。代理是一个占位符对象,可模拟或包装另一个目标对象。代理的表示和行为都可能与其目标对象的表示和行为大不相同。在许多OO语言中,对象可能具有与它们关联的语言强制不变式。例如,一个对象可以声明不可变字段,在整个程序执行过程中,保证它们指向相同的值。对象的客户可以盲目地依赖这些不变量,因为它们是由语言强制执行的。在具有代理和不变量的对象的语言中,这些功能相互作用。代理可以模拟或替换旨在支持此类不变性的目标对象吗?如果是,代理服务器的客户端是否需要信任代理服务器以支持这些不变式,或者它们仍由语言强制执行?本文在类似Java语言的语言中阐明了这些问题,并描述了代理API的设计,该代理API允许代理模拟具有不变量的对象,但这些不变量仍是语言强制的。此设计构成ECMAScript 6中代理的基础。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号