Optimization of application in virtual laboratory Optimization of application in virtual laboratory constructing workflows based on application sources.

Slides:



Advertisements
Similar presentations
Chapter 14 Software Testing Techniques - Testing fundamentals - White-box testing - Black-box testing - Object-oriented testing methods (Source: Pressman,
Advertisements

Static Single-Assignment ? ? Introduction: Over last few years [1991] SSA has been Stablished as… Intermediate program representation.
Data-Flow Analysis II CS 671 March 13, CS 671 – Spring Data-Flow Analysis Gather conservative, approximate information about what a program.
Using the Iteration Space Visualizer in Loop Parallelization Yijun YU
Architecture-dependent optimizations Functional units, delay slots and dependency analysis.
Vered Gafni – Formal Development of Real Time Systems 1 Statecharts Semantics.
Loop invariant code removal CS 480. Our sample calculation for i := 1 to n for j := 1 to m c [i, j] := 0 for k := 1 to p c[i, j] := c[i, j] + a[i, k]
SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
Software Design Process A Process is a set of related and (sequenced) tasks that transforms a set of input to a set of output. Inputs Outputs Design Process.
AUTOMATIC GENERATION OF CODE OPTIMIZERS FROM FORMAL SPECIFICATIONS Vineeth Kumar Paleri Regional Engineering College, calicut Kerala, India. (Currently,
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 4 – Introducing Algorithms, Pseudocode and.
Code Generation Mooly Sagiv html:// Chapter 4.
Cpeg421-08S/final-review1 Course Review Tom St. John.
Improving code generation. Better code generation requires greater context Over expressions: optimal ordering of subtrees Over basic blocks: Common subexpression.
1 Intermediate representation Goals: –encode knowledge about the program –facilitate analysis –facilitate retargeting –facilitate optimization scanning.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 5 - Functions Outline 5.1Introduction 5.2Program.
Business Process Orchestration
Code Generation for Basic Blocks Introduction Mooly Sagiv html:// Chapter
Tentative Schedule 20/12 Interpreter+ Code Generation 27/12 Code Generation for Control Flow 3/1 Activation Records 10/1 Program Analysis 17/1 Register.
Data Flow Analysis Compiler Design October 5, 2004 These slides live on the Web. I obtained them from Jeff Foster and he said that he obtained.
Improving Code Generation Honors Compilers April 16 th 2002.
Introduction to Code Generation Mooly Sagiv html:// Chapter 4.
SMIILE Finaly COBOL! and what else is new Gordana Rakić, Zoran Budimac.
Compiler Construction A Compulsory Module for Students in Computer Science Department Faculty of IT / Al – Al Bayt University Second Semester 2008/2009.
Describing Syntax and Semantics
A452 – Programming project – Mark Scheme
Chapter 2: Algorithm Discovery and Design
Software Design Processes and Management
Maria-Cristina Marinescu Martin Rinard Laboratory for Computer Science Massachusetts Institute of Technology A Synthesis Algorithm for Modular Design of.
Interaction Modeling. Sequence Models  There are two kinds of sequence models: scenarios and sequence diagrams  A scenario is a sequence of events that.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. C How To Program - 4th edition Deitels Class 05 University.
Foundations of Software Testing Chapter 5: Test Selection, Minimization, and Prioritization for Regression Testing Last update: September 3, 2007 These.
Computer Science and Engineering Parallel and Distributed Processing CSE 8380 March 01, 2005 Session 14.
Pwrake: An extensible parallel and distributed flexible workflow management tool Masahiro Tanaka and Osamu Tatebe University of Tsukuba PRAGMA March.
Supported by ELTE IKKK, Ericsson Hungary, in cooperation with University of Kent Erlang refactoring with relational database Anikó Víg and Tamás Nagy Supervisors:
Interaction Models (2): Sequence Diagrams Extracted from textbook: Object Oriented Modeling and Design with UML M. Blaha, J. Rumbaugh 1.
Copyright © 2010 Certification Partners, LLC -- All Rights Reserved Perl Specialist.
Unit-1 Introduction Prepared by: Prof. Harish I Rathod
Supported by ELTE IKKK, Ericsson Hungary, in cooperation with University of Kent Erlang refactoring with relational database Anikó Víg and Tamás Nagy Supervisors:
White-box Testing.
95-843: Service Oriented Architecture 1 Master of Information System Management Service Oriented Architecture Lecture 7: BPEL Some notes selected from.
Chapter 3 Functions, Events, and Control Structures JavaScript, Third Edition.
Detecting Equality of Variables in Programs Bowen Alpern, Mark N. Wegman, F. Kenneth Zadeck Presented by: Abdulrahman Mahmoud.
JavaScript, Fourth Edition
Gordana Rakić, Zoran Budimac
Copyright © 2003 ProsoftTraining. All rights reserved. Perl Fundamentals.
David Adams ATLAS DIAL: Distributed Interactive Analysis of Large datasets David Adams BNL August 5, 2002 BNL OMEGA talk.
1 Control Flow Analysis Topic today Representation and Analysis Paper (Sections 1, 2) For next class: Read Representation and Analysis Paper (Section 3)
SOFTWARE TESTING. Introduction Software Testing is the process of executing a program or system with the intent of finding errors. It involves any activity.
Introduction to OOP CPS235: Introduction.
CS412/413 Introduction to Compilers Radu Rugina Lecture 18: Control Flow Graphs 29 Feb 02.
1 Control Flow Graphs. 2 Optimizations Code transformations to improve program –Mainly: improve execution time –Also: reduce program size Can be done.
Control Flow Analysis Compiler Baojian Hua
Introduction to Functions CSIS 1595: Fundamentals of Programming and Problem Solving 1.
Methods Chapter 6. 2 Program Modules in Java What we call "functions" in C++ are called "___________________" in Java Purpose –Reuse code –Modularize.
High Performance Embedded Computing © 2007 Elsevier Lecture 10: Code Generation Embedded Computing Systems Michael Schulte Based on slides and textbook.
/ PSWLAB Evidence-Based Analysis and Inferring Preconditions for Bug Detection By D. Brand, M. Buss, V. C. Sreedhar published in ICSM 2007.
CMSC 202 Computer Science II for Majors. CMSC 202UMBC Topics Exceptions Exception handling.
Syntax Analysis Or Parsing. A.K.A. Syntax Analysis –Recognize sentences in a language. –Discover the structure of a document/program. –Construct (implicitly.
1 Seminar on SOA Seminar on Service Oriented Architecture BPEL Some notes selected from “Business Process Execution Language for Web Services” by Matjaz.
Network planning models These project scheduling techniques model the project's activities and their relationships as a network. In the network, time flows.
Credible Compilation With Pointers Martin Rinard and Darko Marinov Laboratory for Computer Science Massachusetts Institute of Technology.
Efficient Evaluation of XQuery over Streaming Data
Fundamentals of PL/SQL part 2 (Basics)
Software Engineering (CSI 321)
Fourier Transform: Real-World Images
Control Flow Analysis (Chapter 7)
Data Flow Analysis Compiler Design
Top-Down Design & JSP Skill Area Part D
Fast-Track UiPath Developer Module 3: Workflow Organization
Presentation transcript:

Optimization of application in virtual laboratory Optimization of application in virtual laboratory constructing workflows based on application sources and providing data for workflow scheduling algorithms Mikołaj Baranowski Supervisor: Marian Bubak, PhD Advice: Maciej Malawski, PhD AGH University of Science and Technology1

GridSpace environment GridSpace platform provides environment for planning and executing distributed applications Applications can be developed in a Ruby programming language Complex services are available as Grid Objects and their methods – synchronous and asynchronous Existing solutions do not provide any optimization based on Ruby source code structure and control flow AGH University of Science and Technology2

Research objectives Find dependencies between grid object operations invoked from Ruby scripts Build workflow basing on application source code Validate approach by building workflows for control- flow patterns and well known applications (Montage, CyberShake, Epigenomics) Provide data needed to enable optimizations based on Ruby source code structure Provide models for scheduling algorithms AGH University of Science and Technology3

Workflow model Tasks are represented as graph nodes – ellipses (in Ruby source code, they are operations on grid objects) Control preconditions are represented as graph nodes – circles for loops, triangles for if statements (in Ruby: if, loop, for, while statements) Data transfers are represented as edges with labels (operation dependencies are extracted from source code) AGH University of Science and Technology4

S-expressions All information has to be extracted from source code Ruby source is parsed and transformed into s-expressions – list based structures which contain all information from source code AGH University of Science and Technology5 a = Gobj.create b = a.async_do_sth c = b.get_result s(:block, s(:lasgn, :a, s(:call, s(: const, :GObj), :create, s(:arglist))), s(:lasgn, :b, s(:call, s(:lvar, :a), :async_do_sth, s(:arglist))), s(:lasgn, :c, s(:call, s(:lvar, :b), :get_result, s(:arglist))))

Analyzing internal representation Internal representation is created from s-expressions It is traversed to find patterns of assignments, operations, loops, if statements etc. Locate grid objects (they are results of a special kind of operations: Gobj.create() ) Determine grid objects scopes Locate grid operations (as operations on grid objects) Locate grid operations handlers Find direct dependencies (analyzing operations arguments and results) Resolve transitive dependencies Locate pairs – asynchronous operation – dependent result request on operation handler AGH University of Science and Technology6

Issues Reassignment a = "foo" a = 0 b = a + 2 There are two values and one label, dependencies should be between values, solution – change labels keeping variable scopes a = "foo" a_1 = 0 b = a_1 + 2 Block statement Dependencies between blocks (variable scopes), plus: If statements – read conditions, each branch works on different variables if a == 2 b = 1 end Loop – looped dependencies a = 1 for i in a = a * i end puts a AGH University of Science and Technology7 Typical issues met during analyzing process

Building workflow for sequence pattern a = Gobj.create b = a.async_do_sth(””) c = b.get_result d = a.async_do_sth(c) e = d.get_result AGH University of Science and Technology8 final result, workflow dependencies between assignments dependencies between operations (hexagon – grid object, circle – grid operation, square – result request) Building workflow from Ruby script Two intermediate graphs are presented Workflow presents sequence workflow pattern

Parallel split pattern a = GObj.create b = a.async_do_sth c = b.get_result d = b.get_result e = a.async_do_sth(c) f = a.async_do_sth(d) AGH University of Science and Technology9 Parallel split workflow pattern is presented Intermediate graphs show analyzing steps

Expanding iterations – loop statement a = GObj.create b = a.async_do_sth c = b.get_result d = a.async_do_sth(c) 5.times do e = d.get_result f = a.async_do_sth(e) g = f.get_result d = a.async_do_sth(g) end i = d.get_result j = a.async_do_sth(i) k = j.get_result AGH University of Science and Technology10 In workflow, loop is presented as a circle with label loop Dashed arrow stands for looped dependencies First iteration uses variable d= a.async_do_sth(c), following iterations work with variable d=a.async_do_sth(g) produced by previous one Reassignment issue also occurs Dotted arrow stands for exit from loop statement

AGH University of Science and Technology11 As it was mentioned in previous slide, operations in loop body depend from values calculated during last iteration Unrolled loop simulates many iterations by creating sequence of operations Additional nodes have modified name ( _loop* ) Dashed arrow stands for looped dependencies Dotted arrow stands for loop end Long arrow from node d=a.async_do_sth(c) to node j=a.async_do_sth(i) indicates that loop condition were not fulfilled

If statement AGH University of Science and Technology12 a = GObj.create b1 = a.async_do_sth c1 = b1.get_result b2 = a.async_do_sth c2 = b2.get_result d = 0 if 0 == 2 d = a. async_do_sth(c1) elsif 1 == 2 d = a. async_do_sth_else(c1) else d = a. async_do_sth_else2(c2) end e = d. get_result f = a. async_do_sth(e) g = f. get_result Triangle stands for if statement Exit from if statement is represented by dotted arrows Arrows that come out from if node are alternative branches Variable d which appears in every branch stands for different value – reassignment issue – label is changed to d_1, d_2 and d_3 for each branch

Montage application AGH University of Science and Technology13 Montage application (An Astronomical Image Mosaic Engine) produces sky mosaics from many images bade on different angles, proportions, magnifications Graph presents original workflow created for montage application Montage application is built from separated ANSI C modules – its processes are represented as nodes

AGH University of Science and Technology14 Hypothetical GridSpace application which manages montage application modules execution and coordinates its data flow was prepared Graph presents workflow generated for this application parallelFor node stands for loop which iterations are executed in parallel

Future work Improve resolving dependencies for more complex Ruby scripts Introduce Ruby language limitations to improve analyzing process (immutable variables, deny passing blocks, remove yield statement) Ruby language has to complex syntax – basing on the experience with analyzing Ruby scripts, define requirements for workflow oriented language AGH University of Science and Technology15

Conclusions Resolving dependencies – dependencies were resolved for many complex scripts – further progress might be possible only if special conventions or language modifications ware introduced Building workflows – correctness of workflows fully depends on resolving dependencies Workflows for Montage, CyberShake and Epigenomics applications ware created Workflow model for scheduling algorithms ware developed AGH University of Science and Technology16