Both sides previous revision
Previous revision
Next revision
|
Previous revision
Next revision
Both sides next revision
|
otm [2011/01/11 20:47] aspectscript |
otm [2011/01/27 10:30] aspectscript |
Trace-based Mechanisms (TMs) support the definition of entities that observe and react to a program execution trace. TMs define **sequences** that trigger the execution of **pieces of code** when these sequences match specified **execution traces** of a program. TMs have numerous applications in domains like error detection, security, and modular definition of crosscutting concerns. | Trace-based Mechanisms (TMs) support the definition of entities that observe and react to a program execution trace. TMs define **sequences** that trigger the execution of **pieces of code** when these sequences match specified **execution traces** of a program. TMs have numerous applications in domains like error detection, security, and modular definition of crosscutting concerns. |
| |
**OTM** is an [[http://www2.parc.com/csl/groups/sda/projects/oi/|open implementation]] for existing TMs, like [[http://portal.acm.org/citation.cfm?id=1094839|Tracematches]] , [[http://portal.acm.org/citation.cfm?id=1622136|Halo]], [[http://www.springerlink.com/index/1l20fma9ytxe2jcw.pdf|Alpha]], etc. Currently, OTM is implemented for [[http://en.wikipedia.org/wiki/JavaScript|JavaScript]] as a seamless extension for [[http://www.pleiad.cl/aspectscript|AscpectScript]]. Like AspectScript, OTM supports [[http://www.mozilla.com/firefox/|Mozilla Firefox]], [[http://www.apple.com/safari/|Safari]], [[http://www.google.com/chrome|Chrome]], and [[http://www.opera.com|Opera]] (no plug-ins or add-ons required!) and does not extend of the JavaScript syntax. OTM, which follows open implementation as its core design principles, is focused on opening the following semantics of a trace-based mechanism (see animation): | **OTM** is an [[http://www2.parc.com/csl/groups/sda/projects/oi/|open implementation]] for existing TMs, like [[http://portal.acm.org/citation.cfm?id=1094839|Tracematches]] , [[http://portal.acm.org/citation.cfm?id=1622136|Halo]], [[http://www.springerlink.com/index/1l20fma9ytxe2jcw.pdf|Alpha]], etc. Currently, OTM is implemented for [[http://en.wikipedia.org/wiki/JavaScript|JavaScript]] as a seamless extension for [[http://www.pleiad.cl/aspectscript|AscpectScript]]. Like AspectScript, OTM supports [[http://www.mozilla.com/firefox/|Mozilla Firefox]], [[http://www.apple.com/safari/|Safari]], [[http://www.google.com/chrome|Chrome]], and [[http://www.opera.com|Opera]] (no plug-ins or add-ons required!) and does not extend of the JavaScript syntax. OTM, which follows open implementation as its core design principles, is focused on opening the following three semantics of a TM (see animation): |
| |
* ** The life cycle semantics**. This semantics defines the evolution of matching of a sequence passes until it matches. | * ** The life cycle semantics**. This semantics defines the evolution of matching of a sequence passes until it matches. |
| |
* ** The spawning semantics**. This semantics defines when a sequence spawns another sequence using the same specification (e.g. advice) and sharing the history of what the sequence matched until that moment. | * ** The spawning semantics**. This semantics defines when a sequence spawns another sequence using the same specification (e.g. advice) and sharing the history of what the sequence has matched until that moment. For example, tracematches spawn a new sequence if it only contains different bindings with respect to other sequences. |
| |
* ** The advice protocol semantics**. This semantics defines how advices are applied when spawned sequences and their spawners match. | * ** The advice protocol semantics**. This semantics defines how advices are applied when spawned sequences and their spawners match. The customization of this semantics is inspired by the [[http://portal.acm.org/citation.cfm?id=1408689|Dynamic AspectJ]] proposal. |
| |
{{ :anim-2.gif }} | {{ :anim-2.gif }} |
| |
| |
In addition, sequences are first-class values and are specified using plain JavaScript functions, bringing the full benefits of the base language, in particular, the combination of higher-order functions and objects. To the best of our knowledge, there is no proposal that allows developers to define sequences expressively and to customize crucial semantics of a TM. | **Sequences**. In addition, sequences are first-class values and are specified using plain JavaScript functions, bringing the full benefits of the base language, in particular, the combination of higher-order functions and objects. To the best of our knowledge, there is no proposal that allows developers to define sequences expressively and to customize crucial semantics of a TM. |
| |
Although OTM is an open implementation of existing TM, OTM can be used to address distributed system issues that are in Web applications that use [[http://en.wikipedia.org/wiki/Ajax_(programming)|Ajax technologies]] to send messages between the client(s) and servers. We have addressed two points: [[otm/ordering of messages]] and [[otm/the matching of causal sequences]]. | |
| |
| **Causality**. Although OTM is an open implementation of existing TMs, OTM can be used to address distributed system issues that are present in Web applications that use [[http://en.wikipedia.org/wiki/Ajax_(programming)|Ajax technologies]] to send messages between the client(s) and servers. We have addressed two issues: [[otm/ordering of messages]] and [[otm/the matching of causal sequences]]. |
| |
(Under construcction) Do you want to try the Boutique Web application example? Please, visit the [[otm/paperExample|paper example page]]. | (Under construcction) Do you want to try the Boutique Web application example? Please, visit the [[otm/paperExample|paper example page]]. |
//==== | //==== |
| |
var seqDef = { | var tm = { |
kind: OTM.AFTER, | kind: OTM.AFTER, |
seqExp: SEs.seq(SEs.call(a), SEs.call(b)), | seqExp: SEs.seq(SEs.call(a), SEs.call(b)), |
} | } |
}; | }; |
OTM.deploy(seqDef); | OTM.deploy(tm); |
//executing the a and b functions | //executing the a and b functions |
a(); | a(); |
| |
<html> | <html> |
<iframe name="exec_frame" src="" width="800" height="150"></iframe> | <iframe name="exec_frame" src="" width="720" height="180"></iframe> |
</html> | </html> |
| |
| |