T owards An Open Trace-based Mechanism position paper Authors: - - PowerPoint PPT Presentation

t owards an open trace based mechanism
SMART_READER_LITE
LIVE PREVIEW

T owards An Open Trace-based Mechanism position paper Authors: - - PowerPoint PPT Presentation

T owards An Open Trace-based Mechanism position paper Authors: Paul Leger and ric Tanter Department of Computer Science (DCC) University of Chile A Trace-based Mechanism (TM) in a nutshell A TM observes the execution of the software and


slide-1
SLIDE 1

T

  • wards An Open

Trace-based Mechanism

position paper

Authors: Paul Leger and Éric Tanter

Department of Computer Science (DCC) University of Chile

slide-2
SLIDE 2

2

A Trace-based Mechanism (TM) in a nutshell

A TM observes the execution of the software and executes a piece of code when this TM matches a specified sequence of events.

d d b f a Trace of execution

TM needs to match

b a b

The piece

  • f code of TM
slide-3
SLIDE 3

3

Matching a sequence

a y b x b Trace of execution

TM needs to match

b a b

Is it a valid match?

It depends because different TMs have different semantics to define sequences

slide-4
SLIDE 4

4

Strategies for multiple matching

a y b x b Trace of execution

TM needs to match

b a b

Is there another match?

It depends because different TMs have different strategies for multiple matching

slide-5
SLIDE 5

5

The life cycle of sequences

TM needs to match

a b x y

Except

a y b x b Trace of execution b

Most TMs cannot control the life cycle of sequences

slide-6
SLIDE 6

6

Current TMs

Tracematch [Allan+@OOPSLA05], Alpha [Herzeel+@ILC07], Halo [Ostermann+@ECOOP05], PTQL [Goldsmith+@OOPSLA05], ... Specific and non-configurable features What happens if developers have specific needs?

Is it a solution to “code around”?

slide-7
SLIDE 7

7

Towards an Open TM (OTM) model

We identified three points of openness in a TM:

  • The multiple matching strategy. For example:
  • To match several sequences at the same time
  • To match only one sequence at the same time
  • ...
  • The life cycle of the sequences. For example:
  • To remove all sequences if some condition is satisfied (except example)
  • To match all sequences if some condition is satisfied
  • ...
  • Sequences definition. For example:
  • Regular expressions
  • Context-free languages
  • ...
slide-8
SLIDE 8

8

Sequence

OTM model

seq a b Env

b Env' Trace of execution a b

TM needs to match

a b MATCH Env''

slide-9
SLIDE 9

9

Nondeterminism support

||

a b a c

  • Some operators to define sequences, like

OR, are not deterministic. For example:

  • If happens, then two different histories of

the matching of the same sequence are generated.

a

||

b a c

||

a b c

slide-10
SLIDE 10

10

The AnyOrder operator matches several sequences in any order.

Example: The AnyOrder Operator

, ,

a b a d a b a b a b a a b s d a b a b a b

, ,

a b a d a b a b a b x a b c d a b a b a b a c a b d x

Trace of execution

b TM needs to match

2 1 3

slide-11
SLIDE 11

11

Towards an Open TM (OTM) model

We identified three points of openness in a TM:

  • The multiple matching strategy. For example:
  • To match several sequences at the same time
  • To match only one sequence at the same time
  • ...
  • The life cycle of the sequences. For example:
  • To remove all sequences if some condition is satisfied (except example)
  • To match all sequences if some condition is satisfied
  • ...
  • Sequences definition. For example:
  • Regular expressions
  • Context-free languages
  • ...
slide-12
SLIDE 12

12

Extending OTM

  • We add a multiplexer entity to define

strategies for multiple matching.

  • We add a sequence controller entity to

control the life cycle of the sequences.

Multiplexer Sequence 2 Sequence 1 Sequence controller Sequence 1 Sequence 2

slide-13
SLIDE 13

13

Conclusions

  • We explored the points where a TM can be opened:

– Sequences definition – Multiple matching strategies – Life cycle of sequences – Any others?

  • We designed an open TM model, taking into account

these points

slide-14
SLIDE 14

14

Thank you!

Future work:

  • Extend AspectScript[1] to support the OTM model.

[1] AspectScript: Expressive Aspects for the Web. Wednesday, March 17th at 12:30

slide-15
SLIDE 15

15

The class diagram of our open TM

Sequence SequenceController Multiplexer

Multiple TraceMatch

. . .

Developers can build strategies for multiple matching.

Except

Developers can build strategies to control life cycle of sequences

1 .. * 1

slide-16
SLIDE 16

16

A Open TM

Sequence 1 seq sa sb Env sb Env1 Sequence 2 sb Env2 MATCH Env1' a a b Trace of Execution Sequence Manager Multiplexer MATCH Env2'

TM needs to match

a b