control edge synchronization edge MGOTO COEND

Size: px
Start display at page:

Download "control edge synchronization edge MGOTO COEND"

Transcription

1 and Optimization of Explicitly Analysis Programs using the Parallel Parallel Program Graph Representation Vivek Sarkar MIT Laboratory for Computer Science 1

2 Motivation Current sequence of steps in compiling explicitly parallel/multithreaded programs: 1. Parallel program is mapped to low-level IL with library calls 2. Sequential compiler translates low-level IL to machine code 3. If machine code runs \correctly" then stop 4. Add volatile declarations to program and/or adjust compiler optimization options 5. Go back to step 1 2

3 Motivation (contd.) Extension of sequential compiler analysis/optimization techniques to parallel programs is necessary for maintaining single-processor performance in parallel programs, adapting program parallelism to target parallel machine, and making compilation of parallel programs less tedious and less error-prone. 3

4 control edges. Edge (a; b; L) 2 E control Edge (a; b; f) 2 E sync Parallel Program Graphs A Parallel Program Graph P P G = (N; E control ; E sync ) is a directed multigraph consisting of: N, a set of nodes (includes CFG nodes and mgoto nodes). An mgoto node is used to create parallel threads of computation. E control N N ftrue; false; uncondg, a set of labeled identies a control edge from node a to node b with label L. E sync N N SynchConds, a set of synchronization edges. denes a synchronization from node a to node b with synchronization condition f. 4

5 S2: X2 := : : : S5: : : : X 4 := : : : S7: X7 := : : : Example of a Parallel Program Graph control edge S1: X1 := : : : synchronization edge post(ev1) cobegin S1 MGOTO post(ev2) S3: wait(ev1) S2 S5 post(ev3) S4: wait(ev8) S3 S6 nn S7 S6: wait(ev2) S8 S8: wait(ev3) S4 post(ev8) COEND coend 5

6 Relating CFGs to PPGs Construction of PPG for a sequential program PPG nodes = CFG nodes PPG control edges = CFG edges PPG synchronization edges = empty set 6

7 Relating PDGs to PPGs Construction of PPG from PDG: PPG nodes = PDG nodes (A region node in a PDG maps to an mgoto node in the PPG) PPG control edges = PDG control dependence edges PPG synchronization edges = PDG data dependence edges Synchronization condition f in PPG synchronization edge mirrors context of PDG data dependence edge 7

8 REACH in (n) = set of denitions d s.t. there is a path from d to n Reaching Denitions Analysis on CFGs and d is not killed along that path. REACH out (n) = (REACH in (n) Kill(n)) [ Gen(n) REACH in (n) = [ REACH out (p) pred(n) 2 p 8

9 3. there is no CFG path from d to n Computing Redenition (REDEF) sets for CFGs REDEF in (n) = set of denitions d s.t. d is redened (killed) on paths from d to n (and there is at least one path from d to n) ALL out (n) = (REDEF in (n) Gen(n)) [ REDEF (Kill(n) \ REACH in (n)) \ p 2 pred(n) REDEF in (n) = REDEF out (p) Three mutually exclusive cases for denition d and basic block n: 1. d 2 REACH in (n) 2. d 2 REDEF in (n) 9

10 1 (p) CA out REACH REDEF out (n) = (REDEF in (n) Gen(n)) [ Reaching Denitions Analysis on PPGs REACH out (n) = (REACH in (n) Kill(n)) [ Gen(n) 0 B@ [ REACH in (n) = REDEF in (n) p 2 pred(n) (Kill(n) \ REACH in (n)) [ [ REDEF in (n) = REDEF out (p) p 2 sync pred(n) \ REDEF out (p) p 2 control pred(n) 10

11 n REDEF in (n) REACH in (n) REDEF out (n) REACH out (n) Node ; ; ; fx 1 g S1 ; fx 1 g ; fx 1 g cobegin ; fx 1 g fx 1 g fx 2 g S2 fx 1 g fx 2 g fx 1 g fx 2 g S3 ; fx 1 g ; fx 1 g S5 fx 1 g fx 2 g fx 1 g fx 2 g S6 fx 1 g fx 2 g fx 1 ; X 2 g fx 7 g S7 fx 1 g fx 2 g fx 1 ; X 2 g fx 7 g S8 fx 1 ; X 2 g fx 7 g fx 1 ; X 2 ; X 7 g fx 4 g S4 coend fx 1 ; X 2 ; X 7 g fx 4 g fx 1 ; X 2 ; X 7 g fx 4 g Reaching Denitions Analysis on Example PPG 11

12 Related Work [Midki et al 89], [Chow, Harrison 92], : : : Analysis of explicit (nondeterministic) parallel programs with scalar and array variables, a sequentially consistent memory model, and structured parallelism (no explicit synchronization) [Pingali et al 90] Presented a constant propagation algorithm for Dependence Flow Graphs (dataow graphs with an imperative store) [Srinivasan 94], [Ferrante et al 96] Analysis of explicit deterministic parallel programs with scalar and array variables and copy-in/copy-out semantics 12

13 Conclusions In this talk, we motivated using the Parallel Program Graph (PPG) representation in analysis and optimization of parallel programs, and presented a solution for reaching denitions analysis on PPGs that is more precise than in past work. 13

14 Future Work Extend other traditional analysis and optimization algorithms for use on PPGs Use PPGs as intermediate representation in common compilation and execution environment for dierent parallel programming languages Extend PPG execution model to support mutual exclusion and nondeterminism 14

15 An execution instance I a When an execution instance I a branch label as L, it creates a new execution instances I b Parallel Control Flow in a PPG Three cases: 1. An mgoto node a with k 0 outgoing control edges, (a; b 1 ; uncond), : : :, (a; b k ; uncond), all with label uncond: of node a creates new execution instances I b1 ; : : : ; I b k of nodes b 1; : : : ; b k and then terminates itself. 2. A non-mgoto node a with one outgoing control edge (a; b; L) for branch label L: of node a evaluates node a's of node b and then terminates itself. 15

16 When an execution instance I a 3. A non-mgoto node a with no outgoing control edges for branch label L: of node a evaluates node a's branch label as L, it terminates itself.

17 H(I a ) = execution history of instance I a caused execution instance I a of PPG node a Execution Histories = sequence of (node,label) branch conditions that to be created Execution histories are dened recursively: 1. H(I start ) = <> (empty sequence) 2. If execution instance I a creates execution instance I b due to control edge (a; b; L), then H(I b ) = concat(h(i a ); < a; L >) 16

18 Consider synchronization edge (a; b; f) 2 E sync f(h(i a ); H(I b )) = true means that execution instance I a complete execution before execution instance I b Synchronization Conditions Synchronization condition f is a boolean function on execution histories Given execution instances I a and I b of nodes a and b, must can be started 17

19 Write-write hazard if I a Weak (Deterministic) Memory Consistency Model All memory accesses are assumed to be non-atomic Read-write hazard if I a reads location l in i and there is a parallel write of a dierent value, then the result is an error writes value v into location l and there is a parallel write of a dierent value, then the resulting value in location l is undened Separation of data communication and synchronization: { Data communication specied by read/write operations { Sequencing specied by synchronization and control edges 18

20 Control-Independent Synchronizations in a PPG A synchronization edge (x; y; f) is control-independent if a necessary condition for f(h(i a ); H(I b )) =true is that nodeprex(h(i x ); a) = nodeprex(h(i y ); a) for all nodes a that are control ancestors of both x and y. 19

21 Consider an execution instance I x Control-Independent Synchronizations in a PPG (contd.) of PPG node x with execution history H(I x ) =< u 1 ; L 1 ; : : : ; u i ; : : : ; u j ; : : : ; u k ; L k >, u k = x. We dene nodeprex(h(i x ); a) as follows: If a 6= x, nodeprex(h(i x ); a) =< u 1 ; L 1 ; : : : ; u i ; L i >; u i = a, u j 6= a, i < j k. If a = x, then nodeprex(h(i x ); a) = H(I x ) =< u 1 ; L 1 ; : : : ; u i ; : : : ; u j ; : : : ; u k ; L k >. A node a is a control ancestor of node x if there exists an acyclic path of control edges from START to x such that a is on that path. 20

Analysis and Optimization of Explicitly Parallel Programs using the Parallel Program Graph Representation Vivek Sarkar Laboratory for Computer Science

Analysis and Optimization of Explicitly Parallel Programs using the Parallel Program Graph Representation Vivek Sarkar Laboratory for Computer Science Analysis and Optimization of Explicitly Parallel Programs using the Parallel Program Graph Representation Vivek Sarkar Laboratory for Computer Science Massachusetts Institute of Technology 545 Technology

More information

Parallel Program Graphs and their. (fvivek dependence graphs, including the Control Flow Graph (CFG) which

Parallel Program Graphs and their. (fvivek dependence graphs, including the Control Flow Graph (CFG) which Parallel Program Graphs and their Classication Vivek Sarkar Barbara Simons IBM Santa Teresa Laboratory, 555 Bailey Avenue, San Jose, CA 95141 (fvivek sarkar,simonsg@vnet.ibm.com) Abstract. We categorize

More information

We can express this in dataflow equations using gen and kill sets, where the sets are now sets of expressions.

We can express this in dataflow equations using gen and kill sets, where the sets are now sets of expressions. Available expressions Suppose we want to do common-subexpression elimination; that is, given a program that computes x y more than once, can we eliminate one of the duplicate computations? To find places

More information

A taxonomy of race. D. P. Helmbold, C. E. McDowell. September 28, University of California, Santa Cruz. Santa Cruz, CA

A taxonomy of race. D. P. Helmbold, C. E. McDowell. September 28, University of California, Santa Cruz. Santa Cruz, CA A taxonomy of race conditions. D. P. Helmbold, C. E. McDowell UCSC-CRL-94-34 September 28, 1994 Board of Studies in Computer and Information Sciences University of California, Santa Cruz Santa Cruz, CA

More information

COMP Parallel Computing. CC-NUMA (2) Memory Consistency

COMP Parallel Computing. CC-NUMA (2) Memory Consistency COMP 633 - Parallel Computing Lecture 11 September 26, 2017 Memory Consistency Reading Patterson & Hennesey, Computer Architecture (2 nd Ed.) secn 8.6 a condensed treatment of consistency models Coherence

More information

Static Detection of Access Anomalies in Ada95

Static Detection of Access Anomalies in Ada95 Static Detection of Access Anomalies in Ada95 Bernd Burgstaller, University of Sydney Johann Blieberger, Vienna University of Technology Robert Mittermayr, ARC Seibersdorf research GmbH Static Detection

More information

We can express this in dataflow equations using gen and kill sets, where the sets are now sets of expressions.

We can express this in dataflow equations using gen and kill sets, where the sets are now sets of expressions. Available expressions Suppose we want to do common-subexpression elimination; that is, given a program that computes x y more than once, can we eliminate one of the duplicate computations? To find places

More information

Compiler Design. Fall Data-Flow Analysis. Sample Exercises and Solutions. Prof. Pedro C. Diniz

Compiler Design. Fall Data-Flow Analysis. Sample Exercises and Solutions. Prof. Pedro C. Diniz Compiler Design Fall 2015 Data-Flow Analysis Sample Exercises and Solutions Prof. Pedro C. Diniz USC / Information Sciences Institute 4676 Admiralty Way, Suite 1001 Marina del Rey, California 90292 pedro@isi.edu

More information

Control Flow Analysis

Control Flow Analysis Control Flow Analysis Last time Undergraduate compilers in a day Today Assignment 0 due Control-flow analysis Building basic blocks Building control-flow graphs Loops January 28, 2015 Control Flow Analysis

More information

Data structures for optimizing programs with explicit parallelism

Data structures for optimizing programs with explicit parallelism Oregon Health & Science University OHSU Digital Commons CSETech March 1991 Data structures for optimizing programs with explicit parallelism Michael Wolfe Harini Srinivasan Follow this and additional works

More information

The Compositional C++ Language. Denition. Abstract. This document gives a concise denition of the syntax and semantics

The Compositional C++ Language. Denition. Abstract. This document gives a concise denition of the syntax and semantics The Compositional C++ Language Denition Peter Carlin Mani Chandy Carl Kesselman March 12, 1993 Revision 0.95 3/12/93, Comments welcome. Abstract This document gives a concise denition of the syntax and

More information

Program analysis for determining opportunities for optimization: 2. analysis: dataow Organization 1. What kind of optimizations are useful? lattice al

Program analysis for determining opportunities for optimization: 2. analysis: dataow Organization 1. What kind of optimizations are useful? lattice al Scalar Optimization 1 Program analysis for determining opportunities for optimization: 2. analysis: dataow Organization 1. What kind of optimizations are useful? lattice algebra solving equations on lattices

More information

An Introduction to OpenMP

An Introduction to OpenMP Dipartimento di Ingegneria Industriale e dell'informazione University of Pavia December 4, 2017 Recap Parallel machines are everywhere Many architectures, many programming model. Among them: multithreading.

More information

Data Flow Analysis. CSCE Lecture 9-02/15/2018

Data Flow Analysis. CSCE Lecture 9-02/15/2018 Data Flow Analysis CSCE 747 - Lecture 9-02/15/2018 Data Flow Another view - program statements compute and transform data So, look at how that data is passed through the program. Reason about data dependence

More information

Concurrency. Lecture 14: Concurrency & exceptions. Why concurrent subprograms? Processes and threads. Design Issues for Concurrency.

Concurrency. Lecture 14: Concurrency & exceptions. Why concurrent subprograms? Processes and threads. Design Issues for Concurrency. Lecture 14: Concurrency & exceptions Concurrency Processes and threads Semaphores, monitors and message passing Exception handling Concurrency Is is often desirable or necessary to execute parts of programs

More information

DRAFT for FINAL VERSION. Accepted for CACSD'97, Gent, Belgium, April 1997 IMPLEMENTATION ASPECTS OF THE PLC STANDARD IEC

DRAFT for FINAL VERSION. Accepted for CACSD'97, Gent, Belgium, April 1997 IMPLEMENTATION ASPECTS OF THE PLC STANDARD IEC DRAFT for FINAL VERSION. Accepted for CACSD'97, Gent, Belgium, 28-3 April 1997 IMPLEMENTATION ASPECTS OF THE PLC STANDARD IEC 1131-3 Martin hman Stefan Johansson Karl-Erik rzen Department of Automatic

More information

Written Presentation: JoCaml, a Language for Concurrent Distributed and Mobile Programming

Written Presentation: JoCaml, a Language for Concurrent Distributed and Mobile Programming Written Presentation: JoCaml, a Language for Concurrent Distributed and Mobile Programming Nicolas Bettenburg 1 Universitaet des Saarlandes, D-66041 Saarbruecken, nicbet@studcs.uni-sb.de Abstract. As traditional

More information

Static Slicing of Threaded Programs

Static Slicing of Threaded Programs Static Slicing of Threaded Programs Jens Krinke krinke@ips.cs.tu-bs.de TU Braunschweig Abteilung Softwaretechnologie Abstract Static program slicing is an established method for analyzing sequential programs,

More information

proc {Produce State Out} local State2 Out2 in State2 = State + 1 Out = State Out2 {Produce State2 Out2}

proc {Produce State Out} local State2 Out2 in State2 = State + 1 Out = State Out2 {Produce State2 Out2} Laziness and Declarative Concurrency Raphael Collet Universite Catholique de Louvain, B-1348 Louvain-la-Neuve, Belgium raph@info.ucl.ac.be May 7, 2004 Abstract Concurrency and distribution in a programming

More information

Models of concurrency & synchronization algorithms

Models of concurrency & synchronization algorithms Models of concurrency & synchronization algorithms Lecture 3 of TDA383/DIT390 (Concurrent Programming) Carlo A. Furia Chalmers University of Technology University of Gothenburg SP3 2016/2017 Today s menu

More information

University of Delaware Department of Electrical and Computer Engineering Computer Architecture and Parallel Systems Laboratory Analyzable Atomic Sections: Integrating Fine-Grained Synchronization and Weak

More information

Concurrency Abstractions in C#

Concurrency Abstractions in C# Concurrency Abstractions in C# 1 1 Motivation Concurrency in C# Concurrency critical factor in behavior/performance affects semantics of all other constructs advantages of language vs. library Compiler

More information

Small Lisp Reference Manual. Extracted from Appendix B of Symbolic Computing with Lisp. Prentice Hall, 1992.

Small Lisp Reference Manual. Extracted from Appendix B of Symbolic Computing with Lisp. Prentice Hall, 1992. Small Lisp Reference Manual Robert D. Cameron Anthony H. Dixon Extracted from Appendix B of Symbolic Computing with Lisp. Prentice Hall, 1992. 1 Lexical Structure A Small Lisp program consists of a stream

More information

Fundamental Algorithms

Fundamental Algorithms Fundamental Algorithms Chapter 6: Parallel Algorithms The PRAM Model Jan Křetínský Winter 2017/18 Chapter 6: Parallel Algorithms The PRAM Model, Winter 2017/18 1 Example: Parallel Sorting Definition Sorting

More information

Algorithmic "imperative" language

Algorithmic imperative language Algorithmic "imperative" language Undergraduate years Epita November 2014 The aim of this document is to introduce breiy the "imperative algorithmic" language used in the courses and tutorials during the

More information

Lecture 21 CIS 341: COMPILERS

Lecture 21 CIS 341: COMPILERS Lecture 21 CIS 341: COMPILERS Announcements HW6: Analysis & Optimizations Alias analysis, constant propagation, dead code elimination, register allocation Available Soon Due: Wednesday, April 25 th Zdancewic

More information

Sharing Objects Ch. 3

Sharing Objects Ch. 3 Sharing Objects Ch. 3 Visibility What is the source of the issue? Volatile Dekker s algorithm Publication and Escape Thread Confinement Immutability Techniques of safe publication Assignment 1 Visibility

More information

Concurrent Programming Lecture 10

Concurrent Programming Lecture 10 Concurrent Programming Lecture 10 25th September 2003 Monitors & P/V Notion of a process being not runnable : implicit in much of what we have said about P/V and monitors is the notion that a process may

More information

Concurrency Abstractions in C#

Concurrency Abstractions in C# Concurrency Abstractions in C# Concurrency critical factor in behavior/performance affects semantics of all other constructs advantages of language vs. library compiler analysis/optimization clarity of

More information

to automatically generate parallel code for many applications that periodically update shared data structures using commuting operations and/or manipu

to automatically generate parallel code for many applications that periodically update shared data structures using commuting operations and/or manipu Semantic Foundations of Commutativity Analysis Martin C. Rinard y and Pedro C. Diniz z Department of Computer Science University of California, Santa Barbara Santa Barbara, CA 93106 fmartin,pedrog@cs.ucsb.edu

More information

Concurrency Abstractions in C#

Concurrency Abstractions in C# Concurrency Abstractions in C# Concurrency critical factor in behavior/performance affects semantics of all other constructs advantages of language vs. library compiler analysis/optimization clarity of

More information

Acknowledgments 2

Acknowledgments 2 Program Slicing: An Application of Object-oriented Program Dependency Graphs Anand Krishnaswamy Dept. of Computer Science Clemson University Clemson, SC 29634-1906 anandk@cs.clemson.edu Abstract A considerable

More information

A Dag-Based Algorithm for Distributed Mutual Exclusion. Kansas State University. Manhattan, Kansas maintains [18]. algorithms [11].

A Dag-Based Algorithm for Distributed Mutual Exclusion. Kansas State University. Manhattan, Kansas maintains [18]. algorithms [11]. A Dag-Based Algorithm for Distributed Mutual Exclusion Mitchell L. Neilsen Masaaki Mizuno Department of Computing and Information Sciences Kansas State University Manhattan, Kansas 66506 Abstract The paper

More information

A Deterministic Concurrent Language for Embedded Systems

A Deterministic Concurrent Language for Embedded Systems A Deterministic Concurrent Language for Embedded Systems Stephen A. Edwards Columbia University Joint work with Olivier Tardieu SHIM:A Deterministic Concurrent Language for Embedded Systems p. 1/38 Definition

More information

COMP 382: Reasoning about algorithms

COMP 382: Reasoning about algorithms Spring 2015 Unit 2: Models of computation What is an algorithm? So far... An inductively defined function Limitation Doesn t capture mutation of data Imperative models of computation Computation = sequence

More information

Tool demonstration: Spin

Tool demonstration: Spin Tool demonstration: Spin 1 Spin Spin is a model checker which implements the LTL model-checking procedure described previously (and much more besides). Developed by Gerard Holzmann of Bell Labs Has won

More information

CS553 Lecture Generalizing Data-flow Analysis 3

CS553 Lecture Generalizing Data-flow Analysis 3 Generalizing Data-flow Analysis Announcements Project 2 writeup is available Read Stephenson paper Last Time Control-flow analysis Today C-Breeze Introduction Other types of data-flow analysis Reaching

More information

Multi-threaded programming in Java

Multi-threaded programming in Java Multi-threaded programming in Java Java allows program to specify multiple threads of execution Provides instructions to ensure mutual exclusion, and selective blocking/unblocking of threads What is a

More information

Chapter 15: Information Flow

Chapter 15: Information Flow Chapter 15: Information Flow Definitions Compiler-based mechanisms Execution-based mechanisms Examples Slide #15-1 Overview Basics and background Compiler-based mechanisms Execution-based mechanisms Examples

More information

Well, you need to capture the notions of atomicity, non-determinism, fairness etc. These concepts are not built into languages like JAVA, C++ etc!

Well, you need to capture the notions of atomicity, non-determinism, fairness etc. These concepts are not built into languages like JAVA, C++ etc! Hwajung Lee Why do we need these? Don t we already know a lot about programming? Well, you need to capture the notions of atomicity, non-determinism, fairness etc. These concepts are not built into languages

More information

Distributed Systems. Distributed Shared Memory. Paul Krzyzanowski

Distributed Systems. Distributed Shared Memory. Paul Krzyzanowski Distributed Systems Distributed Shared Memory Paul Krzyzanowski pxk@cs.rutgers.edu Except as otherwise noted, the content of this presentation is licensed under the Creative Commons Attribution 2.5 License.

More information

7/6/2015. Motivation & examples Threads, shared memory, & synchronization. Imperative programs

7/6/2015. Motivation & examples Threads, shared memory, & synchronization. Imperative programs Motivation & examples Threads, shared memory, & synchronization How do locks work? Data races (a lower level property) How do data race detectors work? Atomicity (a higher level property) Concurrency exceptions

More information

Parallel Computer Architecture Spring Memory Consistency. Nikos Bellas

Parallel Computer Architecture Spring Memory Consistency. Nikos Bellas Parallel Computer Architecture Spring 2018 Memory Consistency Nikos Bellas Computer and Communications Engineering Department University of Thessaly Parallel Computer Architecture 1 Coherence vs Consistency

More information

Motivation & examples Threads, shared memory, & synchronization

Motivation & examples Threads, shared memory, & synchronization 1 Motivation & examples Threads, shared memory, & synchronization How do locks work? Data races (a lower level property) How do data race detectors work? Atomicity (a higher level property) Concurrency

More information

G52CON: Concepts of Concurrency

G52CON: Concepts of Concurrency G52CON: Concepts of Concurrency Lecture 6: Algorithms for Mutual Natasha Alechina School of Computer Science nza@cs.nott.ac.uk Outline of this lecture mutual exclusion with standard instructions example:

More information

Reinhard v. Hanxleden 1, Michael Mendler 2, J. Aguado 2, Björn Duderstadt 1, Insa Fuhrmann 1, Christian Motika 1, Stephen Mercer 3 and Owen Brian 3

Reinhard v. Hanxleden 1, Michael Mendler 2, J. Aguado 2, Björn Duderstadt 1, Insa Fuhrmann 1, Christian Motika 1, Stephen Mercer 3 and Owen Brian 3 Sequentially Constructive Concurrency * A conservative extension of the Synchronous Model of Computation Reinhard v. Hanxleden, Michael Mendler 2, J. Aguado 2, Björn Duderstadt, Insa Fuhrmann, Christian

More information

Jukka Julku Multicore programming: Low-level libraries. Outline. Processes and threads TBB MPI UPC. Examples

Jukka Julku Multicore programming: Low-level libraries. Outline. Processes and threads TBB MPI UPC. Examples Multicore Jukka Julku 19.2.2009 1 2 3 4 5 6 Disclaimer There are several low-level, languages and directive based approaches But no silver bullets This presentation only covers some examples of them is

More information

Taming release-acquire consistency

Taming release-acquire consistency Taming release-acquire consistency Ori Lahav Nick Giannarakis Viktor Vafeiadis Max Planck Institute for Software Systems (MPI-SWS) POPL 2016 Weak memory models Weak memory models provide formal sound semantics

More information

INTRODUCTION Introduction This document describes the MPC++ programming language Version. with comments on the design. MPC++ introduces a computationa

INTRODUCTION Introduction This document describes the MPC++ programming language Version. with comments on the design. MPC++ introduces a computationa TR-944 The MPC++ Programming Language V. Specication with Commentary Document Version. Yutaka Ishikawa 3 ishikawa@rwcp.or.jp Received 9 June 994 Tsukuba Research Center, Real World Computing Partnership

More information

Lecture 21: Relational Programming II. November 15th, 2011

Lecture 21: Relational Programming II. November 15th, 2011 Lecture 21: Relational Programming II November 15th, 2011 Lecture Outline Relational Programming contd The Relational Model of Computation Programming with choice and Solve Search Strategies Relational

More information

Dependence and Data Flow Models. (c) 2007 Mauro Pezzè & Michal Young Ch 6, slide 1

Dependence and Data Flow Models. (c) 2007 Mauro Pezzè & Michal Young Ch 6, slide 1 Dependence and Data Flow Models (c) 2007 Mauro Pezzè & Michal Young Ch 6, slide 1 Why Data Flow Models? Models from Chapter 5 emphasized control Control flow graph, call graph, finite state machines We

More information

1 Introduction The object-oriented programming (OOP) paradigm provides the tools and facilities for developing software that is easier to build, exten

1 Introduction The object-oriented programming (OOP) paradigm provides the tools and facilities for developing software that is easier to build, exten ABC ++ : Concurrency by Inheritance in C ++ Eshrat Arjomandi, y William O'Farrell, Ivan Kalas, Gita Koblents, Frank Ch Eigler, and Guang G Gao Abstract Many attempts have been made to add concurrency to

More information

Flow Propagation Algorithm

Flow Propagation Algorithm SOMA Flow Propagation Algorithm Univ.Prof. Dr. Franz Wotawa, Birgit Hofer Institut für Softwaretechnologie {wotawa, hofer}@ist.tugraz.at Institute for Software Technology Agenda Flow Propagation Algorithm

More information

Lecture 32: Volatile variables, Java memory model

Lecture 32: Volatile variables, Java memory model COMP 322: Fundamentals of Parallel Programming Lecture 32: Volatile variables, Java memory model Vivek Sarkar Department of Computer Science, Rice University vsarkar@rice.edu https://wiki.rice.edu/confluence/display/parprog/comp322

More information

Problems with Concurrency

Problems with Concurrency with Concurrency February 14, 2012 1 / 27 s with concurrency race conditions deadlocks GUI source of s non-determinism deterministic execution model interleavings 2 / 27 General ideas Shared variable Shared

More information

Single-Path Code Generation and Input-Data Dependence Analysis

Single-Path Code Generation and Input-Data Dependence Analysis Single-Path Code Generation and Input-Data Dependence Analysis Daniel Prokesch daniel@vmars.tuwien.ac.at July 10 th, 2014 Project Workshop Madrid D. Prokesch TUV T-CREST Workshop, Madrid July 10 th, 2014

More information

Analyzing programs with explicit parallelism

Analyzing programs with explicit parallelism Oregon Health & Science University OHSU Digital Commons CSETech June 1991 Analyzing programs with explicit parallelism Harini Srinivasan Michael Wolfe Follow this and additional works at: http://digitalcommons.ohsu.edu/csetech

More information

MIT Introduction to Dataflow Analysis. Martin Rinard Laboratory for Computer Science Massachusetts Institute of Technology

MIT Introduction to Dataflow Analysis. Martin Rinard Laboratory for Computer Science Massachusetts Institute of Technology MIT 6.035 Introduction to Dataflow Analysis Martin Rinard Laboratory for Computer Science Massachusetts Institute of Technology Dataflow Analysis Used to determine properties of program that involve multiple

More information

PROCESSES AND THREADS

PROCESSES AND THREADS PROCESSES AND THREADS A process is a heavyweight flow that can execute concurrently with other processes. A thread is a lightweight flow that can execute concurrently with other threads within the same

More information

9/5/17. The Design and Implementation of Programming Languages. Compilation. Interpretation. Compilation vs. Interpretation. Hybrid Implementation

9/5/17. The Design and Implementation of Programming Languages. Compilation. Interpretation. Compilation vs. Interpretation. Hybrid Implementation Language Implementation Methods The Design and Implementation of Programming Languages Compilation Interpretation Hybrid In Text: Chapter 1 2 Compilation Interpretation Translate high-level programs to

More information

opt. front end produce an intermediate representation optimizer transforms the code in IR form into an back end transforms the code in IR form into

opt. front end produce an intermediate representation optimizer transforms the code in IR form into an back end transforms the code in IR form into Intermediate representations source code front end ir opt. ir back end target code front end produce an intermediate representation (IR) for the program. optimizer transforms the code in IR form into an

More information

SYNCHRONIZED DATA. Week 9 Laboratory for Concurrent and Distributed Systems Uwe R. Zimmer. Pre-Laboratory Checklist

SYNCHRONIZED DATA. Week 9 Laboratory for Concurrent and Distributed Systems Uwe R. Zimmer. Pre-Laboratory Checklist SYNCHRONIZED DATA Week 9 Laboratory for Concurrent and Distributed Systems Uwe R. Zimmer Pre-Laboratory Checklist vvyou have read this text before you come to your lab session. vvyou understand and can

More information

Java Memory Model. Jian Cao. Department of Electrical and Computer Engineering Rice University. Sep 22, 2016

Java Memory Model. Jian Cao. Department of Electrical and Computer Engineering Rice University. Sep 22, 2016 Java Memory Model Jian Cao Department of Electrical and Computer Engineering Rice University Sep 22, 2016 Content Introduction Java synchronization mechanism Double-checked locking Out-of-Thin-Air violation

More information

Problems with Concurrency. February 19, 2014

Problems with Concurrency. February 19, 2014 with Concurrency February 19, 2014 s with concurrency interleavings race conditions dead GUI source of s non-determinism deterministic execution model 2 / 30 General ideas Shared variable Access interleavings

More information

The Java Memory Model

The Java Memory Model Jeremy Manson 1, William Pugh 1, and Sarita Adve 2 1 University of Maryland 2 University of Illinois at Urbana-Champaign Presented by John Fisher-Ogden November 22, 2005 Outline Introduction Sequential

More information

Cover Page. The handle holds various files of this Leiden University dissertation

Cover Page. The handle   holds various files of this Leiden University dissertation Cover Page The handle http://hdl.handle.net/1887/22891 holds various files of this Leiden University dissertation Author: Gouw, Stijn de Title: Combining monitoring with run-time assertion checking Issue

More information

Distributed Shared Memory and Memory Consistency Models

Distributed Shared Memory and Memory Consistency Models Lectures on distributed systems Distributed Shared Memory and Memory Consistency Models Paul Krzyzanowski Introduction With conventional SMP systems, multiple processors execute instructions in a single

More information

System Design, Modeling, and Simulation using Ptolemy II

System Design, Modeling, and Simulation using Ptolemy II cba This is a chapter from the book System Design, Modeling, and Simulation using Ptolemy II This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License. To view a copy

More information

SYSTEMS MEMO #12. A Synchronization Library for ASIM. Beng-Hong Lim Laboratory for Computer Science.

SYSTEMS MEMO #12. A Synchronization Library for ASIM. Beng-Hong Lim Laboratory for Computer Science. ALEWIFE SYSTEMS MEMO #12 A Synchronization Library for ASIM Beng-Hong Lim (bhlim@masala.lcs.mit.edu) Laboratory for Computer Science Room NE43-633 January 9, 1992 Abstract This memo describes the functions

More information

loop m=5 d:m=x+y loop wait post u:z=3*m 7 20 end end

loop m=5 d:m=x+y loop wait post u:z=3*m 7 20 end end All-uses Testing of Shared Memory Parallel Programs Cheer-Sun D. Yang Lori L. Pollock Computer Science Department Computer and Information Sciences West Chester University of PA University of Delaware

More information

An Eect Type System for Modular Distribution of Dataow Programs

An Eect Type System for Modular Distribution of Dataow Programs An Eect Type System for Modular Distribution of Dataow Programs Gwenaël Delaval 1 Alain Girault 1 Marc Pouzet 2 P P 1 INRIA Rhône-Alpes, Pop-Art project ART 2 LRI, Demons team June 13, 2008 LCTES, Tucson,

More information

A Deterministic Concurrent Language for Embedded Systems

A Deterministic Concurrent Language for Embedded Systems A Deterministic Concurrent Language for Embedded Systems Stephen A. Edwards Columbia University Joint work with Olivier Tardieu SHIM:A Deterministic Concurrent Language for Embedded Systems p. 1/30 Definition

More information

Shared Memory Programming with OpenMP. Lecture 8: Memory model, flush and atomics

Shared Memory Programming with OpenMP. Lecture 8: Memory model, flush and atomics Shared Memory Programming with OpenMP Lecture 8: Memory model, flush and atomics Why do we need a memory model? On modern computers code is rarely executed in the same order as it was specified in the

More information

Static Interprocedural Slicing of Shared Memory Parallel Programs *

Static Interprocedural Slicing of Shared Memory Parallel Programs * Static Interprocedural Slicing of Shared Memory Parallel Programs * Dixie M. Hisley Matthew J. Bridges Lori L. Pollock U.S. Army Research Lab Computer & Information Sciences Computer & Information Sciences

More information

Semantic analysis. Syntax tree is decorated with typing- and other context dependent

Semantic analysis. Syntax tree is decorated with typing- and other context dependent Semantic analysis Semantic analysis Semantic analysis checks for the correctness of contextual dependences: { nds correspondence between declarations and usage of identiers, { performs type checking/inference,

More information

Communication Complexity and Parallel Computing

Communication Complexity and Parallel Computing Juraj Hromkovic Communication Complexity and Parallel Computing With 40 Figures Springer Table of Contents 1 Introduction 1 1.1 Motivation and Aims 1 1.2 Concept and Organization 4 1.3 How to Read the

More information

Programming II. Modularity 2017/18

Programming II. Modularity 2017/18 Programming II Modularity 2017/18 Module? Lecture Outline Evolution and history of programming languages Modularity Example History of Programming Programming Paradigms How and why languages develop? How

More information

Revision 8. John H. Spicer. November 3, 1994

Revision 8. John H. Spicer. November 3, 1994 Template Issues and Proposed Resolutions Revision 8 John H. Spicer Edison Design Group, Inc. jhs@edg.com November 3, 1994 X3J16/94-0125 WG21/N0512 Introduction This version contains only the issues resolved

More information

Distributed Algorithms 6.046J, Spring, Nancy Lynch

Distributed Algorithms 6.046J, Spring, Nancy Lynch Distributed Algorithms 6.046J, Spring, 205 Nancy Lynch What are Distributed Algorithms? Algorithms that run on networked processors, or on multiprocessors that share memory. They solve many kinds of problems:

More information

CMSC 433 Programming Language Technologies and Paradigms. Synchronization

CMSC 433 Programming Language Technologies and Paradigms. Synchronization CMSC 433 Programming Language Technologies and Paradigms Synchronization Aspects of Synchronization Atomicity Locking to obtain mutual exclusion What we most often think about Visibility Ensuring that

More information

Types for Precise Thread Interference

Types for Precise Thread Interference Types for Precise Thread Interference Jaeheon Yi, Tim Disney, Cormac Flanagan UC Santa Cruz Stephen Freund Williams College October 23, 2011 2 Multiple Threads Single Thread is a non-atomic read-modify-write

More information

source constructs created by the operation. he complexity of these computations contributes to the complexity of the entire language translator specic

source constructs created by the operation. he complexity of these computations contributes to the complexity of the entire language translator specic pecication Languages in Algebraic Compilers Eric Van Wyk 1 Oxford University Computing Laboratory Wolfson Building, Parks Road Oxford OX1 3QD, UK Abstract Algebraic compilers provide a powerful and convenient

More information

A Loosely Synchronized Execution Model for a. Simple Data-Parallel Language. (Extended Abstract)

A Loosely Synchronized Execution Model for a. Simple Data-Parallel Language. (Extended Abstract) A Loosely Synchronized Execution Model for a Simple Data-Parallel Language (Extended Abstract) Yann Le Guyadec 2, Emmanuel Melin 1, Bruno Ran 1 Xavier Rebeuf 1 and Bernard Virot 1? 1 LIFO - IIIA Universite

More information

Continuation Passing Style. Continuation Passing Style

Continuation Passing Style. Continuation Passing Style 161 162 Agenda functional programming recap problem: regular expression matcher continuation passing style (CPS) movie regular expression matcher based on CPS correctness proof, verification change of

More information

The S-Expression Design Language (SEDL) James C. Corbett. September 1, Introduction. 2 Origins of SEDL 2. 3 The Language SEDL 2.

The S-Expression Design Language (SEDL) James C. Corbett. September 1, Introduction. 2 Origins of SEDL 2. 3 The Language SEDL 2. The S-Expression Design Language (SEDL) James C. Corbett September 1, 1993 Contents 1 Introduction 1 2 Origins of SEDL 2 3 The Language SEDL 2 3.1 Scopes : : : : : : : : : : : : : : : : : : : : : : : :

More information

Contents 1 Introduction Denition of Terms Execution Model Dir

Contents 1 Introduction Denition of Terms Execution Model Dir JOMP Application Program Interface Version 0.1 (draft) Jan Obdrzalek Faculty of Informatics, Masaryk University, Botanicka 68a, 602 00 Brno, Czech Republic. email: xobdrzal@fi.muni.cz Mark Bull EPCC, University

More information

Security for Multithreaded Programs under Cooperative Scheduling

Security for Multithreaded Programs under Cooperative Scheduling Security for Multithreaded Programs under Cooperative Scheduling Alejandro Russo and Andrei Sabelfeld Dept. of Computer Science and Engineering, Chalmers University of Technology 412 96 Göteborg, Sweden,

More information

Dependence and Data Flow Models. (c) 2007 Mauro Pezzè & Michal Young Ch 6, slide 1

Dependence and Data Flow Models. (c) 2007 Mauro Pezzè & Michal Young Ch 6, slide 1 Dependence and Data Flow Models (c) 2007 Mauro Pezzè & Michal Young Ch 6, slide 1 Why Data Flow Models? Models from Chapter 5 emphasized control Control flow graph, call graph, finite state machines We

More information

Optimizations. Optimization Safety. Optimization Safety CS412/CS413. Introduction to Compilers Tim Teitelbaum

Optimizations. Optimization Safety. Optimization Safety CS412/CS413. Introduction to Compilers Tim Teitelbaum Optimizations CS412/CS413 Introduction to Compilers im eitelbaum Lecture 24: s 24 Mar 08 Code transformations to improve program Mainly: improve execution time Also: reduce program size Can be done at

More information

Optimizing Java Programs in the Presence of. Exceptions. Manish Gupta, Jong-Deok Choi, and Michael Hind

Optimizing Java Programs in the Presence of. Exceptions. Manish Gupta, Jong-Deok Choi, and Michael Hind Optimizing Java Programs in the Presence of Exceptions Manish Gupta, Jong-Deok Choi, and Michael Hind IBM Thomas J. Watson Research Center, P.O. Box 704, Yorktown Heights, NY 10598, USA fmgupta,jdchoi,hindmg@us.ibm.com

More information

Relaxed Memory Consistency

Relaxed Memory Consistency Relaxed Memory Consistency Jinkyu Jeong (jinkyu@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu SSE3054: Multicore Systems, Spring 2017, Jinkyu Jeong (jinkyu@skku.edu)

More information

Lecture 13: Memory Consistency. + a Course-So-Far Review. Parallel Computer Architecture and Programming CMU , Spring 2013

Lecture 13: Memory Consistency. + a Course-So-Far Review. Parallel Computer Architecture and Programming CMU , Spring 2013 Lecture 13: Memory Consistency + a Course-So-Far Review Parallel Computer Architecture and Programming Today: what you should know Understand the motivation for relaxed consistency models Understand the

More information

Shared Memory Programming. Parallel Programming Overview

Shared Memory Programming. Parallel Programming Overview Shared Memory Programming Arvind Krishnamurthy Fall 2004 Parallel Programming Overview Basic parallel programming problems: 1. Creating parallelism & managing parallelism Scheduling to guarantee parallelism

More information

Primitive Task-Parallel Constructs The begin statement The sync types Structured Task-Parallel Constructs Atomic Transactions and Memory Consistency

Primitive Task-Parallel Constructs The begin statement The sync types Structured Task-Parallel Constructs Atomic Transactions and Memory Consistency Primitive Task-Parallel Constructs The begin statement The sync types Structured Task-Parallel Constructs Atomic Transactions and Memory Consistency Chapel: Task Parallelism 2 Syntax begin-stmt: begin

More information

Cyber Physical System Verification with SAL

Cyber Physical System Verification with SAL Cyber Physical System Verification with July 22, 2013 Cyber Physical System Verification with Outline 1 2 3 4 5 Cyber Physical System Verification with Table of Contents 1 2 3 4 5 Cyber Physical System

More information

A Graph-search Based Approach to BPEL4WS Test Generation

A Graph-search Based Approach to BPEL4WS Test Generation A Graph-search Based Approach to BPEL4WS Test Generation Yuan Yuan, Zhongjie Li, Wei Sun China Research Lab IBM Beijing, P.R.C. {yyuan, lizhongj, weisun}@cn.ibm.com Abstract Business Process Execution

More information

Programming Paradigms for Concurrency Lecture 3 Concurrent Objects

Programming Paradigms for Concurrency Lecture 3 Concurrent Objects Programming Paradigms for Concurrency Lecture 3 Concurrent Objects Based on companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit Modified by Thomas Wies New York University

More information

A Lift Controller in Lustre. (a case study in developing a reactive system) Leszek Holenderski

A Lift Controller in Lustre. (a case study in developing a reactive system) Leszek Holenderski Presented at 5 th Nordic Workshop on Program Correctness, Turku, Finland, October 25{28, 1993. Published in Proc. of the 5 th Nordic Workshop on Program Correctness, ed. R.J.R. Back and K. Sere, Abo Akademi

More information

CS 351 Design of Large Programs Programming Abstractions

CS 351 Design of Large Programs Programming Abstractions CS 351 Design of Large Programs Programming Abstractions Brooke Chenoweth University of New Mexico Spring 2019 Searching for the Right Abstraction The language we speak relates to the way we think. The

More information

Modelling Downgrading in Information Flow Security. A. Bossi, C. Piazza, and S. Rossi. Dipartimento di Informatica Università Ca Foscari di Venezia

Modelling Downgrading in Information Flow Security. A. Bossi, C. Piazza, and S. Rossi. Dipartimento di Informatica Università Ca Foscari di Venezia Modelling Downgrading in Information Flow Security A. Bossi, C. Piazza, and S. Rossi Dipartimento di Informatica Università Ca Foscari di Venezia bossi, piazza, srossi @dsi.unive.it Joint Meeting MYTHS/MIKADO/DART,

More information