A Reversible Abstract Machine - PowerPoint PPT Presentation

About This Presentation
Title:

A Reversible Abstract Machine

Description:

Title: Synchronization strategies for global computing Author: Ivan Lanese Last modified by: Ivan Created Date: 2/22/1999 11:07:13 AM Document presentation format – PowerPoint PPT presentation

Number of Views:41
Avg rating:3.0/5.0
Slides: 26
Provided by: IvanL3
Category:

less

Transcript and Presenter's Notes

Title: A Reversible Abstract Machine


1
A Reversible Abstract Machine
Ivan Lanese Focus research group Computer Science
Department University of Bologna/INRIA Italy
Joint work with Michael Lienhardt, Claudio
Mezzina and Jean-Bernard Stefani
2
Roadmap
  • Origin of the work
  • µOz
  • Reversing µOz
  • Space overhead
  • Conclusions

3
Roadmap
  • Origin of the work
  • µOz
  • Reversing µOz
  • Space overhead
  • Conclusions

4
Rhopi and space efficiency
  • Rhopi is a causally-consistent reversible HOpi
  • Developed by Sardes and Focus
  • Used to study reversibility in presence of
    (higher-order) communication
  • Memory efficiency was not considered
  • Memory consumption due to storing history
    information
  • Is rhopi a space efficient way of making HOpi
    reversible?
  • Intuitively not, because of duplication of
    communicated messages and of trigger
    continuations
  • What can we do to improve its space efficiency?

5
Giving a formal answer to the question
  • Rhopi space consumption should be compared to
    HOpi one
  • HOpi is at a very high-level of abstraction
  • Difficult to understand the actual amount of
    memory used by an HOpi process
  • HOpi may not be space efficient on its own
  • We would need an abstract machine for HOpi
  • Providing an efficient implementation
  • Accepted by the community
  • No such abstract machine exists for HOpi
  • Actually no abstract machine at all

6
A path towards the solution
  • We move from HOpi to Oz
  • We choose a kernel language of it, which we call
    µOz
  • µOz is an higher-order language
  • Thread-based concurrency
  • Asynchronous communication via ports
  • µOz advantages
  • Similar to Hopi
  • Has a well-known and rather classical stack based
    abstract machine
  • Suitable as a reference implementation
  • We do the space complexity analysis in µOz setting

7
A side effect
  • µOz is nearer to real languages
  • Stores and variables
  • Sequence, if-then-else and procedure calls
  • We test the techniques developed for HOpi in a
    more realistic scenario
  • Further steps needed to tackle real languages

8
Roadmap
  • Origin of the work
  • µOz
  • Reversing µOz
  • Space overhead
  • Conclusions

9
µOz syntax
10
µOz semantics
11
Roadmap
  • Origin of the work
  • µOz
  • Reversing µOz
  • Space overhead
  • Conclusions

12
Making µOz reversible
  • We add history information to each thread
  • Keeping trace of actions executed in the past
  • For most statements, we add a delimiter esc to
    define their scope
  • E.g., for let, if-then-else and procedure call
  • We add unique names to threads
  • We add history information also to queues
  • We add a symmetric version for each rule

13
µOz reversible semantics forward rules
14
µOz reversible semantics backward rules
15
Basic properties
  • The µOz reversible abstract machine enjoys the
    same basic properties of RCCS and rhopi
  • Preservation of µOz semantics
  • Loop Lemma
  • Every step can be perfectly undone
  • Causal consistent reversibility
  • Coinitial traces are cofinal iff they are
    causally equivalent

16
Roadmap
  • Origin of the work
  • µOz
  • Reversing µOz
  • Space overhead
  • Conclusions

17
Space complexity
  • We can now go back to our original question
  • We compute the space overhead of the reversible
    abstract machine w.r.t. the original one
  • Size of the reversible configuration minus size
    of the corresponding µOz one
  • For a fixed program, the overhead is linear in
    the number of computation steps
  • Clear by looking at the size of the stored
    history information
  • Only non constant information for discarded
    branch of if-then-else and number of parameters
    of procedure calls

18
Optimality of linear memory overhead
  • Is the space overhead optimal (in order of
    magnitude)?
  • We prove a linear lower bound by giving a program
    that requires at least a linear overhead

19
Linear lower bound
  • Thread p1 sends true, thread p2 sends false
  • All the computations sending the same number of
    true and of false lead to the same state

20
Proof strategy
  • Consider computations where all the sends are
    done before all the receives
  • Divide the sends in pair, and consider the
    computations where in each pair a send is from p1
    and one from p2
  • Same number of true and false
  • Two possibilities for each pair
  • All the computations are coinitial and cofinal
    and not causally equivalent
  • We need to distinguish them
  • We need one bit for each pair
  • All the possibilities, thus also incompressible
    strings
  • The number of bits is linear in the number of
    steps

21
Discussion
  • Overhead due to nondeterminism in communications
  • A similar example can be defined for
    nondeterminism in thread scheduling
  • Deterministic computations actually would need
    less space
  • Just the number of performed steps, which takes
    logerithmic space
  • Tradeof between space and time efficiency

22
Roadmap
  • Origin of the work
  • µOz
  • Reversing µOz
  • Space overhead
  • Conclusions

23
Summary
  • A reversible abstract machine for µOz
  • Linear overhead with respect to the standard
    machine
  • A linear lower bound for the overhead
  • Due to nondeterminism

24
Future work
  • Proceeding towards real languages
  • Modules, types, exceptions,
  • Concurrent ML?
  • Analyze space efficiency for controlled
    reversibility
  • Roll-pi, croll-pi
  • Analyze different tradeofs between space and time
    overhead

25
Finally
  • Thanks!
  • Questions?
Write a Comment
User Comments (0)
About PowerShow.com