4 Pages

absin-2x2

Course: COMP 3610, Fall 2009
School: Allan Hancock College
Rating:
 
 
 
 
 

Word Count: 883

Document Preview

Analysis We Static often want to automatically discover certain properties of a program. A particular application is for optimising transformations in a compiler. Since the aim is to analyse the program without running it (i.e. statically) we call the process static analysis. Abstract Interpretation For Static Analysis Abstract Interpretation Abstract interpretation is a semantics-based technique that can be...

Register Now

Unformatted Document Excerpt

Coursehero >> California >> Allan Hancock College >> COMP 3610

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
Analysis We Static often want to automatically discover certain properties of a program. A particular application is for optimising transformations in a compiler. Since the aim is to analyse the program without running it (i.e. statically) we call the process static analysis. Abstract Interpretation For Static Analysis Abstract Interpretation Abstract interpretation is a semantics-based technique that can be used to derive useful information about a program. It is one of the most common frameworks for static analysis. Comp3610 Principles of Programming Languages Australian National University Semester 2, 2007 Clem Baker-Finch This lecture is about the general concept of abstract interpretation. The next lecture is about a particular application of abstract interpretation to perform strictness analysis of lazy functional programs. COMP 3610 Abstract interpreters 1 COMP 3610 Abstract interpreters 2 Puzzle: What is the sign of x? x = 1432 (33) (87) Is x even? We dont need to calculate the value of x to know that it is positive and even. This is the essence of abstract interpretation rather than the values themselves, we work with abstract values: 1432 (33) (87) becomes: pos neg neg Another puzzle: What is the sign of these expressions? a = 122 + 57 b = 1028 + (1234) c = 1432 + (33) 44 We cant always tell the sign without extra information, or actually doing the calculation: The rules of signs are partial. The idea of abstract interpretation is to only work with the abstract values. In this case, the only information we have is the sign of subexpressions. Therefore, abstract interpreters are often partial. They may only give an approximation to the true abstract value. The operator is dened on the domain of abstract values, e.g.: pos neg = neg neg neg = pos etc . . . COMP 3610 Abstract interpreters 3 COMP 3610 Abstract interpreters 4 Standard interpreter for arithmetic expressions: (Begin example Sign2.lhs) data Exp = Num Int | Mul Exp Exp | Add Exp Exp interpret :: interpret (Num n) = interpret (Mul e1 e2) = interpret (Add e1 e2) = Exp -> Int n interpret e1 * interpret e2 interpret e1 + interpret e2 Abstract domain of signs: data Sign = Pos | Neg | Zero | DontKnow deriving Show signInt signInt | n | n | n :: Int -> Sign n > 0 = Pos < 0 = Neg == 0 = Zero COMP 3610 Abstract interpreters 5 COMP 3610 Abstract interpreters 6 Abstract interpreter: (for inferring signs of arithmetic expressions) The abstract operators: (*#) :: Sign -> Sign -> Sign Neg Neg Neg Neg *# *# *# *# DontKnow Zero Pos Neg = = = = DontKnow Zero Neg Pos signInterp :: signInterp (Num n) = signInterp (Mul e1 e2) = signInterp (Add e1 e2) = Exp -> Sign signInt n signInterp e1 *# signInterp e2 signInterp e1 +# signInterp e2 Pos *# sign Note that it is identical to the standard interpreter, except that the standard operators + and have been replaced by abstract operators, + and + . and operate on the standard domain of integers. + and operate on the abstract domain of signs. Zero *# _ = sign = Zero DontKnow *# Zero = Zero DontKNow *# _ = DontKnow COMP 3610 Abstract interpreters 7 COMP 3610 Abstract interpreters 8 (+#) :: Sign -> Sign -> Sign Pos +# DontKnow Pos +# Neg Pos +# _ Neg +# DontKnow Neg +# Pos Neg +# _ = DontKnow = DontKnow = Pos = DontKnow = DontKnow = Neg Abstract Interpretation It is common to represent the abstraction (e.g. from integers to signs) as a commuting triangle: f S D f# abs Zero +# DontKnow = DontKnow Zero +# sign = sign DontKnow +# _ = DontKnow D# S is the source domain (Exp) D is the standard result domain (Z) D is the abstract result domain (Sign) (End example Sign2.lhs) COMP 3610 Abstract interpreters 9 COMP 3610 Abstract interpreters 10 Safety An abstract interpreter must never give a wrong answer. Since the abstraction is often partial, this is the point of the dont know answer. An abstract interpreter must be safe: It must never infer a property that a program does not have. This looks obvious for the signs example, but in general, proving that an abstract interpreter is safe is a non-trivial requirement. On the other hand, an abstract interpreter that always replies dont know is certainly safe, but it is of no use. The aim is to get as much information as possible without making the analysis unsafe, or too expensive (complex). Applications of abstract interpretation Abstract interpretation has many applications in the implementation of programming languages. Here are some from the functional world: Type-checking: Determine the type of an expression without evaluating it; Strictness analysis: If we can statically determine that a function w...

Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

East Los Angeles College - ARTICLE - 230
REBOL [Title: &quot;LinuxFocus index&quot;File: %lfissue.rDate: 10-January-2002Purpose: {Shows how to create a simple page with buttons and links.}Category: [view VID 2]]view layout [size 800x700backtile %blback.jpg effect [reflect 1x0 fi
Allan Hancock College - COMP - 3610
Haskell Data StructuresComp3610 Principles of Programming Languages Australian National University Semester 1 , 2005 Clem Baker-FinchCOMP 3610 Haskell Data Structures1Lists A list is an ordered sequence of items, all of the same type. Lis
Allan Hancock College - COMP - 3610
Patterns of recursion map and filter capture two common patterns of recursion over lists: map applies a function to each element of a list filter uses a predicate to select elements from a listFolding Operators Both map and filter treat the el
Allan Hancock College - COMP - 3610
Evaluation order One of the advantages of functional languages is referential transparency the result of a function application depends only on the values of the argumentsInput-Output in Haskell The arguments to a function can be evaluated in a
Allan Hancock College - COMP - 3610
Fix.lhsThis is a little script to support my comp3610 &quot;Principles of Programming Languages&quot; notes on fixpoints. Clem Baker-Finch 2001 Updated 2002, 2003, 2004, 2005module Fix whereFirst, the basic definition of the factorial function:fac : Int
Allan Hancock College - COMP - 3610
Abstract InterpretationFor Static AnalysisComp3610 - Principles of Programming Languages Australian National University Semester 2, 2007 Clem Baker-FinchCOMP 3610 - Abstract interpreters1Static AnalysisWe often want to automatically discove
ECCD - STAT - 3502
STAT 3502 Solutions to Sample Midterm Test 1. For k = 1, 5, denote by Sk the event &quot;component k works properly up to time t&quot;. The probability that the system will function up to time t is then P (S1 S2 S3 ) (S1 S4 S5 ) P (S1 S2 S3 ) + P (S1
Allan Hancock College - COMP - 3610
FixNewton.lhsThis is a little script to support my comp3610 Principles of Programming Languages notes on xpoints. It demonstrates nding xpoints over simple non-function domains. In particular, we cast the calculation of square roots using Newtons al
Allan Hancock College - COMP - 3610
F UN: a simple functional language Reference manual Clem Baker-Finch April 19, 20041Scripts A F UN program consists of a sequence of function definitions. Definitions may refer to preceding definitions. Each function may be recursive but mutua
ECCD - MATH - 1001
BIT 1001*ATest 1 ANSWERS ANS SOLUTIONSPage11. [14 Marks] Circle T for TRUE and F for FALSE. 2 marks are given for a correct answer, 0 for an incorrect one. 3 x1 3x2 + 7x3 = 77 is linear in the variables x1 , x2 and x3 .TF (a) The equat
East Los Angeles College - FARADAY - 113
The stereodynamics of four atom reactions M. Brouard, S.D Gatenby, D.T. Hart, D.M. Joseph and D.Minayev The Physical and Theoretical Chemistry Laboratory, Department of Chemistry, South Parks Road, Oxford, OX1 3QZ} The stereodynamics of several four
Allan Hancock College - COMP - 3610
Folding OperatorsComp3610 - Principles of Programming Languages Australian National University Semester 1 , 2005 Clem Baker-FinchCOMP 3610 - Fold1Patterns of recursion map and filter capture two common patterns of recursion over lists: map
Allan Hancock College - COMP - 1100
Department of Computer Science, Australian National University COMP1100 - Introduction to Programming and Algorithms Semester 2, 2006Week 6 Practical Class Exercises Supermarket Docket ExampleObjectivesThis week's practical exercises are based on
Allan Hancock College - COMP - 3300
IntroductionSynchronisationProcess synchronisation helps maintain data consistency when cooperating processes share data. Synchronisation is important for both user applications and the operating system's implementation. Eric C. McCreath Department
East Los Angeles College - FD - 130
Faraday DivisionProgramme and registration information Call for PostersFaraday Discussion 130ATMOSPHERIC CHEMISTRYUniversity of Leeds, UK 11 13 April 2005 Gas phase spectroscopy, chemical kinetics and photochemistry Atmospheric processes a
Allan Hancock College - COMP - 2400
SQL&gt; - cae August 2006SQL&gt; SQL&gt; set pagesize 250SQL&gt; SQL&gt; column &quot;StarsIn Value&quot; format A13SQL&gt; SQL&gt; - count all rows in ActsIn tableSQL&gt; SQL&gt; select count(*) 2 from actsin; COUNT(*)- 93SQL&gt; SQL&gt; - group rows by value of Sta
Allan Hancock College - COMP - 6300
COMP2300 2007 MSE Q2(a)(ii) givenint strlen(const char *s);/ returns the length of the string s,/ not including the terminating '\0' characterchar *strcat(char *dest , const char *src);/ appends the src string to the dest string , overwritin
Allan Hancock College - COMP - 6300
Welcome to COMP2300 Introduction to Computer SystemsCourse Scheduleq lectures: three one hour lectures per week, five modules: s s s s s sDigital building blocks (4) C language (4) PeANUt or &quot;Assembly Level Machine Organisation&quot; (9) Memory Syste
Allan Hancock College - COMP - 6300
Procedures and Functions in PeANUtq number systems (bases) in .mli files q procedure / function calls q nested procedures q the stack: s stack pointer register s stack addressing mode s the stack frame q ref: [PeANUt Spec, ]; additional reading: [O'
Allan Hancock College - COMP - 6300
/* example of pseudo assembler code written in C for routines used to perform * fast mastrix multiplicaction on SPARC processors. When compiled with * gcc -O (at the time), the statements: * A0 = *(A); * T21 = A2*B1; *
Allan Hancock College - COMP - 6300
#include &lt;stdio.h&gt;int main(void) { int a, b; scanf(&quot;%d %d&quot;, &amp;a, &amp;b); printf(&quot;sum=%d\n&quot;, a+b); return 0;}
Allan Hancock College - COMP - 6300
#include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; /*for alloc(), free()*/int main(void) { int i, n, *A, si; scanf(&quot;%d&quot;, &amp;n); A = (int *) malloc(n * sizeof(int); / allocates n elements for (i=0; i&lt;n; i+) A[i] = i
Allan Hancock College - MATH - 3346
Math3346, October 3, 2006. Assignment 4, due October 20, 2006.This assigment is based on Laboratory Exercises 9. Please forward an attached pdf le that has your assignment.1Dierent measures of accuracyExplain the dierence between training set
Allan Hancock College - MATH - 3346
Personal Copy for Private UseChapter 5 RattleRattle (the R Analytical Tool To Learn Easily) is a graphical data mining application based on the statistical language R. (The R language is described in more detail in the following chapter, but an un
Allan Hancock College - MATH - 3346
Lab 1 Basic Data Analysis in R27 July 2005If you have any questions regarding R, you are welcome to email them to me at Kevin.Wang@maths.anu.edu.au. 1. Data Import: (a) Other than entering data manually into R, name some other ways of importing d
Allan Hancock College - MATH - 3346
Association RulesIntroductionRule DiscoveryExampleAssociation RulesIntroductionRule DiscoveryExampleOverview Data Mining AlgorithmsAssociation AnalysisGraham WilliamsPrincipal Data Miner, ATO Adjunct Associate Professor, ANUAssoc
Allan Hancock College - MATH - 3346
Boosting Example FinaleBoosting Example Finale1MATH3346 Data Mining BoostingGraham.Williams@togaware.com2Boosting Basics AlgorithmExampleAugust 20053Finalec 2005 Graham.Williams@togaware.com Boosting Example FinaleMATH3346 Data
Allan Hancock College - ENGG - 7302
engg7302 engg7302Advanced Computational Techniques in EngineeringLecture SP03: Multiple Random VariablesThis lecture: 1. Two Random Variables. 2. Multiple Random Variables. 3. Sequences of Random Variables. Ref: STAT2202 course notes, PP ch. 67.
Allan Hancock College - INFS - 3204
M9 Topics INFS 3204/7204 Service-Oriented ArchitectureDr Heng Tao SHENITEE, UQ Semester 2, 2008.M9: Semantic Web ServiceSemantic Web Service: The visionSemantic WebRDF OntologySemantic WSINFS3204/7204 - M91INFS3204/7204 - M92The vi
Allan Hancock College - ENGG - 4801
School of Information Technology &amp; Electrical EngineeringErgo Theorem Prover Support for B Sarah Taraporewalla Supervisor : Peter Robinson SpecificationsAIMS OF THE THESIS To validate current Ergo rules that support B specifications. To define fur
Allan Hancock College - C - 3102
Homework #1: In addition to solving the two requird integrals, I will expand this to show how you can use Maple to mathematically &quot;probe&quot;. First let me plot the integrand:2] Z Z ] [ x2$ exp [ K3$ x ^ , x = 0 .5 ^ plot \ \ _ _ 20.250.20.150.1
Allan Hancock College - C - 3102
Chemistry C3102-2006: Polymers Section Practise problems &amp; SOLUTIONS Instructors notes: I anticipate that I solve these problems dierently than others. Reading over these questions, attempting/providing a solution is a valuable learning exercise. Not
Allan Hancock College - C - 3102
Chemistry C3102-2006: Polymers Section Dr. Edie Sevick, Research School of Chemistry, ANU 3.0 The size of chains in good and poor solvent conditions Obviously, the ideal chain is a simple, rst approximate model of an isolated polymer chain. It assume
Allan Hancock College - C - 3102
Chemistry C3102-2006: Polymers Section HOMEWORK #5 Due Tuesday, June 6 1. A polymer brush in good solvent forms a layer of thickness L that scales with number of monomers, N and grafting density as L aN 1/3 . How does the polymer thickness scale in
Allan Hancock College - C - 3102
Chemistry C3102-2006: Polymers Section HOMEWORK #3 The aim of this homework is to use demonstrate how one would stretch or pull a chain isothermally or adiabatically. Due Friday, May 12 1. Using the adiabatic expansion of an ideal gas as an analogy,
Allan Hancock College - C - 3102
Chemistry C3102-2006: Polymers Section Dr. Edie Sevick, Research School of Chemistry, ANU 4.0 Polymers at interfaces In this section, we begin to investigate the conformation at interfaces, including multiplechains at interfaces. A polymer brush is a
Allan Hancock College - C - 3102
Chemistry C3102-2006: Polymers Section HOMEWORK #1 The aim of this short homework is to familiarise the student with Maple or Mathematica, as these programs will be used in other homeworks. Many may find they already know one of these programs, while
Allan Hancock College - C - 3102
Chemistry C3102-2006: Polymers Section Dr. Edie Sevick, Research School of Chemistry, ANU 2.0 Thermodynamics of an Ideal Chain: Stretching and Squashing In this section, we begin to investigate the thermodynamics of polymers, starting rst, with an is
Allan Hancock College - MATH - 3062
Dynamical Systems and Chaos - page 81Lecture 18 - Capacity Dimension Source material: Chapter 5, pp 157163 The definition follows from a consideration of how to place a sufficient number of small non-overlapping boxes so as to contain the whole se
Allan Hancock College - MATH - 3062
Dynamical Systems and Chaos page 86Lecture 19 Hnon and Rssler attractor e o Source material: Chapter 5, pp 167173 To reproduce overheads shown in lectures, download the corresponding les from the website and open them with Chaos for Java Hnon att
Allan Hancock College - MATH - 3062
Dynamical Systems and Chaos page 9Source material: Chapter 2, pp 1923 To reproduce overheads shown in lectures, download the corresponding les from the website and open them with Chaos for Java Lecture 3 Stability of xed points Stable and unstab
Allan Hancock College - MATH - 3062
Dynamical Systems and Chaos page 52Lecture 12 Tangent bifurcations Source material: Chapter 3, pp 8995 To reproduce overheads shown in lectures, download the corresponding les from the website and open them with Chaos for Java Periodic windows a
Allan Hancock College - MATH - 3062
Dynamical Systems and Chaos - page 47Lecture 11 - Period doubling route to chaos Source material: Chapter 3, pp 7987 To reproduce overheads shown in lectures, download the corresponding files from the website and open them with &quot;Chaos for Java&quot; Sch
Allan Hancock College - MATH - 3062
Dynamical Systems and Chaos - page 28Lecture 7 - Lyapunov Exponents Source material: Chapter 2, pp 5154 To reproduce overheads shown in lectures, download the corresponding files from the website and open them with &quot;Chaos for Java&quot; Stability of or
Allan Hancock College - MATH - 3062
Department of Mathematics Mathematics Math3062 Non-linear dynamics and chaos BD/2/2005ASSIGNMENT 8 For assessment: due on or before Tuesday October 18th Be sure to give adequate explanation and data for all answers. Question 1 requires analytic wor
Allan Hancock College - MATH - 3062
Department of Mathematics Mathematics 3062 Non linear dynamics and chaos BD/2/2005 PROJECT Due date Friday October 21st, 2005 This project is concerned solely with the iteration of the sine map xn+1 = f (xn ), f (x) = q sin(x).Note that I have not
Allan Hancock College - A - 3002
The Cosmic Microwave BackgroundMaximaDASIWMAPUniverse at z&gt;1100 is hot, matter dominated, but still full of photons. Basic paradigm assumes uctuations are from inationquantum uctuations at t=10-35s are expanded by ~e60 times. The quantum uctuat
Allan Hancock College - A - 3002
WMAP CMB Conclusions A flat universe with a scale-invariant spectrum of adiabatic Gaussian fluctuations, with re-ionization, is an acceptable fit to the WMAP data. The correlations of polarisation and the acoustic peaks imply the initial fluctuation
Allan Hancock College - A - 3002
The Cosmic Microwave BackgroundM axi m aDASIW AP MHot Phot ons s cat t er Of of el ect r onsT&lt;3000, H r ecom nes bi Phot ons t r avel f r eel yUni ver s e at z &gt;1100 i s hot , m t er dom nat ed, but at i st i l l f ul l of phot ons. Basi c p
Allan Hancock College - ENGN - 8227
Quantum Control Homework 1 - Due Wed. 1 Aug., 2007 1. Let A be a Hermitian matrix (self-adjoint). Show that the eigenvalues of A must be real. 2. Let A be an n n matrix. The matrix exponential is defined by the power serieseA = exp(A) =j=01 j
Allan Hancock College - ENGN - 2228
Lecture #18 OverviewLine CodesBinary Digital SignallingIn binary digital signalling the transmitted signal consists of a sequence consisting of two possible waveform pulses. One type of pulse represents a binary 1 and the other represents a binar
Allan Hancock College - ENGN - 8227
ENGN8227 Advanced Topics in Control 2007 Quantum Control Quantum Technology Project Introduction This project activity will give you the opportunity to learn about an application of quantum technology that interests you. This activity also gives you
Allan Hancock College - ENGN - 4528
An Introduction toComputer VisionENGN4528 L02: Imaging, image representations, image transformationsCharge Coupled DevicesMuch of modern digital imaging technology is based on the CCD array. A charge-coupled-device (CCD) array is a substrate o
Allan Hancock College - WEB - 2226
Engineering Systems AnalysisENGINEERING SYSTEMS ANALYSISAnnouncementsENGN 2226 Semester 1, 2007Wednesday 26/02/2008Engineering Systems Analysis Lab/Tute enrollments. Be careful if you are enrolled in more than one laboratory session. (ie
Allan Hancock College - ENGN - 6612
FACULTY of ENGINEERING and INFORMATION TECHNOLOGY DEPARTMENT of ENGINEERING ENGN6612 Digital Signal Processing and Control Tutorial B: Research Paper Semester 2, 2005 1. Introduction This tutorial activity will give you the opportunity to learn abou
Allan Hancock College - ACOLS - 100
Ballagh100-+Talk-+Bragg scattering from vortices and the topological atom laser-+We show that Bragg scattering from a vortex can result in a distinctive scattered matter wave, which provides a vortex signature. We present numerical simulation
Allan Hancock College - COMP - 2600
Set Theory BasicsBasic concepts:Reviewing Set TheoryCOMP2600 Formal Methods for Software Engineering Objects, elements, sets Enumeration notation: as in {1, 2, 3} Is-element-of notation: as in 5 {1, 3, 5, 7}Set equality and notational ambi
Allan Hancock College - COMP - 2600
What's the Problem?Examples of the difficulties faced by early compiler writers:Languages and GrammarsCOMP2600 - Formal Methods for Software EngineeringIn Fortran, spaces are not significant (even as separators):DO 5 I = 1.25 DO 5 I = 1,25(
Allan Hancock College - COMP - 2400
Relational Databases - Comp2400 / Comp6240Lecture 13: Relational AlgebraSQL meets MathsWith only minor additions and adaptations, yesterdays bit of pure maths becomes a useful theory of databases. The plan for todays lectures is to start with a s
East Los Angeles College - CCM - 4031
Flow Analysis Simplifying flow analysis process Examples of applying flow specs Case study12Simplifying the Flow Analysis Process Flow analysis may be Time consuming Too many flows Simplify Showing only flow-model-based-flows Showing
Allan Hancock College - COMP - 2400
Relational Databases - Comp2400 / Comp6240Lecture 24: Decomposition PropertiesWhat makes a good decomposition?attribute preservation dependency preservation lossless joinTodays material is from the beginning of [E&amp;N Chapter 11].Random correc