05.08.2014 Views

here - Stefan-Marr.de

here - Stefan-Marr.de

here - Stefan-Marr.de

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

5. An Ownership-based MOP for Expressing Concurrency Abstractions<br />

while Albedo comes close, it would require changes to fulfill the requirements<br />

i<strong>de</strong>ntified in Sec. 3.4.<br />

The proxy-based metaobject protocol for ECMAScript [Van Cutsem and<br />

Miller, 2010] comes close to satisfying these requirements as well. It reifies all<br />

relevant intercession operations, however, since it is proxy-based, it does not<br />

provi<strong>de</strong> the same guarantees the ownership-based approach provi<strong>de</strong>s. The<br />

use of proxies requires careful handling of references to avoid leaking the actual<br />

objects, which would then not be subject to an enforcement of language<br />

guarantees. On the other hand, the proxy approach provi<strong>de</strong>s a natural way<br />

to combine semantics of multiple metaobjects, since proxies can be chained.<br />

While the proxy-based approach has this advantage, the ownership-based approach<br />

simplifies the inten<strong>de</strong>d standard use cases. On the one hand, it does<br />

require only one metaobject, i. e., the domain object, to <strong>de</strong>fine the concurrency<br />

semantics for a group of objects, and on the other hand, it does not require distinguishing<br />

between proxies and target objects, which could be leaked, since<br />

the ownership property establishes the meta relation.<br />

Grouping and Ownership-based Approaches The notion of meta-groups<br />

proposed by Mitchell et al. [1997] is close to the notion of ownership used<br />

by the OMOP. They use their meta-groups MOP to <strong>de</strong>fine real-time properties<br />

by providing the ability to reflect over timing-related information and<br />

to customize scheduling-related behavior. Their intention is to <strong>de</strong>scribe the<br />

semantics for groups of objects conveniently and to avoid the need for synchronization<br />

between multiple metaobjects, when scheduling <strong>de</strong>cisions have<br />

to be ma<strong>de</strong>.<br />

Similar notions have been used in ACT/R [Watanabe and Yonezawa, 1991]<br />

and ABCL/R2 [Masuhara et al., 1992]. The focus is on group communication<br />

and maintaining constraints among groups of objects. To this end, the<br />

MOP reifies message sends as tasks, the creation of new actors, the state<br />

change of existing actors via become, and the execution of a method body.<br />

In contrast to the OMOP, ACT/R supports infinite meta-regression in terms<br />

of an infinite reflective tower, while the OMOP uses the notion of enforced<br />

and unenforced execution to be able to terminate meta-regression explicitly.<br />

Another consequence of this <strong>de</strong>sign is the absence of ACT/R’s inter-level<br />

communication, which requires special addressing mo<strong>de</strong>s when sending messages<br />

between the base and meta level. Instead, the unenforced flag and the<br />

#evaluateEnforce: method make the switch between the execution levels,<br />

i. e., enforcement mo<strong>de</strong> explicit.<br />

132

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!