Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
otm [2011/01/11 19:44] aspectscript |
otm [2011/08/03 05:30] (current) aspectscript |
||
---|---|---|---|
Line 3: | Line 3: | ||
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:// | + | **OTM** is an [[http:// |
* ** 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 |
- | * ** The advice protocol semantics**. | + | * ** The advice protocol semantics**. |
{{ :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**. |
- | + | ||
- | Although OTM is an open implementation of existing TM, OTM can be used to address distributed system issues present in Web applications when developers use Ajax technologies to send messages between the client(s) and servers. We have addressed two points: [[otm/ | + | |
(Under construcction) Do you want to try the Boutique Web application example? Please, visit the [[otm/ | (Under construcction) Do you want to try the Boutique Web application example? Please, visit the [[otm/ | ||
Line 48: | Line 46: | ||
<pre id=" | <pre id=" | ||
//== helper code == | //== helper code == | ||
- | var SEs = OTM.SequenceExpressions; | + | var SQs = OTM.Sequences; |
var jpsDiv = document.getElementById(" | var jpsDiv = document.getElementById(" | ||
var a = function(){ | var a = function(){ | ||
Line 58: | Line 56: | ||
//==== | //==== | ||
- | var seqDef | + | var statefulAspect |
kind: OTM.AFTER, | kind: OTM.AFTER, | ||
- | | + | |
advice: function (jp){ | advice: function (jp){ | ||
- | jpsDiv.innerHTML += " | + | jpsDiv.innerHTML += "[*MATCH:ab after:" |
} | } | ||
}; | }; | ||
- | OTM.deploy(seqDef); | + | OTM.deploy(statefulAspect); |
+ | //executing the a and b functions | ||
a(); | a(); | ||
b(); | b(); | ||
Line 73: | Line 72: | ||
<div style=" | <div style=" | ||
<pre id=" | <pre id=" | ||
- | < | + | < |
<div id=" | <div id=" | ||
</ | </ | ||
Line 82: | Line 81: | ||
<script type=" | <script type=" | ||
- | alert(" | ||
var editorjs = CodeMirror.fromTextArea(" | var editorjs = CodeMirror.fromTextArea(" | ||
width: " | width: " | ||
Line 96: | Line 94: | ||
parserfile: [" | parserfile: [" | ||
path: "/ | path: "/ | ||
- | stylesheet: "/ | + | stylesheet: |
// | // | ||
}); | }); | ||
Line 120: | Line 118: | ||
< | < | ||
- | <iframe name=" | + | <iframe name=" |
</ | </ | ||