Featherweight X10: A Core Calculus for Async-Finish Parallelism Jonathan K. Lee, Jens Palsberg Presented By- Vasvi Kakkad.

Slides:



Advertisements
Similar presentations
Types and Programming Languages Lecture 13 Simon Gay Department of Computing Science University of Glasgow 2006/07.
Advertisements

Continuing Abstract Interpretation We have seen: 1.How to compile abstract syntax trees into control-flow graphs 2.Lattices, as structures that describe.
Type Checking, Inference, & Elaboration CS153: Compilers Greg Morrisett.
Grammar vs Recursive Descent Parser
Pointer Analysis – Part I Mayur Naik Intel Research, Berkeley CS294 Lecture March 17, 2009.
Flow insensitive pointer analysis: fixed S1: l := new Cons p := l S2: t := new Cons *p := t p := t l p S1 l p tS2 l p S1 t S2 l t S1 p S2 l t S1 p S2 l.
School of EECS, Peking University “Advanced Compiler Techniques” (Fall 2011) Pointer Analysis.
1APLAS05 A Path Sensitive Type System for Resource Usage Verification of C like languages Korea Advanced Institute of Science and Technology Hyun-Goo Kang,
Lecture # 20 Type Systems. 2 A type system defines a set of types and rules to assign types to programming language constructs Informal type system rules,
Review of topics Final exam : -May 2nd to May 7 th - Projects due on May 7th.
Discovering Affine Equalities Using Random Interpretation Sumit Gulwani George Necula EECS Department University of California, Berkeley.
C. Varela; Adapted w/permission from S. Haridi and P. Van Roy1 Declarative Computation Model Defining practical programming languages Carlos Varela RPI.
Next Section: Pointer Analysis Outline: –What is pointer analysis –Intraprocedural pointer analysis –Interprocedural pointer analysis (Wilson & Lam) –Unification.
Control Flow Analysis Mooly Sagiv Tel Aviv University Sunday Scrieber 8 Monday Schrieber.
Set Constraint-Based Program Analysis Manuel Fähndrich CS590 UW Spring 2001.
1 Control Flow Analysis Mooly Sagiv Tel Aviv University Textbook Chapter 3
Static Program Analysis Xiangyu Zhang The slides are compiled from Alex Aiken’s Michael D. Ernst’s Sorin Lerner’s.
Range Analysis. Intraprocedural Points-to Analysis Want to compute may-points-to information Lattice:
Programming Language Semantics Mooly SagivEran Yahav Schrirber 317Open space html://
Catriel Beeri Pls/Winter 2004/5 inductive-revisited 1 Inductive definitions revisited  Generated and Freely generated sets oPattern match, unification.
Abstract Interpretation Part I Mooly Sagiv Textbook: Chapter 4.
Intraprocedural Points-to Analysis Flow functions:
1 Systematic Domain Design Some Remarks. 2 Best (Conservative) interpretation abstract representation Set of states concretization Abstract semantics.
Theory and Applications
Overview of program analysis Mooly Sagiv html://
Semantics with Applications Mooly Sagiv Schrirber html:// Textbooks:Winskel The.
1 Program Analysis Systematic Domain Design Mooly Sagiv Tel Aviv University Textbook: Principles.
Comparison Caller precisionCallee precisionCode bloat Inlining context-insensitive interproc Context sensitive interproc Specialization.
Pointer and Shape Analysis Seminar Mooly Sagiv Schriber 317 Office Hours Thursday
Program Analysis Mooly Sagiv Tel Aviv University Sunday Scrieber 8 Monday Schrieber.
1 Program Analysis Mooly Sagiv Tel Aviv University Textbook: Principles of Program Analysis.
Pointer analysis. Pointer Analysis Outline: –What is pointer analysis –Intraprocedural pointer analysis –Interprocedural pointer analysis Andersen and.
Induction and recursion
Automatic Complexity Analysis of Simple Imperative Programs Zachi Mann.
Abstract State Machines and Computationally Complete Query Languages Andreas Blass,U Michigan Yuri Gurevich,Microsoft Research & U Michigan Jan Van den.
Tractable Symmetry Breaking Using Restricted Search Trees Colva M. Roney-Dougal, Ian P. Gent, Tom Kelsey, Steve Linton Presented by: Shant Karakashian.
Control Flow Resolution in Dynamic Language Author: Štěpán Šindelář Supervisor: Filip Zavoral, Ph.D.
A Brief Summary for Exam 1 Subject Topics Propositional Logic (sections 1.1, 1.2) –Propositions Statement, Truth value, Proposition, Propositional symbol,
1 Iterative Program Analysis Abstract Interpretation Mooly Sagiv Tel Aviv University Textbook:
Inferring Specifications to Detect Errors in Code Mana Taghdiri Presented by: Robert Seater MIT Computer Science & AI Lab.
ISBN Chapter 3 Describing Semantics -Attribute Grammars -Dynamic Semantics.
410/510 1 of 18 Week 5 – Lecture 1 Semantic Analysis Compiler Construction.
Program Analysis Mooly Sagiv Tel Aviv University Sunday Scrieber 8 Monday Schrieber.
PRESTO: Program Analyses and Software Tools Research Group, Ohio State University Merging Equivalent Contexts for Scalable Heap-cloning-based Points-to.
Pointer Analysis for Multithreaded Programs Radu Rugina and Martin Rinard M I T Laboratory for Computer Science.
Points-To Analysis in Almost Linear Time Josh Bauman Jason Bartkowiak CSCI 3294 OCTOBER 9, 2001.
Copyright 2001, Matt Dwyer, John Hatcliff, and Radu Iosif. The syllabus and all lectures for this course are copyrighted materials and may not be used.
CS412/413 Introduction to Compilers Radu Rugina Lecture 13 : Static Semantics 18 Feb 02.
Pointer Analysis – Part I CS Pointer Analysis Answers which pointers can point to which memory locations at run-time Central to many program optimization.
/ PSWLAB Thread Modular Model Checking by Cormac Flanagan and Shaz Qadeer (published in Spin’03) Hong,Shin Thread Modular Model.
1 Iterative Program Analysis Abstract Interpretation Mooly Sagiv Tel Aviv University Textbook:
1 Numeric Abstract Domains Mooly Sagiv Tel Aviv University Adapted from Antoine Mine.
Program Analysis Mooly Sagiv Tel Aviv University Sunday Scrieber 8 Monday Schrieber.
CSE-321 Programming Languages Abstract Machine E POSTECH May 1, 2006 박성우.
COMP 412, FALL Type Systems C OMP 412 Rice University Houston, Texas Fall 2000 Copyright 2000, Robert Cartwright, all rights reserved. Students.
Program Analysis Last Lesson Mooly Sagiv. Goals u Show the significance of set constraints for CFA of Object Oriented Programs u Sketch advanced techniques.
Manuel Fahndrich Jakob Rehof Manuvir Das
CSE-321 Programming Languages Simply Typed -Calculus
Textbook: Principles of Program Analysis
Pointer Analysis Lecture 2
Graph-Based Operational Semantics
Interprocedural Analysis Chapter 19
Other Models of Computation
Abstract Interpretation
9.6 Solving Systems of Equations by Graphing
Pointer analysis.
This Lecture Substitution model
Abstract Interpretation
Mathematical Induction
Recursion.
Presentation transcript:

Featherweight X10: A Core Calculus for Async-Finish Parallelism Jonathan K. Lee, Jens Palsberg Presented By- Vasvi Kakkad

Outline Introduction Featherweight X10 May-Happen-in-Parallel Analysis Type Inference Context-insensitive Analysis

Introduction Two key constructs of X10 – Async – Finish Goal: May-happen-in-parallel (MHP) – Identify pairs of statement that happen in parallel – Use of Type system – Context sensitive analysis

Prior work Intra-procedural MHP for X10 by Agarwal – First determines what can not happen in parallel – Take complement – No correctness proof Inter-procedural analysis of concurrent programs by Barik/Sarkar – Different from MHP

Example – Intraprocedural Analysis void main() { S0: finish { S1: async { S13: finish { S5:... S6: async S11 S7: async S12 } S8:... } S2:... } S3:... }

Example – Modular Inter-procedural Analysis void f() { async S5 } void main() { S1: finish { async S3 f() } S2: finish { f() async S4 }

Featherweight X10 Subset of X10 – While-loop, assignments, and a single one- dimensional integer array – Methods and method calls, and – The async and finish statements Informal semantics – Async - || – Finish - ▷

Example – How semantics works

Grammar of Featherweight X10

Semantics Semantic Structures – A ∈ Array = N -> Z – Tree: T ::= T ⊳ T | T ∥ T | | √ – State = Program X Array X Tree

MHP Analysis Use of Type System for – Modular, Context-sensitive MHP Analysis Every program has a type – Can derive MHP information for all program 3 – abstract domain 9 – helper functions 12 – type rules

MHP Analysis – Abstract domains LabelSet = P(Label) – A, B, O, R LabelPairSet = P(Label X Label) – M TypeEnv = MethodName -> (LabelPairSet X LabelPairSet) – E

MHP Analysis – Type Rules Type judgment 1) ⊦ p : E 2) p, E, R ⊦ T : M 3) p, E, R ⊦ s : M, O Provides soundness and correctness proof

Type Inference Problem: given a program p, find E such that ⊦ p : E 2 steps – Rephrase inference problem as constraint problem – Solve the constraint problem

Type Inference Constraints – Two levels: level – 1 and level - 2 – Valuations D – domain of valuation Maps each r and o variable in C to a subset of L Maps each m variable in C to a subset of L X L – Constraint generation Type and constraints are equivalent Theorem: ⊦ p : E if and only if there exists a solution φ of C(p) where φ extends E.

Type Inference Solving constraints – Iterative data flow analysis algorithm – F : D -> D – F : λ φ ∈ D. λv. φ(rhs) F - monotone function from finite lattice D to itself F has least fixed point and coincide with the solution of C(p)

Context-insensitive Analysis Merges information from different call sites More conservative – Produces additional label pairs in MHP sets – Requires more time and space Number of increased pairs – for async bodies in different methods

Example – Modular Inter-procedural Analysis void f() { async S5 } void main() { S1: finish { async S3 f() } S2: finish { f() async S4 }

Conclusion Core calculus for async-finish parallelism – Using Type system for modular, context-sensitive, MHP analysis Type inference is straightforward – Generate and solve constraints in polynomial time Faster and uses less space than context- insensitive Good basis for type system and static analysis