Lawrence Livermore National Laboratory ROSE Slides August 2010 Dan Quinlan Center for Applied Scientific Computing Lawrence Livermore National Laboratory.

Slides:



Advertisements
Similar presentations
Lawrence Livermore National Laboratory ROSE Compiler Project Computational Exascale Workshop December 2010 Dan Quinlan Chunhua Liao, Justin Too, Robb Matzke,
Advertisements

Software & Services Group, Developer Products Division Copyright© 2010, Intel Corporation. All rights reserved. *Other brands and names are the property.
Native x86 Decompilation Using Semantics-Preserving Structural Analysis and Iterative Control-Flow Structuring Edward J. Schwartz *, JongHyup Lee ✝, Maverick.
Control Flow Analysis (Chapter 7) Mooly Sagiv (with Contributions by Hanne Riis Nielson)
C Programming and Assembly Language Janakiraman V – NITK Surathkal 2 nd August 2014.
Automated creation of verification models for C-programs Yury Yusupov Saint-Petersburg State Polytechnic University The Second Spring Young Researchers.
Intermediate Representation I High-Level to Low-Level IR Translation EECS 483 – Lecture 17 University of Michigan Monday, November 6, 2006.
Lecture 01 - Introduction Eran Yahav 1. 2 Who? Eran Yahav Taub 734 Tel: Monday 13:30-14:30
Syntax Trees MathWorks Compiler Course – Day 5. Syntax Trees MathWorks Compiler Course – Day 5 Parser lexemes shift/reduce seq. Cfg tables Tree Symbols.
10/22/2002© 2002 Hal Perkins & UW CSEG-1 CSE 582 – Compilers Intermediate Representations Hal Perkins Autumn 2002.
Representing programs Goals. Representing programs Primary goals –analysis is easy and effective just a few cases to handle directly link related things.
VisIt Software Engineering Infrastructure and Release Process LLNL-PRES Lawrence Livermore National Laboratory, P. O. Box 808, Livermore,
The Structure of the GNAT Compiler. A target-independent Ada95 front-end for GCC Ada components C components SyntaxSemExpandgigiGCC AST Annotated AST.
X86 ISA Compiler Baojian Hua Front End source code abstract syntax tree lexical analyzer parser tokens IR semantic analyzer.
1 Dan Quinlan, Markus Schordan, Qing Yi Center for Applied Scientific Computing Lawrence Livermore National Laboratory Semantic-Driven Parallelization.
In conclusion our tool: can be used with any operator overloading AD package replaces the manual process, which is slow and overestimates the number active.
CS2422 Assembly Language and System Programming High-Level Language Interface Department of Computer Science National Tsing Hua University.
LLNL-PRES This work was performed under the auspices of the U.S. Department of Energy by Lawrence Livermore National Laboratory under Contract DE-AC52-07NA27344.
David Evans CS201j: Engineering Software University of Virginia Computer Science Lecture 18: 0xCAFEBABE (Java Byte Codes)
Automated Tracing and Visualization of Software Security Structure and Properties Symposium on Visualization for Cyber Security 2012 (VizSec’12) Seattle,
AutoHacking with Phoenix Enabled Data Flow Analysis Richard Johnson |
1 CASC ROSE Compiler Infrastructure Source-to-Source Analysis and Optimization Dan Quinlan Rich Vuduc, Qing Yi, Markus Schordan Center for Applied Scientific.
Recovery of Variables and Heap Structure in x86 Executables Gogul Balakrishnan Thomas Reps University of Wisconsin.
LLNL-PRES-XXXXXX This work was performed under the auspices of the U.S. Department of Energy by Lawrence Livermore National Laboratory under Contract DE-AC52-07NA27344.
Computer Architecture and Operating Systems CS 3230 :Assembly Section Lecture 7 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Michelle Mills Strout OpenAnalysis: Representation- Independent Program Analysis CCA Meeting January 17, 2008.
Chapter 1 Introduction Dr. Frank Lee. 1.1 Why Study Compiler? To write more efficient code in a high-level language To provide solid foundation in parsing.
10/1/2015© Hal Perkins & UW CSEG-1 CSE P 501 – Compilers Intermediate Representations Hal Perkins Autumn 2009.
Instrumentation - initial results Sung Kim, Jeff Perkins MIT.
November 13, 2006 Performance Engineering Research Institute 1 Scientific Discovery through Advanced Computation Performance Engineering.
Lecture-1 Compilation process
Assembly Language for Intel-Based Computers, 6 th Edition Chapter 8: Advanced Procedures (c) Pearson Education, All rights reserved. You may.
1 COMP 3438 – Part II-Lecture 1: Overview of Compiler Design Dr. Zili Shao Department of Computing The Hong Kong Polytechnic Univ.
Elements of Computing Systems, Nisan & Schocken, MIT Press, 2005, Chapter 11: Compiler II: Code Generation slide 1www.idc.ac.il/tecs.
1 Optimizing compiler tools and building blocks project Alexander Drozdov, PhD Sergey Novikov, PhD.
Compiler Principles Fall Compiler Principles Lecture 0: Local Optimizations Roman Manevich Ben-Gurion University.
LLNL-PRES-?????? This work was performed under the auspices of the U.S. Department of Energy by Lawrence Livermore National Laboratory under Contract DE-AC52-07NA27344.
1 Chapter 1 Introduction. 2 Outlines 1.1 Overview and History 1.2 What Do Compilers Do? 1.3 The Structure of a Compiler 1.4 The Syntax and Semantics of.
Procedures – Generating the Code Lecture 21 Mon, Apr 4, 2005.
CS216: Program and Data Representation University of Virginia Computer Science Spring 2006 David Evans Lecture 22: Unconventional.
1 Compiler Design (40-414)  Main Text Book: Compilers: Principles, Techniques & Tools, 2 nd ed., Aho, Lam, Sethi, and Ullman, 2007  Evaluation:  Midterm.
Intermediate Code Representations
12/18/2015© Hal Perkins & UW CSEG-1 CSE P 501 – Compilers Intermediate Representations Hal Perkins Winter 2008.
The Model of Compilation Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.
Code Motion for MPI Performance Optimization The most common optimization in MPI applications is to post MPI communication earlier so that the communication.
Buffer Overflow Attack- proofing of Code Binaries Ramya Reguramalingam Gopal Gupta Gopal Gupta Department of Computer Science University of Texas at Dallas.
Compiler Construction CPCS302 Dr. Manal Abdulaziz.
Course 150 Basic Computing Environment. Objective of course Familiar with Linux environment Objective of lecture: To understand basic terms like software,
Improvements to the Compiler Lecture 27 Mon, Apr 26, 2004.
Welcome! Simone Campanoni
ICS51 Introductory Computer Organization Accessing parameters from the stack and calling functions.
Automating Fortran - C Interoperability Prepared by: Sisi Liu (Garnet) Mentor: Dan Nagle Co-Mentor: Davide del Vento 1.
Static and dynamic analysis of binaries
Introduction to programming languages, Algorithms & flowcharts
Chapter 1 Introduction.
Introduction to programming languages, Algorithms & flowcharts
Exploiting & Defense Day 2 Recap
Chapter 1 Introduction.
Simone Campanoni Welcome! Simone Campanoni
High-Level Language Interface
CS 536 / Fall 2017 Introduction to programming languages and compilers
CS416 Compiler Design lec00-outline September 19, 2018
Introduction to programming languages, Algorithms & flowcharts
Discussion Section – 11/3/2012
Introduction CI612 Compiler Design CI612 Compiler Design.
Introduction to Intel x86-64 Assembly, Architecture, Applications, & Alliteration Xeno Kovah – 2014 xkovah at gmail.
Procedures – Overview Lecture 19 Mon, Mar 28, 2005.
Machine-Level Programming: Introduction
CS416 Compiler Design lec00-outline February 23, 2019
C structures and Compilation to IA32
Presentation transcript:

Lawrence Livermore National Laboratory ROSE Slides August 2010 Dan Quinlan Center for Applied Scientific Computing Lawrence Livermore National Laboratory Lawrence Livermore National Laboratory, P. O. Box 808, Livermore, CA Operated by Lawrence Livermore National Security, LLC, or the U.S. Department of Energy, National Nuclear Security Administration under Contract DE-AC52-07NA27344

2 Science & Technology: Computation Directorate ROSE supports custom software analysis tools  Software analysis exposes behavioral properties of large scale software systems  ROSE is an open compiler infrastructure for custom domain-specific analysis Source code: C, C++, Fortran 2003, OpenMP, UPC Binary executables (Windows and Linux) (x86, Power-PC, ARM) Program analysis uses/generates different graphs Graphs for real software have millions of nodes Graphs are for use in automated analysis (not users)  Optimization, Autotuning, Characterization for Exascale int aFunction(int a, int b) { int c=b; return a; } main() { int a,b,c,d,e; int i=4; for (i=0;i<10;i++) { int j=55; c=i+j; c=aFunction(i,c); a=aFunction(a+1,b); } #pragma SliceTarget a; return 0; } Data-dependency System-dependency Sliced-system-dependency Control-dependency Control-Flow Source Code or Binary Executable

3 ROSE source-to-source transformation infrastructure Science & Technology: Computation Directorate Source Code or Binary Executable Transformed Source Code ROSE IR Analyses/ Transformation/ Optimizations System-dependency Sliced-system- dependency Control-Flow Control dependency Control flow Unparser ROSE Frontend ROSE-based tool

4 ROSE IR has many features required for tools  ROSE IR = AST + symbol tables + CFG +...  Full type analysis (critical for C++, Fortran 90/95/2003)  Preserves details in source code Token stream, including whitespace, woven into AST Source comments and source position info. C preprocessor control structure All C++ template and instantiations  Rich AST interface for: traversal, query, creation, copy, symbol lookup Generic analyses, transformations, optimizations  Full support Resolving complex types and overloaded functions Abstraction recognition and semantic analysis Documentation: web site, manuals, tutorial, examples, etc.

5 Source Code  Abstract Syntax Tree (AST) Abstract Syntax Tree ROSE tools operate on the AST Full Type evaluation Template instantiation Custom Analysis Custom Transformation Source Code

6 Science & Technology: Computation Directorate Executable  Binary AST  Assembly  Instructions level IR  Instruction operands as expression trees  Full analysis using ROSE Tools  Transformations  Code Generation Generated Assembly Code :push ebp :mov ebp,esp :sub esp,0x a:mov DWORD PTR [ebp-12],0x :fld DWORD PTR [0x ] :fstp QWORD PTR [ebp-8] a:mov eax,DWORD PTR [ebp-12] d:push eax e:fild DWORD PTR [esp] :lea esp,[esp+4] :fld QWORD PTR [ebp-8] :faddp, a:fstp QWORD PTR [ebp-8] d:leave e:ret f:push ebp :mov ebp,esp :call :pop ebp :ret :lea ecx,[esp+4] d:and esp,0xfffffff :push DWORD PTR [ecx-4] :push ebp :mov ebp,esp :push ecx :sub esp,0x a:call f f:call :mov eax,0x :add esp,0x c:pop ecx d:pop ebp e:lea esp,[ecx-4] :ret typedef struct mystruct { int x; } mystruct_t; void f2() { mystruct_t my; my.x=2; double y=3; y = my.x + y; } void f1() { f2(); } int main() { f1(); f2(); return 0; }

7 Science & Technology: Computation Directorate ROSE provides multiple graphs of software to support different forms of software analysis Graph Type AST Control Flow System Dependence Used to detect Software Characterization and Localized Structural Flaws Optimization and Buffer Overflow Vulnerability Mixing trusted data with untrusted user input

8 ROSE AST – An Internal Representation for Source and Binaries and a common set of tools for analysis and transformation

9 Science & Technology: Computation Directorate We have developed numerous collaborations through the ROSE compiler toolset DOE Laboratories: LLNL (A Div, B Div, Cyber-Security) ANL, LANL, LBL, ORNL, PNNL DOE Research Programs: PERI (SLAC, Fortran/C/C++ Optimization, UT, ANL, ISI, LBL) Collaborations: DOD (Air Force) NIST(SAMATE) CERT (CMU) GrammaTech IBM (Program Verification Group) Absint (developers of PAG) London Imperial College Texas A&M Rice University Vienna University of Technology University of Tennessee Cornell University Indiana University University of California at Berkeley University of Bergen University of Maryland Friedrich-Alexander-University Erlangen-Nuremberg University of Texas at Austin UCSD UC Davis ROSE used for graduate courses at seven different universities (compiler construction to cyber security) ROSE being used to build products at five different companies (BSD license) ROSE released at Top Download on SciDAC web site… ROSE is winner of 2009 R&D100 award