Program Analyzer Issues - Advanced Compiler - Lecture Slides , Slides of Computer Science

These are the Lecture Slides of Advanced Compiler which includes Partial Transfer Functions, Input Information, Output Information, Data-Based Context Sensitivity, Bottom-Up Example, Infinite Domains, Interprocedural Analysis etc. Key important points are: Program Analyzer Issues, Program Analysis, Program Transformations, Input Issues, Analysis Issues, Compilation Model, Interprocedural Analysis, Selective Run-Time Compilation, Benefit Tradeoffs

Typology: Slides

2012/2013

Uploaded on 03/19/2013

dharmaa
dharmaa 🇮🇳

4.4

(19)

149 documents

1 / 33

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Recap from last time
We saw various different issues related to
program analysis and program
transformations
You were not expected to know all of these
things
We will learn more about each one of the
topics we touched upon last time
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21

Partial preview of the text

Download Program Analyzer Issues - Advanced Compiler - Lecture Slides and more Slides Computer Science in PDF only on Docsity!

Recap from last time

• We saw various different issues related to

program analysis and program

transformations

• You were not expected to know all of these

things

• We will learn more about each one of the

topics we touched upon last time

Program Analyzer Issues (discuss)

Program

Input Analyzer Output

Input issues

• How much of the program do we see?

– all?

– one file at a time?

– one library at a time?

– reflection…

• Any additional inputs?

– any human help?

– profile info?

Instructor’s discussion notes Input ProgramAnalyzer Output

Analysis issues

  • Analysis/compilation model
    • Separate compilation/analysis • quick, but no opportunities for interprocedural analysis
    • Link-time • allows interprocedural and whole program analysis
      • • but what about shared precompiled libraries?and what about compile-time?
    • Run-time • best optimization/analysis potential (can even use run-time state as
      • additional information)can handle run-time extensions to the program
    • Selective run-time compilation^ •^ but severe pressure to limit compilation time
      • • choose what part of compilation to delay until run-timecan balance compile-time/benefit tradeoffs

Instructor’s discussion notes Input ProgramAnalyzer Output

Output issues

• Form of output varies widely, depending on

analysis

  • alias information
  • constantness information
  • loop terminates/does not terminate

• Correctness of analysis results

  • depends on what the results are used for
  • are we attempting to design algorithsm for solving

undecidable problems?

  • notion of approximation
  • statistical output

Instructor’s discussion notes Input ProgramAnalyzer Output

Program Transformation Issues (discuss)

Program Input (^) Transformer Output

Transformation issues

• What is profitable?

• What order to perform transformations?

• What happens to the program

representation?

• What happens to the computed information?

For example alias information? Need to

recompute?

Instructor’s discussion notes Input (^) Transformer^ Program Output

Output issues

• Output in same IL as input?

• Should the output program behave the same

way as the input program?

Instructor’s discussion notes Input (^) Transformer^ Program Output

Ideas for generating project ideas

• If you are currently doing research

– that is related to programming

languages/compilers

– carve out some part of your current research, and

do it for the project

• Think about what annoys you the most

– in programming

– and fix it using program analysis techniques

Ideas for generating project ideas

• Think about technology trends

  • iphone, mobile devices
  • multicore, parallelism
  • web browsers, java scripts, etc.
  • bluetooth, ad-hoc networks
  • how do these change the way we program/compile?

• Try to find bugs in real programs using PL

techniques

  • search for “Dawson Engler” and look at some of his

papers. Try to use similar techniques to find real bugs.

Tour of common optimizations

Simple example

foo(z) { x := 3 + 6; y := x – 5 return z * y }

Another example

x := a + b; ... y := a + b;

Another example

x := a + b; ... y := a + b;