08 Constraint-based Analysis

08 Constraint-based Analysis - Course Outline Introduction...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Course Outline Introduction Control-flow analysis Dataflow analysis and abstract interpretation Sparse analysis Adding indirection (pointers) Adding functions Type- and constraint-based analysis Ben Hardekopf () CS 290C Program Analysis Fall 2011 1 / 37 Section Outline Type- and Constraint-Based Analysis Constraint-based Analysis I Andersen-style Flow-Insensitive Pointer Analysis Type-based Analysis Relation to Datafow Analysis Ben Hardekopf () CS 290C Program Analysis Fall 2011 2 / 37 Constraint-Based Analysis The foundation of a constraint-based analysis is a constraint language that defines what kind of constraints we can specify. The decidability, complexity, and precision of a constraint-based analysis depend largely on what language we choose. Ben Hardekopf () CS 290C Program Analysis Fall 2011 3 / 37 Constraint-Based Analysis The foundation of a constraint-based analysis is a constraint language that defines what kind of constraints we can specify. The decidability, complexity, and precision of a constraint-based analysis depend largely on what language we choose. We will look specifically at set constraints : Definition (Set Constraint Language) x V ariable c Constructor = empty set 1 = universal set E Expr ::= x | | 1 | E | E 1 E 2 | E 1 E 2 | c ( E 1 ,..., E a ( c ) ) S Stmt ::= E 1 E 2 | S 1 S 2 Ben Hardekopf () CS 290C Program Analysis Fall 2011 3 / 37 Example Example (Set Constraint Statement) { c 1 } x { c 1 , c 2 , c 3 } y x x y { c 2 } z ( x y ) c 1 , c 2 , c 3 are nullary constructorsconstructors that dont take any arguments. Nullary constructors act as constants and are usually written without (). Ben Hardekopf () CS 290C Program Analysis Fall 2011 4 / 37 What is a Constructor? Constructors are uninterpreted functionsthe analysis doesnt care what they mean, its up to us to give them a useful interpretation. A good example of constructors are type constructors : I Nullary constructors: Int , String , . . . I Unary constructors: Int , . . . I Binary constructors: Int String , . . . Ben Hardekopf () CS 290C Program Analysis Fall 2011 5 / 37 What is a Constructor? Constructors are uninterpreted functionsthe analysis doesnt care what they mean, its up to us to give them a useful interpretation. A good example of constructors are type constructors : I Nullary constructors: Int , String , . . . I Unary constructors: Int , . . . I Binary constructors: Int String , . . . Characteristics of constructors: Every constructor has an arity : the number of arguments it takes Every parameter position of a constructor is either covariant or contravariant I Covariant if the constructor is monotone w.r.t. that position I Contravariant if it is anti-monotone w.r.t. that position....
View Full Document

This note was uploaded on 12/27/2011 for the course CMPSC 290a taught by Professor Vandam during the Fall '09 term at UCSB.

Page1 / 66

08 Constraint-based Analysis - Course Outline Introduction...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online