Software Analysis AdaCore

Size: px
Start display at page:

Download "Software Analysis AdaCore"

Transcription

1 Software Analysis AdaCore Yannick Moy LSL Seminar, CEA-LIST December 8 th, 2009

2 Outline Ada & AdaCore Dynamic Analysis AdaCore Static Analysis AdaCore Project Hi-Lite 1 / 46

3 Outline Ada & AdaCore Dynamic Analysis AdaCore Static Analysis AdaCore Project Hi-Lite 2 / 46

4 Ada Timeline 4 proposals selected Green, Red, Blue, Yellow 1977 Ada Ada201X 201X US DoD Green Strawman 1983 Ada Ada / 46

5 Integers in Ada 1 s u b t y p e Eggs_Number i s I n t e g e r r a n g e ; 2 t y p e Eggs_Number i s new I n t e g e r r a n g e ; 3 4 i f Eggs_Number ' F i r s t < Num and then 5 Num < Eggs_Number ' L a s t 6 t hen f o r Num i n Eggs_Number ' Range l o o p Val : I n t e g e r ; 11 Num := Eggs_Number ' ( Val ) ; 12 Num := Eggs_Number ( Val ) ; 4 / 46

6 Arrays, References and Pointers in Ada 1 t y p e A r r i s a r r a y ( Eggs_Number ) o f N a t u r a l ; 2 3 f o r Num i n Arr ' Range l o o p p r o c e d u r e S e t (X : out T ) ; 6 p r o c e d u r e Get (X : i n T ) ; 7 p r o c e d u r e Get_And_Set (X : i n out T ) ; 8 9 t y p e Pool_Ptr i s a c c e s s I n t e g e r ; 10 t y p e G e n e r a l _ P t r i s a c c e s s a l l I n t e g e r ; 11 t y p e Non_Null_Ptr i s not n u l l a c c e s s I n t e g e r ; p r o c e d u r e Get (X : a c c e s s I n t e g e r ) ; 5 / 46

7 AdaCore Timeline 1992 GNAT NYU/FSF AdaCore US AdaCore EU GPS 2000 C GtkAda GVD PolyORB C++ GNATbench GNATstack GPRbuild AJIS GNATcheck / 46

8 AdaCore Business 60 Engineers 20 PhD 5 Professors 10 Consultants Freely-licensed open-source products (FLOSS) Renewable non-locked subscription Subscription with Frontline support 7 / 46

9 AdaCore Customers 8 / 46

10 GNAT Pro & GPS 9 / 46

11 Outline Ada & AdaCore Dynamic Analysis AdaCore Static Analysis AdaCore Project Hi-Lite 10 / 46

12 Run-time Checking Constraint errors Array access outside its bounds Range overow Integer overow (-gnato) etc. Validity checks -gnatvcemoprst pragma Initialize_Scalars; X'Valid Assertions pragma Assert (test [, message]); 11 / 46

13 Run-time Checking Constraint errors Array access outside its bounds Range overow Integer overow (-gnato) etc. Validity checks -gnatvcemoprst pragma Initialize_Scalars; X'Valid Assertions pragma Assert (test [, message]); 12 / 46

14 Run-time Checking Constraint errors Array access outside its bounds Range overow Integer overow (-gnato) etc. Validity checks -gnatvcemoprst pragma Initialize_Scalars; X'Valid Assertions pragma Assert (test [, message]); 13 / 46

15 Run-time Checking Constraint errors Array access outside its bounds Range overow Integer overow (-gnato) etc. Validity checks -gnatvcemoprst pragma Initialize_Scalars; X'Valid Assertions pragma Assert (test [, message]); 14 / 46

16 Run-time Checking Constraint errors Array access outside its bounds Range overow Integer overow (-gnato) etc. Validity checks -gnatvcemoprst pragma Initialize_Scalars; X'Valid Assertions pragma Assert (test [, message]); 15 / 46

17 GNAT Annotation Language 1 p r o c e d u r e L i n e a r _ S e a r c h 2 ( T a b l e : i n I n t A r r a y ; 3 V a l u e : i n I n t e g e r ; 4 Found : out Boolean ; 5 I n d e x : out I n t e g e r ) ; 6 pragma P r e c o n d i t i o n ( C o u n t e r < I n t e g e r ' L a s t ) ; 7 pragma P o s t c o n d i t i o n ( not Found o r e l s e 8 ( T a b l e ( I n d e x ) = V a l u e and then 9 C o u n t e r = Counter ' Old + 1 ) ) ; p r o c e d u r e L i n e a r _ S e a r c h (... ) i s 12 b e g i n f o r J i n I n t e g e r r a n g e Table ' Range l o o p 15 pragma A s s e r t ( Found = F a l s e and 16 C o u n t e r < I n t e g e r ' L a s t and 17 C o u n t e r = Counter ' Old ) ; end l o o p ; 20 end L i n e a r _ S e a r c h ; 16 / 46

18 Memory, Stack & Exceptions Memory gnatmem/valgrind memory pools debug pools Stack -fstack-check gnatbind -u Exceptions exception traces exception actions : memory management : callbacks on (de-)allocation : callback on dereference : stack overow detection and recovery : post-execution analysis : trace all exceptions : callback on exceptions 17 / 46

19 Memory, Stack & Exceptions Memory gnatmem/valgrind memory pools debug pools Stack -fstack-check gnatbind -u Exceptions exception traces exception actions : memory management : callbacks on (de-)allocation : callback on dereference : stack overow detection and recovery : post-execution analysis : trace all exceptions : callback on exceptions 18 / 46

20 Memory, Stack & Exceptions Memory gnatmem/valgrind memory pools debug pools Stack -fstack-check gnatbind -u Exceptions exception traces exception actions : memory management : callbacks on (de-)allocation : callback on dereference : stack overow detection and recovery : post-execution analysis : trace all exceptions : callback on exceptions 19 / 46

21 Couverture & Proling gcov gprof xcov AUnit 20 / 46

22 Outline Ada & AdaCore Dynamic Analysis AdaCore Static Analysis AdaCore Project Hi-Lite 21 / 46

23 GNAT Warnings -gnatwc.cdfh.ijklm.op.pr.rtu.w.x Conditional expression known to be true or false at compile-time Hiding declaration Variable could be constant Unused entity 22 / 46

24 GNAT Style Checks -gnaty3aabbcdefhiiklnoprsstuxom80 Indentation level Boolean operators Separate specs Maximum line length pragma Restrictions pragma Prole 23 / 46

25 GNAT Style Checks -gnaty3aabbcdefhiiklnoprsstuxom80 Indentation level Boolean operators Separate specs Maximum line length pragma Restrictions pragma Prole 24 / 46

26 GNATmetric: Metrics Computation 25 / 46

27 GNATcheck: Coding Standard Checker 26 / 46

28 CodePeer: Modular Static Analysis.ads.adb gcc -gnatc.scil CodePeer OBJ SSA PVP Warnings + {Contracts} 27 / 46

29 CodePeer Warnings 28 / 46

30 CodePeer Contracts 29 / 46

31 SPARK: Formal Verication START Errors.ads.adb SPARKMake.idx.smf Examiner THE END! POGS.vcg.plg.prv + Checker.siv Simplier 30 / 46

32 SPARK Annotation Language 1 C o u n t e r : N a t u r a l := 0 ; 2 3 p r o c e d u r e L i n e a r _ S e a r c h 4 ( T a b l e : i n I n t A r r a y ; 5 V a l u e : i n I n t e g e r ; 6 Found : out Boolean ; 7 I n d e x : out I n t e g e r ) ; 8 9 # g l o b a l i n out C o u n t e r ; # d e r i v e s C o u n t e r from Counter, Table, V a l u e ; # p r e C o u n t e r < I n t e g e r ' L a s t ; 14 # p o s t Found > ( T a b l e ( I n d e x ) = V a l u e and 15 # C o u n t e r = C o u n t e r ~ + 1 ) ; 31 / 46

33 SPARK Subset of Ada 1 p r o c e d u r e L i n e a r _ S e a r c h (... ) i s 2 b e g i n 3 Found := F a l s e ; 4 I n d e x := 0 ; 5 6 f o r J i n I n t e g e r r a n g e Table ' Range l o o p 7 8 # a s s e r t Found = F a l s e and 9 # C o u n t e r < I n t e g e r ' L a s t and 10 # C o u n t e r = C o u n t e r ~; i f T a b l e ( J ) = V a l u e t hen 13 C o u n t e r := C o u n t e r + 1 ; 14 Found := True ; 15 I n d e x := J ; 16 e x i t ; 17 end i f ; 18 end l o o p ; 19 end L i n e a r _ S e a r c h ; 32 / 46

34 SPARK Examiner 33 / 46

35 SPARK Simplier 34 / 46

36 Outline Ada & AdaCore Dynamic Analysis AdaCore Static Analysis AdaCore Project Hi-Lite 35 / 46

37 Big Picture Testing Static Analysis Hi-Lite Formal Verication 36 / 46

38 Common Language for Properties User Input Inferred by Static Analysis Generated with Code from Model Executable Annotation Language Testing Static Analysis Formal Verication 37 / 46

39 State-of-the-art Free Software Tools Software Category Experts License GNAT Pro compiler AdaCore GNU GPL CodePeer analyser AdaCore GNU GPL Examiner verier and Praxis GNU GPL VC generator Simplier prover Praxis GNU GPL Why VC generator ProVal GNU LGPL Alt-Ergo prover ProVal CeCILL-C Frama-C analyser and CEA LIST GNU LGPL verier and ProVal 38 / 46

40 Workow Between Tools CodePeer SCIL ALFA GNAT SPARK Examiner FDL Simplier Ada SPARK GCC Why Why SMTLIB Alt-Ergo VC Generators Automatic Provers C/E-ACSL Frama-C 39 / 46

41 Many Possible Uses 40 / 46

42 Challenges Inferring more precise annotations Conditional contracts instead of soft contracts Non-overlapping of reference/pointer parameters Top-down propagation of calling contexts Verication of properties on containers Standard library of containers in SPARK Expressing quantication over containers Automatic proof of such properties Improved user interaction Modular interaction at dierent levels Path highlighting (warnings, verication conditions) Traceability of results 41 / 46

43 Challenges Inferring more precise annotations Conditional contracts instead of soft contracts Non-overlapping of reference/pointer parameters Top-down propagation of calling contexts Verication of properties on containers Standard library of containers in SPARK Expressing quantication over containers Automatic proof of such properties Improved user interaction Modular interaction at dierent levels Path highlighting (warnings, verication conditions) Traceability of results 42 / 46

44 Challenges Inferring more precise annotations Conditional contracts instead of soft contracts Non-overlapping of reference/pointer parameters Top-down propagation of calling contexts Verication of properties on containers Standard library of containers in SPARK Expressing quantication over containers Automatic proof of such properties Improved user interaction Modular interaction at dierent levels Path highlighting (warnings, verication conditions) Traceability of results 43 / 46

45 Beyond Formal Verication Copy-paste error Refactoring error 1 i f Some_Var then i f Some_Var then Dead defensive code 1 X : T ; 2 f u n c t i o n F (Y : T) i s 3 b e g i n 4 Use (X ) ; 5 end ; 6 F (X ) ; 1 X := F (... ) ; 2 c a s e X i n I n v a l i d _ V a l u e =>... Ada run-time errors bound check, null string, uninitialized scalar 44 / 46

46 Target Market 45 / 46

47 Consortium 46 / 46

Formal Verification with Ada 2012

Formal Verification with Ada 2012 Formal Verification with Ada 2012 A Very Simple Case Study Didier Willame Ada DevRoom, FOSEDM 2014 February 1, 2014 Content The Toy A Sandpile Simulator A Quick Reminder Floyd-Hoare Logic Design by Contract

More information

EDA045F: Program Analysis LECTURE 10: TYPES 1. Christoph Reichenbach

EDA045F: Program Analysis LECTURE 10: TYPES 1. Christoph Reichenbach EDA045F: Program Analysis LECTURE 10: TYPES 1 Christoph Reichenbach In the last lecture... Performance Counters Challenges in Dynamic Performance Analysis Taint Analysis Binary Instrumentation 2 / 44 Types

More information

Implementation of a simple dimensionality checking system in Ada 2012

Implementation of a simple dimensionality checking system in Ada 2012 Implementation of a simple dimensionality checking system in Ada 2012 Vincent Pucci and Edmond Schonberg Adacore Inc., New York NY 10011, USA, pucci@adacore.com, schonberg@adacore.com, http://www.adacore.com

More information

Deductive Verification

Deductive Verification Deductive Verification Mooly Sagiv Slides from Zvonimir Rakamaric First-Order Logic A formal notation for mathematics, with expressions involving Propositional symbols Predicates Functions and constant

More information

ITI Introduction to Computing II

ITI Introduction to Computing II (with contributions from R. Holte) School of Electrical Engineering and Computer Science University of Ottawa Version of January 11, 2015 Please don t print these lecture notes unless you really need to!

More information

A Short Introduction to Hoare Logic

A Short Introduction to Hoare Logic A Short Introduction to Hoare Logic Supratik Chakraborty I.I.T. Bombay June 23, 2008 Supratik Chakraborty (I.I.T. Bombay) A Short Introduction to Hoare Logic June 23, 2008 1 / 34 Motivation Assertion checking

More information

Requirements Validation. Content. What the standards say (*) ?? Validation, Verification, Accreditation!! Correctness and completeness

Requirements Validation. Content. What the standards say (*) ?? Validation, Verification, Accreditation!! Correctness and completeness Requirements Validation Requirements Management Requirements Validation?? Validation, Verification, Accreditation!! Check if evrything is OK With respect to what? Mesurement associated with requirements

More information

INTRODUCTION. This is not a full c-programming course. It is not even a full 'Java to c' programming course.

INTRODUCTION. This is not a full c-programming course. It is not even a full 'Java to c' programming course. C PROGRAMMING 1 INTRODUCTION This is not a full c-programming course. It is not even a full 'Java to c' programming course. 2 LITTERATURE 3. 1 FOR C-PROGRAMMING The C Programming Language (Kernighan and

More information

Dynamic Semantics. Dynamic Semantics. Operational Semantics Axiomatic Semantics Denotational Semantic. Operational Semantics

Dynamic Semantics. Dynamic Semantics. Operational Semantics Axiomatic Semantics Denotational Semantic. Operational Semantics Dynamic Semantics Operational Semantics Denotational Semantic Dynamic Semantics Operational Semantics Operational Semantics Describe meaning by executing program on machine Machine can be actual or simulated

More information

The NRC ESSI Simulator

The NRC ESSI Simulator B. Jeremić, A. Kammerer, N. Tafazzoli, B. Kamrani University of California, Davis, CA Lawrence Berkeley National Laboratory, Berkeley, CA U.S. Nuclear Regulatory Commission, Washington DC SMiRT 21, New

More information

Lists, Stacks, and Queues (plus Priority Queues)

Lists, Stacks, and Queues (plus Priority Queues) Lists, Stacks, and Queues (plus Priority Queues) The structures lists, stacks, and queues are composed of similar elements with different operations. Likewise, with mathematics: (Z, +, 0) vs. (Z,, 1) List

More information

ITI Introduction to Computing II

ITI Introduction to Computing II (with contributions from R. Holte) School of Electrical Engineering and Computer Science University of Ottawa Version of January 9, 2019 Please don t print these lecture notes unless you really need to!

More information

Discrete-event simulations

Discrete-event simulations Discrete-event simulations Lecturer: Dmitri A. Moltchanov E-mail: moltchan@cs.tut.fi http://www.cs.tut.fi/kurssit/elt-53606/ OUTLINE: Why do we need simulations? Step-by-step simulations; Classifications;

More information

Software Verification

Software Verification Software Verification Grégoire Sutre LaBRI, University of Bordeaux, CNRS, France Summer School on Verification Technology, Systems & Applications September 2008 Grégoire Sutre Software Verification VTSA

More information

Outline. policies for the first part. with some potential answers... MCS 260 Lecture 10.0 Introduction to Computer Science Jan Verschelde, 9 July 2014

Outline. policies for the first part. with some potential answers... MCS 260 Lecture 10.0 Introduction to Computer Science Jan Verschelde, 9 July 2014 Outline 1 midterm exam on Friday 11 July 2014 policies for the first part 2 questions with some potential answers... MCS 260 Lecture 10.0 Introduction to Computer Science Jan Verschelde, 9 July 2014 Intro

More information

Effective Entropy for Memory Randomization Defenses

Effective Entropy for Memory Randomization Defenses Effective Entropy for Memory Randomization Defenses William Herlands, Thomas Hobson, Paula Donovan 7 th Workshop on Cyber Security Experimentation and Test 18 August 2014 This work is sponsored by Assistant

More information

Heterogenous Parallel Computing with Ada Tasking

Heterogenous Parallel Computing with Ada Tasking Heterogenous Parallel Computing with Ada Tasking Jan Verschelde University of Illinois at Chicago Department of Mathematics, Statistics, and Computer Science http://www.math.uic.edu/ jan jan@math.uic.edu

More information

DEBUGGING AND TESTING WITH SCALACHECK. Martina Seidl 2017/11/14

DEBUGGING AND TESTING WITH SCALACHECK. Martina Seidl 2017/11/14 DEBUGGING AND TESTING WITH SCALACHECK Martina Seidl 2017/11/14 Some Words on Scala Scala is object-oriented every value is an object classes and traits: types and behavior of objects inheritance Scala

More information

Administrivia. Course Objectives. Overview. Lecture Notes Week markem/cs333/ 2. Staff. 3. Prerequisites. 4. Grading. 1. Theory and application

Administrivia. Course Objectives. Overview. Lecture Notes Week markem/cs333/ 2. Staff. 3. Prerequisites. 4. Grading. 1. Theory and application Administrivia 1. markem/cs333/ 2. Staff 3. Prerequisites 4. Grading Course Objectives 1. Theory and application 2. Benefits 3. Labs TAs Overview 1. What is a computer system? CPU PC ALU System bus Memory

More information

Nested Interpolants. Matthias Heizmann Jochen Hoenicke Andreas Podelski POPL University of Freiburg, Germany

Nested Interpolants. Matthias Heizmann Jochen Hoenicke Andreas Podelski POPL University of Freiburg, Germany Nested Interpolants Matthias Heizmann Jochen Hoenicke Andreas Podelski University of Freiburg, Germany POPL 2010 Result Interpolant-based software model checking for recursive programs avoid construction

More information

Static Analysis of Programs: A Heap-Centric View

Static Analysis of Programs: A Heap-Centric View Static Analysis of Programs: A Heap-Centric View (www.cse.iitb.ac.in/ uday) Department of Computer Science and Engineering, Indian Institute of Technology, Bombay 5 April 2008 Part 1 Introduction ETAPS

More information

Softwaretechnik. Lecture 13: Design by Contract. Peter Thiemann University of Freiburg, Germany

Softwaretechnik. Lecture 13: Design by Contract. Peter Thiemann University of Freiburg, Germany Softwaretechnik Lecture 13: Design by Contract Peter Thiemann University of Freiburg, Germany 25.06.2012 Table of Contents Design by Contract Contracts for Procedural Programs Contracts for Object-Oriented

More information

Softwaretechnik. Lecture 13: Design by Contract. Peter Thiemann University of Freiburg, Germany

Softwaretechnik. Lecture 13: Design by Contract. Peter Thiemann University of Freiburg, Germany Softwaretechnik Lecture 13: Design by Contract Peter Thiemann University of Freiburg, Germany 25.06.2012 Table of Contents Design by Contract Contracts for Procedural Programs Contracts for Object-Oriented

More information

Towards Lightweight Integration of SMT Solvers

Towards Lightweight Integration of SMT Solvers Towards Lightweight Integration of SMT Solvers Andrei Lapets Boston University Boston, USA lapets@bu.edu Saber Mirzaei Boston University Boston, USA smirzaei@bu.edu 1 Introduction A large variety of SMT

More information

COMP2111 Glossary. Kai Engelhardt. Contents. 1 Symbols. 1 Symbols 1. 2 Hoare Logic 3. 3 Refinement Calculus 5. rational numbers Q, real numbers R.

COMP2111 Glossary. Kai Engelhardt. Contents. 1 Symbols. 1 Symbols 1. 2 Hoare Logic 3. 3 Refinement Calculus 5. rational numbers Q, real numbers R. COMP2111 Glossary Kai Engelhardt Revision: 1.3, May 18, 2018 Contents 1 Symbols 1 2 Hoare Logic 3 3 Refinement Calculus 5 1 Symbols Booleans B = {false, true}, natural numbers N = {0, 1, 2,...}, integers

More information

Lecture Notes: Axiomatic Semantics and Hoare-style Verification

Lecture Notes: Axiomatic Semantics and Hoare-style Verification Lecture Notes: Axiomatic Semantics and Hoare-style Verification 17-355/17-665/17-819O: Program Analysis (Spring 2018) Claire Le Goues and Jonathan Aldrich clegoues@cs.cmu.edu, aldrich@cs.cmu.edu It has

More information

Abstractions and Decision Procedures for Effective Software Model Checking

Abstractions and Decision Procedures for Effective Software Model Checking Abstractions and Decision Procedures for Effective Software Model Checking Prof. Natasha Sharygina The University of Lugano, Carnegie Mellon University Microsoft Summer School, Moscow, July 2011 Lecture

More information

Floyd-Hoare Style Program Verification

Floyd-Hoare Style Program Verification Floyd-Hoare Style Program Verification Deepak D Souza Department of Computer Science and Automation Indian Institute of Science, Bangalore. 9 Feb 2017 Outline of this talk 1 Overview 2 Hoare Triples 3

More information

02 Propositional Logic

02 Propositional Logic SE 2F03 Fall 2005 02 Propositional Logic Instructor: W. M. Farmer Revised: 25 September 2005 1 What is Propositional Logic? Propositional logic is the study of the truth or falsehood of propositions or

More information

E23: Hotel Management System Wen Yunlu Hu Xing Chen Ke Tang Haoyuan Module: EEE 101

E23: Hotel Management System Wen Yunlu Hu Xing Chen Ke Tang Haoyuan Module: EEE 101 E23: Hotel Management System Author: 1302509 Zhao Ruimin 1301478 Wen Yunlu 1302575 Hu Xing 1301911 Chen Ke 1302599 Tang Haoyuan Module: EEE 101 Lecturer: Date: Dr.Lin December/22/2014 Contents Contents

More information

Black-Box Testing Techniques III

Black-Box Testing Techniques III Black-Box Testing Techniques III Software Testing and Verification Lecture 6 Prepared by Stephen M. Thebaut, Ph.D. University of Florida Another Cause-Effect Example: Symbol Table Storage Specification

More information

Debugging and Testing with ScalaCheck

Debugging and Testing with ScalaCheck Debugging and Testing with ScalaCheck Martina Seidl December 11, 2012 1 / 24 Some Words on Scala Scala is object-oriented. every value is an object classes and traits: types and behavior of objects inheritance

More information

Model Checking, Theorem Proving, and Abstract Interpretation: The Convergence of Formal Verification Technologies

Model Checking, Theorem Proving, and Abstract Interpretation: The Convergence of Formal Verification Technologies Model Checking, Theorem Proving, and Abstract Interpretation: The Convergence of Formal Verification Technologies Tom Henzinger EPFL Three Verification Communities Model checking: -automatic, but inefficient

More information

Parallel Polynomial Evaluation

Parallel Polynomial Evaluation Parallel Polynomial Evaluation Jan Verschelde joint work with Genady Yoffe University of Illinois at Chicago Department of Mathematics, Statistics, and Computer Science http://www.math.uic.edu/ jan jan@math.uic.edu

More information

CPSA and Formal Security Goals

CPSA and Formal Security Goals CPSA and Formal Security Goals John D. Ramsdell The MITRE Corporation CPSA Version 2.5.1 July 8, 2015 Contents 1 Introduction 3 2 Syntax 6 3 Semantics 8 4 Examples 10 4.1 Needham-Schroeder Responder.................

More information

Financial. Analysis. O.Eval = {Low, High} Store. Bid. Update. Risk. Technical. Evaluation. External Consultant

Financial. Analysis. O.Eval = {Low, High} Store. Bid. Update. Risk. Technical. Evaluation. External Consultant ACM PODS98 of CS Dept at Stony Brook University Based Modeling and Analysis of Logic Workows Hasan Davulcu* N.Y. 11794, U.S.A. * Joint with M. Kifer, C.R. Ramakrishnan, I.V. Ramakrishnan Hasan Davulcu

More information

Verification and Validation. CS1538: Introduction to Simulations

Verification and Validation. CS1538: Introduction to Simulations Verification and Validation CS1538: Introduction to Simulations Steps in a Simulation Study Problem & Objective Formulation Model Conceptualization Data Collection Model translation, Verification, Validation

More information

Nested Interpolants. Matthias Heizmann Jochen Hoenicke Andreas Podelski. Abstract. 1. Introduction. University of Freiburg, Germany

Nested Interpolants. Matthias Heizmann Jochen Hoenicke Andreas Podelski. Abstract. 1. Introduction. University of Freiburg, Germany c ACM 2010. This is the author s version of the work. t is posted here by permission of ACM for your personal use. Not for redistribution. The definitive version was published in Principles of Programming

More information

Harvard School of Engineering and Applied Sciences CS 152: Programming Languages

Harvard School of Engineering and Applied Sciences CS 152: Programming Languages Harvard School of Engineering and Applied Sciences CS 152: Programming Languages Lecture 17 Tuesday, April 2, 2013 1 There is a strong connection between types in programming languages and propositions

More information

Computer Science Introductory Course MSc - Introduction to Java

Computer Science Introductory Course MSc - Introduction to Java Computer Science Introductory Course MSc - Introduction to Java Lecture 1: Diving into java Pablo Oliveira ENST Outline 1 Introduction 2 Primitive types 3 Operators 4 5 Control Flow

More information

Today s Lecture. Lecture 4: Formal SE. Some Important Points. Formal Software Engineering. Introduction to Formal Software Engineering

Today s Lecture. Lecture 4: Formal SE. Some Important Points. Formal Software Engineering. Introduction to Formal Software Engineering Today s Lecture Lecture 4: Formal SE Introduction to Formal Software Engineering Discuss Models Discuss Formal Notations Kenneth M. Anderson Foundations of Software Engineering CSCI 5828 - Spring Semester,

More information

Model Checking: An Introduction

Model Checking: An Introduction Model Checking: An Introduction Meeting 3, CSCI 5535, Spring 2013 Announcements Homework 0 ( Preliminaries ) out, due Friday Saturday This Week Dive into research motivating CSCI 5535 Next Week Begin foundations

More information

THE UTP SUITE YOUR ALL-IN-ONE SOLUTION FOR BUILDING MODERN TEST SYSTEM SOFTWARE

THE UTP SUITE YOUR ALL-IN-ONE SOLUTION FOR BUILDING MODERN TEST SYSTEM SOFTWARE THE UTP SUITE YOUR ALL-IN-ONE SOLUTION FOR BUILDING MODERN TEST SYSTEM SOFTWARE UTP Suite THE UTP SUITE DEVELOPING A STANDARD Increasing customer requirements, shorter product cycles and higher time to

More information

Lecture 4 Event Systems

Lecture 4 Event Systems Lecture 4 Event Systems This lecture is based on work done with Mark Bickford. Marktoberdorf Summer School, 2003 Formal Methods One of the major research challenges faced by computer science is providing

More information

The TLA + proof system

The TLA + proof system The TLA + proof system Stephan Merz Kaustuv Chaudhuri, Damien Doligez, Leslie Lamport INRIA Nancy & INRIA-MSR Joint Centre, France Amir Pnueli Memorial Symposium New York University, May 8, 2010 Stephan

More information

COMPUTING SIMILARITY BETWEEN DOCUMENTS (OR ITEMS) This part is to a large extent based on slides obtained from

COMPUTING SIMILARITY BETWEEN DOCUMENTS (OR ITEMS) This part is to a large extent based on slides obtained from COMPUTING SIMILARITY BETWEEN DOCUMENTS (OR ITEMS) This part is to a large extent based on slides obtained from http://www.mmds.org Distance Measures For finding similar documents, we consider the Jaccard

More information

6.001 Recitation 22: Streams

6.001 Recitation 22: Streams 6.001 Recitation 22: Streams RI: Gerald Dalley, dalleyg@mit.edu, 4 May 2007 http://people.csail.mit.edu/dalleyg/6.001/sp2007/ The three chief virtues of a programmer are: Laziness, Impatience and Hubris

More information

Invariant Patterns for Program Reasoning

Invariant Patterns for Program Reasoning Invariant Patterns for Program Reasoning Andrew Ireland and Bill J. Ellis and Tommy Ingulfsen School of Mathematical & Computer Sciences Heriot-Watt University, Edinburgh, Scotland, UK a.ireland@hw.ac.uk

More information

Formal Specification and Verification. Specifications

Formal Specification and Verification. Specifications Formal Specification and Verification Specifications Imprecise specifications can cause serious problems downstream Lots of interpretations even with technicaloriented natural language The value returned

More information

Big Data Infrastructure CS 489/698 Big Data Infrastructure (Winter 2016)

Big Data Infrastructure CS 489/698 Big Data Infrastructure (Winter 2016) Big Data Infrastructure CS 489/698 Big Data Infrastructure (Winter 2016) Week 12: Real-Time Data Analytics (2/2) March 31, 2016 Jimmy Lin David R. Cheriton School of Computer Science University of Waterloo

More information

Statistical Debugging. Ben Liblit, University of Wisconsin Madison

Statistical Debugging. Ben Liblit, University of Wisconsin Madison Statistical Debugging Ben Liblit, University of Wisconsin Madison Bug Isolation Architecture Program Source Predicates Sampler Compiler Shipping Application Top bugs with likely causes Statistical Debugging

More information

Nunchaku: Flexible Model Finding for Higher-Order Logic

Nunchaku: Flexible Model Finding for Higher-Order Logic Nunchaku: Flexible Model Finding for Higher-Order Logic Simon Cruanes, Jasmin Blanchette, Andrew Reynolds Veridis, Inria Nancy https://cedeela.fr/~simon/ April 7th, 2016 1 / 21 Summary Introduction Nunchaku

More information

CSE 331 Software Design & Implementation

CSE 331 Software Design & Implementation CSE 331 Software Design & Implementation Kevin Zatloukal Summer 2017 Lecture 2 Reasoning About Code With Logic (Based on slides by Mike Ernst, Dan Grossman, David Notkin, Hal Perkins, Zach Tatlock) Recall

More information

Ranking Verification Counterexamples: An Invariant guided approach

Ranking Verification Counterexamples: An Invariant guided approach Ranking Verification Counterexamples: An Invariant guided approach Ansuman Banerjee Indian Statistical Institute Joint work with Pallab Dasgupta, Srobona Mitra and Harish Kumar Complex Systems Everywhere

More information

CMP 338: Third Class

CMP 338: Third Class CMP 338: Third Class HW 2 solution Conversion between bases The TINY processor Abstraction and separation of concerns Circuit design big picture Moore s law and chip fabrication cost Performance What does

More information

Principles of Program Analysis: A Sampler of Approaches

Principles of Program Analysis: A Sampler of Approaches Principles of Program Analysis: A Sampler of Approaches Transparencies based on Chapter 1 of the book: Flemming Nielson, Hanne Riis Nielson and Chris Hankin: Principles of Program Analysis Springer Verlag

More information

Axiomatic semantics. Semantics and Application to Program Verification. Antoine Miné. École normale supérieure, Paris year

Axiomatic semantics. Semantics and Application to Program Verification. Antoine Miné. École normale supérieure, Paris year Axiomatic semantics Semantics and Application to Program Verification Antoine Miné École normale supérieure, Paris year 2015 2016 Course 6 18 March 2016 Course 6 Axiomatic semantics Antoine Miné p. 1 /

More information

Proofs of Correctness: Introduction to Axiomatic Verification

Proofs of Correctness: Introduction to Axiomatic Verification Proofs of Correctness: Introduction to Axiomatic Verification Introduction Weak correctness predicate Assignment statements Sequencing Selection statements Iteration 1 Introduction What is Axiomatic Verification?

More information

Advanced parallel Fortran

Advanced parallel Fortran 1/44 Advanced parallel Fortran A. Shterenlikht Mech Eng Dept, The University of Bristol Bristol BS8 1TR, UK, Email: mexas@bristol.ac.uk coarrays.sf.net 12th November 2017 2/44 Fortran 2003 i n t e g e

More information

Searching, mainly via Hash tables

Searching, mainly via Hash tables Data structures and algorithms Part 11 Searching, mainly via Hash tables Petr Felkel 26.1.2007 Topics Searching Hashing Hash function Resolving collisions Hashing with chaining Open addressing Linear Probing

More information

Communicating Scala Objects. Bernard Sufrin. CPA, York, September 2008

Communicating Scala Objects. Bernard Sufrin. CPA, York, September 2008 Communicating Scala Objects Bernard Sufrin CPA, York, September 2008 [cpa2008-cso-talk] Communicating Scala Objects why bother? The dogma Component Object is no longer sustainable Can Component Process

More information

Implicit Self-Adjusting Computation for Purely Functional Programs

Implicit Self-Adjusting Computation for Purely Functional Programs Implicit Self-Adjustg Computation for Purely Functional Programs Yan Chen Joshua Dunfield Matthew A. Hammer Umut A. Acar MPI-SWS September 19, 2011 Incremental/Dynamic Problems Input: 3, 5, 8, 2, 10, 4,

More information

Building Algorithmic Polytopes. David Bremner with D. Avis, H.R. Tiwary, and O. Watanabe December 16, 2014

Building Algorithmic Polytopes. David Bremner with D. Avis, H.R. Tiwary, and O. Watanabe December 16, 2014 Building Algorithmic Polytopes David Bremner with D. Avis, H.R. Tiwary, and O. Watanabe December 16, 2014 Outline Matchings in graphs Given G = (V, E), M E is called a matching {e M v e} 1 v V A matching

More information

Software Engineering

Software Engineering Software Engineering Lecture 07: Design by Contract Peter Thiemann University of Freiburg, Germany 02.06.2014 Table of Contents Design by Contract Contracts for Procedural Programs Contracts for Object-Oriented

More information

Formal Reasoning CSE 331. Lecture 2 Formal Reasoning. Announcements. Formalization and Reasoning. Software Design and Implementation

Formal Reasoning CSE 331. Lecture 2 Formal Reasoning. Announcements. Formalization and Reasoning. Software Design and Implementation CSE 331 Software Design and Implementation Lecture 2 Formal Reasoning Announcements Homework 0 due Friday at 5 PM Heads up: no late days for this one! Homework 1 due Wednesday at 11 PM Using program logic

More information

Automatic Resource Bound Analysis and Linear Optimization. Jan Hoffmann

Automatic Resource Bound Analysis and Linear Optimization. Jan Hoffmann Automatic Resource Bound Analysis and Linear Optimization Jan Hoffmann Beyond worst-case analysis Beyond worst-case analysis of algorithms Beyond worst-case analysis of algorithms Resource bound analysis

More information

Logic reasoning systems

Logic reasoning systems Lecture 2 Logic reasoning systems Milos Hauskrecht milos@cs.pitt.edu 5329 Sennott Square Administration No class next week PS-5: Due on Thursda October 4, 2004 Submit directly to Tomas Singliar Midterm:

More information

Panorama des modèles et outils de programmation parallèle

Panorama des modèles et outils de programmation parallèle Panorama des modèles et outils de programmation parallèle Sylvain HENRY sylvain.henry@inria.fr University of Bordeaux - LaBRI - Inria - ENSEIRB April 19th, 2013 1/45 Outline Introduction Accelerators &

More information

Assignment 4: Object creation

Assignment 4: Object creation Assignment 4: Object creation ETH Zurich Hand-out: 13 November 2006 Due: 21 November 2006 Copyright FarWorks, Inc. Gary Larson 1 Summary Today you are going to create a stand-alone program. How to create

More information

Theorem Proving beyond Deduction

Theorem Proving beyond Deduction Theorem Proving beyond Deduction Specification and Verification with Higher-Order Logic Arnd Poetzsch-Heffter (Slides by Jens Brandt) Software Technology Group Fachbereich Informatik Technische Universität

More information

Diagnosing Automatic Whitelisting for Dynamic Remarketing Ads Using Hybrid ASP

Diagnosing Automatic Whitelisting for Dynamic Remarketing Ads Using Hybrid ASP Diagnosing Automatic Whitelisting for Dynamic Remarketing Ads Using Hybrid ASP Alex Brik 1 and Jeffrey B. Remmel 2 LPNMR 2015 September 2015 1 Google Inc 2 UC San Diego lex Brik and Jeffrey B. Remmel (LPNMR

More information

Tobias Markus. January 21, 2015

Tobias Markus. January 21, 2015 Automata Advanced Seminar Computer Engineering January 21, 2015 (Advanced Seminar Computer Engineering ) Automata January 21, 2015 1 / 35 1 2 3 4 5 6 obias Markus (Advanced Seminar Computer Engineering

More information

More About Methods. Hsuan-Tien Lin. Deptartment of CSIE, NTU. OOP Class, March 8-9, 2010

More About Methods. Hsuan-Tien Lin. Deptartment of CSIE, NTU. OOP Class, March 8-9, 2010 More About Methods Hsuan-Tien Lin Deptartment of CSIE, NTU OOP Class, March 8-9, 2010 H.-T. Lin (NTU CSIE) More About Methods OOP 03/08-09/2010 0 / 24 Methods: the Basic Method (1/2, Callee s View) 1 p

More information

Programming Languages

Programming Languages CSE 230: Winter 2008 Principles of Programming Languages Lecture 7: Axiomatic Semantics Axiomatic Semantics over low Graphs c {P} if P P {P } {Q} c if Q Q {Q} {Q } Ranjit Jhala UC San Diego Relaxing specifications

More information

Lisp Introduction. Dr. Neil T. Dantam. Spring CSCI-498/598 RPM, Colorado School of Mines. Dantam (Mines CSCI, RPM) Lisp Spring / 88

Lisp Introduction. Dr. Neil T. Dantam. Spring CSCI-498/598 RPM, Colorado School of Mines. Dantam (Mines CSCI, RPM) Lisp Spring / 88 Lisp Introduction Dr. Neil T. Dantam CSCI-498/598 RPM, Colorado School of Mines Spring 28 Dantam (Mines CSCI, RPM) Lisp Spring 28 / 88 Outline Lisp Common Lisp by Example Implementation Details Typing

More information

Table of Content. Chapter 11 Dedicated Microprocessors Page 1 of 25

Table of Content. Chapter 11 Dedicated Microprocessors Page 1 of 25 Chapter 11 Dedicated Microprocessors Page 1 of 25 Table of Content Table of Content... 1 11 Dedicated Microprocessors... 2 11.1 Manual Construction of a Dedicated Microprocessor... 3 11.2 FSM + D Model

More information

Introduction to Python

Introduction to Python Introduction to Python Luis Pedro Coelho Institute for Molecular Medicine (Lisbon) Lisbon Machine Learning School II Luis Pedro Coelho (IMM) Introduction to Python Lisbon Machine Learning School II (1

More information

Flow Annotations and Flow Analysis. SPARK - Information Flow

Flow Annotations and Flow Analysis. SPARK - Information Flow Flow Annotations and Flow Analysis SPARK - Information Flow 1 Data Flow & Information Flow Inputs x y z w v procedure! SPARK Global aspects and in/out modes specify procedure inputs and outputs.! SPARK

More information

Knowledge-based systems

Knowledge-based systems CS 750 Foundations of I Lecture 6 Knowledge-based systems Milos Hauskrecht milos@cs.pitt.edu 539 Sennott Square dministration announcements Midterm: Thursda October 6, 07 In-class Closed book What does

More information

Lecture Notes on Data Abstraction

Lecture Notes on Data Abstraction Lecture Notes on Data Abstraction 15-814: Types and Programming Languages Frank Pfenning Lecture 14 October 23, 2018 1 Introduction Since we have moved from the pure λ-calculus to functional programming

More information

Axiomatic Semantics. Operational semantics. Good for. Not good for automatic reasoning about programs

Axiomatic Semantics. Operational semantics. Good for. Not good for automatic reasoning about programs Review Operational semantics relatively l simple many flavors (small vs. big) not compositional (rule for while) Good for describing language implementation reasoning about properties of the language eg.

More information

CS 581: Introduction to the Theory of Computation! Lecture 1!

CS 581: Introduction to the Theory of Computation! Lecture 1! CS 581: Introduction to the Theory of Computation! Lecture 1! James Hook! Portland State University! hook@cs.pdx.edu! http://www.cs.pdx.edu/~hook/cs581f10/! Welcome!! Contact Information! Jim Hook! Office:

More information

Fundamentals of Software Engineering

Fundamentals of Software Engineering Fundamentals of Software Engineering First-Order Logic Ina Schaefer Institute for Software Systems Engineering TU Braunschweig, Germany Slides by Wolfgang Ahrendt, Richard Bubel, Reiner Hähnle (Chalmers

More information

Simulation & Modeling Event-Oriented Simulations

Simulation & Modeling Event-Oriented Simulations Simulation & Modeling Event-Oriented Simulations Outline Simulation modeling characteristics Concept of Time A DES Simulation (Computation) DES System = model + simulation execution Data Structures Program

More information

Charter for the. Information Transfer and Services Architecture Focus Group

Charter for the. Information Transfer and Services Architecture Focus Group for the Information Transfer and Services Architecture Focus Group 1. PURPOSE 1.1. The purpose of this charter is to establish the Information Transfer and Services Architecture Focus Group (ITSAFG) as

More information

libsupermesh version 1.0.1

libsupermesh version 1.0.1 libsupermesh version 1.0.1 James R. Maddison School of Mathematics and Maxwell Institute for Mathematical Sciences, University of Edinburgh, UK Iakovos Panourgias EPCC, University of Edinburgh, UK, Patrick

More information

Instruction Selection

Instruction Selection Compiler Design Instruction Selection Hwansoo Han Structure of a Compiler O(n) O(n) O(n log n) Scanner words Parser IR Analysis & Optimization IR Instruction Selection Either fast or NP-Complete asm asm

More information

Towards a traceability framework for model transformations in Kermeta

Towards a traceability framework for model transformations in Kermeta Towards a traceability framework for model transformations in Kermeta Jean-Rémy Falleri, Marianne Huchard, and Clémentine Nebut LIRMM, CNRS and Université de Montpellier 2, 161, rue Ada, 34392 Montpellier

More information

Algorithms for Data Science

Algorithms for Data Science Algorithms for Data Science CSOR W4246 Eleni Drinea Computer Science Department Columbia University Tuesday, December 1, 2015 Outline 1 Recap Balls and bins 2 On randomized algorithms 3 Saving space: hashing-based

More information

Digital Systems. Validation, verification. R. Pacalet January 4, 2018

Digital Systems. Validation, verification. R. Pacalet January 4, 2018 Digital Systems Validation, verification R. Pacalet January 4, 2018 2/98 Simulation Extra design tasks Reference model Simulation environment A simulation cannot be exhaustive Can discover a bug Cannot

More information

Verified Characteristic Formulae for CakeML. Armaël Guéneau, Magnus O. Myreen, Ramana Kumar, Michael Norrish April 18, 2017

Verified Characteristic Formulae for CakeML. Armaël Guéneau, Magnus O. Myreen, Ramana Kumar, Michael Norrish April 18, 2017 Verified Characteristic Formulae for CakeML Armaël Guéneau, Magnus O. Myreen, Ramana Kumar, Michael Norrish April 18, 2017 CakeML Has: references, modules, datatypes, exceptions, a FFI,... Doesn t have:

More information

Description of the ED library Basic Atoms

Description of the ED library Basic Atoms Description of the ED library Basic Atoms Simulation Software / Description of the ED library BASIC ATOMS Enterprise Dynamics Copyright 2010 Incontrol Simulation Software B.V. All rights reserved Papendorpseweg

More information

Probabilistic Guarded Commands Mechanized in HOL

Probabilistic Guarded Commands Mechanized in HOL Probabilistic Guarded Commands Mechanized in HOL Joe Hurd joe.hurd@comlab.ox.ac.uk Oxford University Joint work with Annabelle McIver (Macquarie University) and Carroll Morgan (University of New South

More information

Fundamentals of Software Engineering

Fundamentals of Software Engineering Fundamentals of Software Engineering First-Order Logic Ina Schaefer Institute for Software Systems Engineering TU Braunschweig, Germany Slides by Wolfgang Ahrendt, Richard Bubel, Reiner Hähnle (Chalmers

More information

Compiling Self-Adjusting Programs with Continuations

Compiling Self-Adjusting Programs with Continuations Compiling Self-Adjusting Programs with Continuations Ruy Ley-Wild 1 Matthew Fluet 2 Umut Acar 2 1 Carnegie Mellon University 2 Toyota Technological Institute at Chicago September 2, 2008 1 2 Dealin with

More information

Ramsey s Theorem in ProofPower (Draft)

Ramsey s Theorem in ProofPower (Draft) A1 L E M M Lemma 1 Ltd. c/o Interglossa 2nd Floor 31A Chain St. Reading Berks RG1 2HX Ramsey s Theorem in ProofPower (Draft) Abstract This paper is concerned with a ProofPower-HOL proof of the finite exponent

More information

First-Order Theorem Proving and Vampire. Laura Kovács (Chalmers University of Technology) Andrei Voronkov (The University of Manchester)

First-Order Theorem Proving and Vampire. Laura Kovács (Chalmers University of Technology) Andrei Voronkov (The University of Manchester) First-Order Theorem Proving and Vampire Laura Kovács (Chalmers University of Technology) Andrei Voronkov (The University of Manchester) Outline Introduction First-Order Logic and TPTP Inference Systems

More information

Introduction to Kleene Algebras

Introduction to Kleene Algebras Introduction to Kleene Algebras Riccardo Pucella Basic Notions Seminar December 1, 2005 Introduction to Kleene Algebras p.1 Idempotent Semirings An idempotent semiring is a structure S = (S, +,, 1, 0)

More information

Abstracting Definitional Interpreters. David Van Horn

Abstracting Definitional Interpreters. David Van Horn Abstracting Definitional Interpreters David Van Horn Abstracting Definitional Interpreters David Van Horn Northeastern University Definitional interpreters written in monadic style can express a wide variety

More information

7. Queueing Systems. 8. Petri nets vs. State Automata

7. Queueing Systems. 8. Petri nets vs. State Automata Petri Nets 1. Finite State Automata 2. Petri net notation and definition (no dynamics) 3. Introducing State: Petri net marking 4. Petri net dynamics 5. Capacity Constrained Petri nets 6. Petri net models

More information