Region Inference for an Object-Oriented Language - PowerPoint PPT Presentation

About This Presentation
Title:

Region Inference for an Object-Oriented Language

Description:

Florin Craciun1, Shengchao Qin1,2, Martin Rinard3. 1 National ... http://loris-4.ddns.comp.nus.edu.sg/~craciunm. 41. Experiments. 42. Inference of Methods ... – PowerPoint PPT presentation

Number of Views:24
Avg rating:3.0/5.0
Slides: 48
Provided by: WNC9
Category:

less

Transcript and Presenter's Notes

Title: Region Inference for an Object-Oriented Language


1
Region Inference for an Object-Oriented Language
  • Wei Ngan Chin1,2
  • Joint work with
  • Florin Craciun1, Shengchao Qin1,2, Martin Rinard3
  • 1 National University of Singapore
  • 2 Singapore-MIT Alliance 3 MIT

2
Background
  • Basic problem
  • how to recover memory of dead objects?
  • Two Approaches
  • garbage collection
  • explicit memory management
  • Our Focus
  • Explicit memory regions with different lifetimes

3
Current Status
  • Region Inference for a functional language
  • ?-Calculus Tofte-Talpin POPL94
  • Previous Works on Region Type Checkers
  • Java DIKU98,
  • Real-Time Java MIT-PLDI03,
  • Cyclone Cornell-PLDI02.

Our Goal automatic region inference for
object-oriented programs
4
Two Major Assumptions
top (younger)
  • Lexically-Scoped Regions
  • Stack-like lifetimes
  • construct for local region
  • letreg r in e

r4
r3
  • No Dangling References
  • Regions of components should have longer
    lifetimes than its object.

r2
r1
bottom (older)
5
Main Contributions
  • Region Inference for Core-Java
  • Constraint-Based Type System.
  • Region Polymorphism Region Subtyping
  • Handles Inheritance, Overriding, Downcast
  • Implementation

6
Region-Annotated Core-Java
7
Inferring for Class
Step 4 Inherit constraint of superclass.
8
Inferring for Class

Step 1 Reserve first region for the receiver
object (this).
Step 2 Keep regions of fields distinct for
precision.
Step 3 No dangling requirement as class
invariant.
9
Inferring for Methods
10
Outline
  • Background
  • Key Techniques
  • Inferring Class
  • Inferring Methods
  • Region Subtyping
  • Region Inference
  • Method Overriding Downcast
  • Experimental Results

11
(Object) Region Subtyping
concept pioneered in Cyclone PLDI02 an object
w of type cltr,..gt can be passed to a location v
of type clts,..gt provided r
Write a Comment
User Comments (0)
About PowerShow.com