Polynomial Size Analysis for an Imperative Language

Size: px
Start display at page:

Download "Polynomial Size Analysis for an Imperative Language"

Transcription

1 Polynomial Size Analysis for an Imperative Language Master Thesis Research Plan Rody Kersten Supervised by Marko van Eekelen February 16, 2009 Abstract Analysis of heap space consumption is a valuable tool when working with limited resources. This document proposes the design and implementation of a size-aware type system for the imperative object-oriented language FJEU (Featherweight Java Extended with Update). It will build upon solutions for functional languages and improve on techniques that simply sum up worst case bounds. Instead, it will allow for polynomial size bounds to be checked for correctness. Soundness of the type system will be proved and a demonstration program will be implemented. 1 Introduction Qualitative analysis of software is an increasingly popular subject among computer scientists. Fields of interest include functional-, complexity-, security- and performance-analysis. An area that is relatively unexplored is the analysis of memory usage. However, the ability to make an accurate memory consumption estimate is very valuable, especially in embedded situations where resources are limited or in other situations when memory exhaustive processes are executed. Besides human analysis, such a methodology also has other uses, for example for code optimization by compilers. Progress has been made in the area, but has focused on either linear solutions or on polynomial methods for functional languages. This research will consider polynomial size analysis, as developed in the AHA project [16], for an imperative language. A size aware imperative and object-oriented language will be developed, based on FJEU (as defined in [6]), which is in turn an extension of Featherweight Java [8]. This SAFE Java (Size-Aware FEatherweight Java) will extend FJEU with JML-like annotations for specifying size relations. 1

2 2 Related Work The Amortized Heap Space Usage Analysis (AHA) project [16] is aimed at developing a methodology for determining bounds on heap space consumption. Amortization is a term which has its origins in the financial world, where it is used to express that multiple smaller payments account for a certain larger amount. The term was applied to a brand of complexity analysis in [15] and to heap space analysis in [6]. Here it means that certain operations that increase the potential of a data structure may cancel out other operations that decrease its potential, resulting in a simpler estimation of the change in potential of the total. In [13], a technique was developed for checking the correctness of user-specified output-on-input size relations on first-order functions. This technique improved on existing methods, because it was able to determine polynomial bounds on sizes rather than monotonic bound. An algorithm for inferring these size annotations was added [13, 17]. Since up to this point a very restricted functional language with only integer and list data types was used, support for algebraic data types was added, proving the systems ability to handle more complex programs [14]. Finally, the approach was adapted to work with both upper and lower bounds on the output-on-input size dependencies [12]. A demonstration program implementing the methodology is available at Amortization techniques have not been developed for this approach yet, since a complete polynomial size analysis system is prerequisite to that. The research proposed in this document aims at transferring the results of the AHA project to an object-oriented imperative language. In the Mobile Resource Guarantees (MRG) project [11] and its follow-ups MO- BIUS 1 and Embounded [5], several different approaches to heap-space consumption analysis have been developed. In [6], Hofmann and Jost describe the FJEU language and the resource aware RAJA language, based on FJEU. Their RAJA type system focuses on linear bounds on heap-space consumption, whereas our approach will be aimed at establishing polynomial bounds. However, our language and implementation will also build upon FJEU. Their approach is further developed in the to-be-published [7]. A different direction is taken in [1] and [2], where a resource aware program logic for Grail is discussed. Grail [3] is an intermediate language in the compilation of Camelot [10] and O Camelot [18] to Java byte code. It can be seen as a functional subset of the Java Virtual Machine Language. A type system for memory usage verification of object-oriented programs is presented by Chin et. al. in [4], which may be used to calculate conservative worst-case bounds

3 3 Motivation Computer systems often have limited resources available, especially when embedded systems or systems with an exceptionally intensive task are considered. To assure quality and reliability of these systems different forms of program analysis have been invented. This helps reason about certain specifics of the program, such as its requirements conformance or its vulnerability to bufferoverflow attacks. In many situations it will also be important to know in advance how much memory a process will consume. For example in Java smart cards an accurate estimate of the memory needed will prevent either unnecessary expenses for the manufacturer or abrupt termination caused by memory shortage. It is also very valuable for larger computers running memory intensive processes, like server grids performing model checking. The AHA project has already shown that polynomial size analysis is feasible for a lazy functional language. However, the usage of functional languages in practice is very small, especially when compared to imperative languages. Java is often the language of choice for embedded systems like mobile phones or smart cards, and memory exhaustive programs will likely be written in C or C++. This project extends the approach to imperative languages, bringing it a step towards its intended application and serving as a stepping stone to a thorough implementation for (Real Time) Java. 4 Problem Statement The main problem is how to transfer polynomial size analysis to an imperative language and how to overcome the challenges this different type of language will undoubtedly yield. To make this transfer, a type system which includes the sizes of types has to be defined and proved to be sound with respect to the semantics of the chosen language. The final problem is how to implement the demonstration program and design some non-trivial examples for it to analyze. 5 Strategy Two parallel tasks will be engaged: the research task and the implementation task. The research task will start off with studying the AHA project and other related research and writing a chapter about the current state of knowledge concerning heap space analysis in general and polynomial size analysis in particular. After this, FJEU will be studied and described. A type system has to be formally defined for SAFE Java. It has to be decided what will be measured (for example the number of objects or the actual number 3

4 of bytes used) and an appropriate type system must be designed. FJEU will have to be extended with a syntax for annotating programs with the size signatures of functions and size dependencies within objects. The Java Modeling Language (JML) already provides some syntax for specifying heap usage [9], which will be extended to suit our needs. After the type system has been defined, its soundness with respect to the FJEU semantics will be proved. Because the language of choice is FJEU, the implementation will build upon the existing parser and interpreter for this language by Martin Hofmann, Steffen Jost and Dulma Rodriguez 2, which is written in O Caml. The parser will be extended to enable the parsing of size annotations and a type-checker will be written for our type-system. Where possible, the program will be designed to be easily portable to other object-languages than FJEU. 6 Time Schedule Research Deliverables Implementation 8 Study related work Study O Caml 9 Describe related research Related work chapter and FJEU code 10 Study and describe FJEU Chapter on FJEU 11 Define annotation syntax Extend parser 12 Determine typing rules Write about type system Type checker Write down examples 17 Soundness proof Finish chapter SAFE Java chapter Absent 22 Describe implementation Implementation chapter Finish up 23 Introduction, future work 24 and conclusions chapters Three chapters 25 Finish up Draft version 26 Write final version 27 Final thesis 28 Presentation Week numbers refer to the weeks of the year A deliverable is a product of the research activities that should be finished by the end of the week. Implementation of the demonstrator will be done in parallel to the other work. 2 Available at: rodrigue/raja.html 4

5 References [1] D. Aspinall, L. Beringer, M. Hofmann, H.-W. Loidl, and A. Momigliano. A program logic for resource verification. In Theorem Proving in Higher Order Logics, 17th International Conference, TPHOLs 2004, Park City, Utah, USA, September 14-17, 2004, volume 3223 of Lecture Notes in Computer Science, pages Springer, [2] D. Aspinall, L. Beringer, M. Hofmann, H.-W. Loidl, and A. Momigliano. A program logic for resources. Theor. Comput. Sci., 389(3): , [3] L. Beringer, K. MacKenzie, and I. Stark. Grail: a functional form for imperative mobile code. Electronic Notes in Theoretical Computer Science, 85(1), [4] W.-N. Chin, H. H. Nguyen, S. Qin, and M. Rinard. Memory usage verification for OO programs. In Static Analysis, volume 3672 of Lecture Notes in Computer Science, pages Springer-Verlag, [5] K. Hammond, R. Dyckhoff, C. Ferdinand, R. Heckmann, M. Hofmann, H.-W. Loidl, G. Michaelson, J. Serot, and A. Wallace. The embounded project (project paper). In Proc. 6th Symposium on Trends in Functional Programming (TFP 2005), Tallinn, Estonia, September Intellect, [6] M. Hofmann and S. Jost. Type-based amortised heap-space analysis. In Programming Languages and Systems, volume 3924 of Lecture Notes in Computer Science, pages Springer-Verlag, [7] M. Hofmann and D. Rodriguez. Efficient type-checking for amortised heapspace analysis. Unpublished, submitted to TLCA 09. [8] A. Igarashi, B. C. Pierce, and P. Wadler. Featherweight Java: a minimal core calculus for Java and GJ. ACM Trans. Program. Lang. Syst., 23(3): , [9] G. T. Leavens, E. Poll, C. Clifton, Y. Cheon, and C. Ruby. JML reference manual. Available from [10] K. MacKenzie and N. Wolverson. Camelot and grail: resource-aware functional programming on the jvm. In Trends in Functional Programing, volume 4, pages Intellect, [11] D. Sannella, M. Hofmann, D. Aspinall, S. Gilmore, I. Stark, L. Beringer, H.-W. Loidl, K. MacKenzie, A. Momigliano, and O. Shkaravska. Mobile Resource Guarantees. In Trends in Functional Programing, volume 6, Tallinn, Estonia, Sep 23 24, Intellect. [12] O. Shkaravska, M. van Eekelen, and A. Tamalet. Size analysis with indexed families of max 0 -polynomials. To appear in [13] O. Shkaravska, R. van Kesteren, and M. C. J. D. van Eekelen. Polynomial size analysis of first-order functions. In TLCA, pages ,

6 [14] A. Tamalet, O. Shkaravska, and M. van Eekelen. Size analysis of algebraic data types. In P. Achten, P. Koopman, and M. T. Morazán, editors, Trends in Functional Programming Volume 9: Selected Papers of the 9 th International Symposium on Trends in Functional Programming (TFP07), New York, USA. Intellect Publishers, UK, To appear [15] R. E. Tarjan. Amortized computational complexity. SIAM Journal on Algebraic and Discrete Methods, 6(2): , [16] M. van Eekelen, O. Shkaravska, R. van Kesteren, B. Jacobs, E. Poll, and S. Smetsers. AHA: Amortized Heap Space Usage Analysis. In M. Morazán, editor, Trends in Functional Programming Volume 8: Selected Papers of the 8 th International Symposium on Trends in Functional Programming (TFP 07), New York, USA, pages Intellect Publishers, UK, [17] R. van Kesteren, O. Shkaravska, and M. van Eekelen. Inferring static nonmonotonically sized types through testing. In R. Echahed, editor, 16 th International Workshop on Functional and (Constraint) Logic Programming (WFLP07), Paris, France, pages CNAM, France, [18] N. Wolverson and K. MacKenzie. O camelot: Adding objects to a resource aware functional language. In Trends in Functional Programing, volume 4, pages Intellect,

AHA: Amortized Heap Space Usage Analysis Project Paper

AHA: Amortized Heap Space Usage Analysis Project Paper AHA: Amortized Heap Space Usage Analysis Project Paper Marko van Eekelen, Olha Shkaravska, Ron van Kesteren, Bart Jacobs, Erik Poll, and Sjaak Smetsers Project Contact: marko@cs.ru.nl Institute for Computing

More information

Ranking Functions for Loops with Disjunctive Exit-Conditions

Ranking Functions for Loops with Disjunctive Exit-Conditions Ranking Functions for Loops with Disjunctive Exit-Conditions Rody Kersten 1 Marko van Eekelen 1,2 1 Institute for Computing and Information Sciences (icis), Radboud University Nijmegen 2 School for Computer

More information

Mobile Resource Guarantees

Mobile Resource Guarantees Mobile Resource Guarantees Ian Stark Laboratory for Foundations of Computer Science School of Informatics, University of Edburgh David Aspall, Stephen Gilmore, Don Sannella, *Kenneth MacKenzie, *Lennart

More information

Implicit Computational Complexity

Implicit Computational Complexity Implicit Computational Complexity Simone Martini Dipartimento di Scienze dell Informazione Università di Bologna Italy Bertinoro International Spring School for Graduate Studies in Computer Science, 6

More information

Size Analysis of Algebraic Data Types

Size Analysis of Algebraic Data Types Chapter 3 Size Analysis of Algebraic Data Types Alejandro Tamalet, Olha Shkaravska, Marko van Eekelen 1 Category: Research Abstract: We present a size-aware type system for a first-order functional language

More information

Amortized Heap-Space Analysis for First-Order Functional Programs

Amortized Heap-Space Analysis for First-Order Functional Programs Amortized Heap-Space Analysis for First-Order Functional Programs Olha Shkaravska Inst. of Cybernetics at Tallinn Univ. of Technology, Akadeemia tee 21, EE-12618 Tallinn, Estonia; shkarav@cs.ioc.ee Abstract

More information

The EmBounded Project

The EmBounded Project The EmBounded Project Kevin Hammond 1, Roy Dyckhoff 1, Reinhold Heckmann 2, Martin Hofmann 3, Hans-Wolfgang Loidl 3, Greg Michaelson 4, Jocelyn Sérot 5 and Andy Wallace 4 Abstract This paper introduces

More information

Proof-carrying Bytecode

Proof-carrying Bytecode Electronic Notes in Theoretical Computer Science 141 (2005) 3 18 www.elsevier.com/locate/entcs Proof-carrying Bytecode Stephen Gilmore and Matthew Prowse 1,2 Laboratory for Foundations of Computer Science

More information

Advances in Programming Languages

Advances in Programming Languages O T Y H Advances in Programming Languages APL8: ESC/Java2 David Aspinall (including slides by Ian Stark and material adapted from ESC/Java2 tutorial by David Cok, Joe Kiniry and Erik Poll) School of Informatics

More information

The Fox Project: Advanced Development of Systems Software

The Fox Project: Advanced Development of Systems Software The Fox Project: Advanced Development of Systems Software R&D Status Report July 1 to September 30, 1999 School of Computer Science Carnegie Mellon University Pittsburgh, PA 15213 19991222 022 This research

More information

Size Analysis of Algebraic Data Types

Size Analysis of Algebraic Data Types Chapter 16 Size Analysis of Algebraic Data Types Alejandro Tamalet, Olha Shkaravska, Marko van Eekelen 1 Category: Research Abstract: We present a size-aware type system for a first-order functional language

More information

Control Flow Analysis with SAT Solvers

Control Flow Analysis with SAT Solvers Control Flow Analysis with SAT Solvers Steven Lyde, Matthew Might University of Utah, Salt Lake City, Utah, USA Abstract. Control flow analyses statically determine the control flow of programs. This is

More information

5. Semantic Analysis!

5. Semantic Analysis! 5. Semantic Analysis! Prof. O. Nierstrasz! Thanks to Jens Palsberg and Tony Hosking for their kind permission to reuse and adapt the CS132 and CS502 lecture notes.! http://www.cs.ucla.edu/~palsberg/! http://www.cs.purdue.edu/homes/hosking/!

More information

Resource Aware ML. 1 Introduction. Jan Hoffmann 1, Klaus Aehlig 2, and Martin Hofmann 2

Resource Aware ML. 1 Introduction. Jan Hoffmann 1, Klaus Aehlig 2, and Martin Hofmann 2 Resource Aware ML Jan Hoffmann 1, Klaus Aehlig 2, and Martin Hofmann 2 1 Yale University 2 Ludwig-Maximilians-Universität München Abstract. The automatic determination of the quantitative resource consumption

More information

Runtime Checking for Program Verification Systems

Runtime Checking for Program Verification Systems Runtime Checking for Program Verification Systems Karen Zee, Viktor Kuncak, and Martin Rinard MIT CSAIL Tuesday, March 13, 2007 Workshop on Runtime Verification 1 Background Jahob program verification

More information

Master Thesis Project Plan. Reusable Mathematical Models

Master Thesis Project Plan. Reusable Mathematical Models Master Thesis Project Plan Reusable Mathematical Models Tobias K. Widmer widmer@id.ethz.ch Supervisors: Prof. Dr. B. Meyer B. Schoeller Chair of Software Engineering Department of Computer Science, ETH

More information

Typing in-place update

Typing in-place update Typing in-place update David Aspinall Martin Hofmann LFCS Edinburgh Institut für Informatik Munich Motivation and background Goal: use in-place update rather than fresh creation of memory cells and GC

More information

Functional Concepts in C++

Functional Concepts in C++ Trends in Functional Programming 2006 Nottingham Functional Concepts in C++ Rose H. Abdul Rauf, Anton Setzer, Ulrich Berger Swansea 1 Goal: Integrating Functional and Object-Oriented Programming A first

More information

The design of a programming language for provably correct programs: success and failure

The design of a programming language for provably correct programs: success and failure The design of a programming language for provably correct programs: success and failure Don Sannella Laboratory for Foundations of Computer Science School of Informatics, University of Edinburgh http://homepages.inf.ed.ac.uk/dts

More information

Static program checking and verification

Static program checking and verification Chair of Software Engineering Software Engineering Prof. Dr. Bertrand Meyer March 2007 June 2007 Slides: Based on KSE06 With kind permission of Peter Müller Static program checking and verification Correctness

More information

Simply-Typed Lambda Calculus

Simply-Typed Lambda Calculus #1 Simply-Typed Lambda Calculus #2 Back to School What is operational semantics? When would you use contextual (small-step) semantics? What is denotational semantics? What is axiomatic semantics? What

More information

A First-Order Logic with First-Class Types

A First-Order Logic with First-Class Types A First-Order Logic with First-Class Types joint work with Peter H. Schmitt and Mattias Ulbrich Institute for Theoretical Computer Science The 8th KeY Symposium, Speyer, 2009 Java Card DL modal logic based

More information

Java-MOP: A Monitoring Oriented Programming Environment for Java

Java-MOP: A Monitoring Oriented Programming Environment for Java Java-MOP: A Monitoring Oriented Programming Environment for Java Feng Chen and Grigore Roşu Department of Computer Science, University of Illinois at Urbana - Champaign, USA {fengchen, grosu}@uiuc.edu

More information

5. Semantic Analysis. Mircea Lungu Oscar Nierstrasz

5. Semantic Analysis. Mircea Lungu Oscar Nierstrasz 5. Semantic Analysis Mircea Lungu Oscar Nierstrasz Thanks to Jens Palsberg and Tony Hosking for their kind permission to reuse and adapt the CS132 and CS502 lecture notes. http://www.cs.ucla.edu/~palsberg/

More information

ait: WORST-CASE EXECUTION TIME PREDICTION BY STATIC PROGRAM ANALYSIS

ait: WORST-CASE EXECUTION TIME PREDICTION BY STATIC PROGRAM ANALYSIS ait: WORST-CASE EXECUTION TIME PREDICTION BY STATIC PROGRAM ANALYSIS Christian Ferdinand and Reinhold Heckmann AbsInt Angewandte Informatik GmbH, Stuhlsatzenhausweg 69, D-66123 Saarbrucken, Germany info@absint.com

More information

Java Modelling Language (JML) References

Java Modelling Language (JML) References Java Modelling Language (JML) References G. T. Leavens and Y. Cheon. Design by Contract with JML, August 2005. L. Burdy, Y. Cheon, D. Cok, M. Ernst, J. Kiniry, G. T. Leavens, K. R. M. Leino, and E. Poll.

More information

A GRAPHICAL TABULAR MODEL FOR RULE-BASED LOGIC PROGRAMMING AND VERIFICATION **

A GRAPHICAL TABULAR MODEL FOR RULE-BASED LOGIC PROGRAMMING AND VERIFICATION ** Formal design, Rule-based systems, Tabular-Trees Grzegorz J. NALEPA, Antoni LIGEZA A GRAPHICAL TABULAR MODEL FOR RULE-BASED LOGIC PROGRAMMING AND VERIFICATION ** New trends in development of databases

More information

Automatic Verification of Closures and Lambda-Functions in Python Master s Thesis Project Description

Automatic Verification of Closures and Lambda-Functions in Python Master s Thesis Project Description Automatic Verification of Closures and Lambda-Functions in Python Master s Thesis Project Description Benjamin Weber March 2017 Introduction Higher-order functions take other functions as parameters. Thus,

More information

Proof-Carrying-Code. Authentication for Mobile Code. Motivation. Certificate Size Size of the TCB Performance. Encoding Proofs Program Logics TCB Size

Proof-Carrying-Code. Authentication for Mobile Code. Motivation. Certificate Size Size of the TCB Performance. Encoding Proofs Program Logics TCB Size 1 Motivation Proof-Carrying-Code Hans-Wolfgang Loidl http://www.macs.hw.ac.uk/~hwloidl School of Mathematical and Computer Sciences Heriot-Watt University, Edinburgh 2 Basic Concepts 3 Main challenges

More information

Semantics of an Intermediate Language for Program Transformation

Semantics of an Intermediate Language for Program Transformation Semantics of an Intermediate Language for Program Transformation Sigurd Schneider Advisors: Sebastian Hack, Gert Smolka Student Session at POPL 2013 Saarland University Graduate School of Computer Science

More information

Formally Proved Anti-tearing Properties of Embedded C Code

Formally Proved Anti-tearing Properties of Embedded C Code Formally Proved Anti-tearing Properties of Embedded C Code June Andronick Security Labs Gemalto june.andronick@gemalto.com Abstract In smart card embedded programs, some operations must not be suddenly

More information

Incremental Reasoning for Multiple Inheritance

Incremental Reasoning for Multiple Inheritance Incremental Reasoning for Multiple Inheritance Johan Dovland and Einar Broch Johnsen Olaf Owe and Martin Steffen Institutt for Informatikk Universitet i Oslo ifm, Düsseldorf 17. February 2009 Context Late

More information

Conclusions and further reading

Conclusions and further reading Chapter 18 Conclusions and further reading We have not been exhaustive in the description of the Caml Light features. We only introduced general concepts in functional programming, and we have insisted

More information

CITS5501 Software Testing and Quality Assurance Formal methods

CITS5501 Software Testing and Quality Assurance Formal methods CITS5501 Software Testing and Quality Assurance Formal methods Unit coordinator: Arran Stewart May 1, 2018 1 / 49 Sources Pressman, R., Software Engineering: A Practitioner s Approach, McGraw-Hill, 2005

More information

Fine-grained Software Version Control Based on a Program s Abstract Syntax Tree

Fine-grained Software Version Control Based on a Program s Abstract Syntax Tree Master Thesis Description and Schedule Fine-grained Software Version Control Based on a Program s Abstract Syntax Tree Martin Otth Supervisors: Prof. Dr. Peter Müller Dimitar Asenov Chair of Programming

More information

Real-Time and Embedded Systems (M) Lecture 19

Real-Time and Embedded Systems (M) Lecture 19 Low-Level/Embedded Programming Real-Time and Embedded Systems (M) Lecture 19 Lecture Outline Hardware developments Implications on system design Low-level programming Automatic memory management Timing

More information

A Typed Calculus Supporting Shallow Embeddings of Abstract Machines

A Typed Calculus Supporting Shallow Embeddings of Abstract Machines A Typed Calculus Supporting Shallow Embeddings of Abstract Machines Aaron Bohannon Zena M. Ariola Amr Sabry April 23, 2005 1 Overview The goal of this work is to draw a formal connection between steps

More information

arxiv: v2 [cs.ds] 9 Apr 2009

arxiv: v2 [cs.ds] 9 Apr 2009 Pairing Heaps with Costless Meld arxiv:09034130v2 [csds] 9 Apr 2009 Amr Elmasry Max-Planck Institut für Informatik Saarbrücken, Germany elmasry@mpi-infmpgde Abstract Improving the structure and analysis

More information

JOURNAL OF OBJECT TECHNOLOGY

JOURNAL OF OBJECT TECHNOLOGY JOURNAL OF OBJECT TECHNOLOGY Online at www.jot.fm. Published by ETH Zurich, Chair of Software Engineering JOT, 2002 Vol. 1, No. 2, July-August 2002 The Theory of Classification Part 2: The Scratch-Built

More information

Programming Languages

Programming Languages CSE 230: Winter 2008 Principles of Programming Languages Ocaml/HW #3 Q-A Session Push deadline = Mar 10 Session Mon 3pm? Lecture 15: Type Systems Ranjit Jhala UC San Diego Why Typed Languages? Development

More information

Principles of Program Analysis. Lecture 1 Harry Xu Spring 2013

Principles of Program Analysis. Lecture 1 Harry Xu Spring 2013 Principles of Program Analysis Lecture 1 Harry Xu Spring 2013 An Imperfect World Software has bugs The northeast blackout of 2003, affected 10 million people in Ontario and 45 million in eight U.S. states

More information

INF5110 Compiler Construction

INF5110 Compiler Construction INF5110 Compiler Construction Introduction Spring 2016 1 / 33 Outline 1. Introduction Introduction Compiler architecture & phases Bootstrapping and cross-compilation 2 / 33 Outline 1. Introduction Introduction

More information

Qualitative Analysis of WorkFlow nets using Linear Logic: Soundness Verification

Qualitative Analysis of WorkFlow nets using Linear Logic: Soundness Verification Proceedings of the 2009 IEEE International Conference on Systems, Man, and Cybernetics San Antonio, TX, USA - October 2009 Qualitative Analysis of WorkFlow nets using Linear Logic: Soundness Verification

More information

The Why/Krakatoa/Caduceus Platform for Deductive Program Verication

The Why/Krakatoa/Caduceus Platform for Deductive Program Verication The Why/Krakatoa/Caduceus Platform for Deductive Program Verication Jean-Christophe Filliâtre 1,3 and Claude Marché 2,3 1 CNRS, Lab. de Recherche en Informatique, UMR 8623, Orsay, F-91405 2 INRIA Futurs,

More information

5. Semantic Analysis. Mircea Lungu Oscar Nierstrasz

5. Semantic Analysis. Mircea Lungu Oscar Nierstrasz 5. Semantic Analysis Mircea Lungu Oscar Nierstrasz Thanks to Jens Palsberg and Tony Hosking for their kind permission to reuse and adapt the CS132 and CS502 lecture notes. http://www.cs.ucla.edu/~palsberg/

More information

A Type System for Functional Traversal-Based Aspects

A Type System for Functional Traversal-Based Aspects A Type System for Functional Traversal-Based Aspects Bryan Chadwick and Karl Lieberherr March 2 nd 2009 1 / 30 Outline Introduction Example (Pure) Semantics Example (Full Dispatch) Type System Soundness

More information

An Eclipse-based Integrated Environment for Developing Executable Structural Operational Semantics Specifications

An Eclipse-based Integrated Environment for Developing Executable Structural Operational Semantics Specifications SOS 2006 Preliminary Version An Eclipse-based Integrated Environment for Developing Executable Structural Operational Semantics Specifications Adrian Pop 1,2 Peter Fritzson 3 Programming Environments Laboratory

More information

Static analysis and testing of executable DSL specification

Static analysis and testing of executable DSL specification Static analysis and testing of executable DSL specification Qinan Lai 1, Andy Carpenter 1 1 School of Computer Science, the University of Manchester, Manchester, UK {laiq,afc}@cs.man.ac.uk Keywords: Abstract:

More information

Compiler Construction

Compiler Construction Compiler Construction WWW: http://www.cs.uu.nl/wiki/cco Contact: J.Hage@uu.nl Edition 2016/2017 Course overview 2 What is compiler construction about? Programs are usually written in a high-level programming

More information

Preliminary Design of BML: A Behavioral Interface Specification Language for Java Bytecode

Preliminary Design of BML: A Behavioral Interface Specification Language for Java Bytecode Preliminary Design of BML: A Behavioral Interface Specification Language for Java Bytecode Lilian Burdy, Marieke Huisman 1,andMarielaPavlova 2, 1 INRIA Sophia Antipolis, France 2 Ludwig-Maximilians-Universität

More information

Fast and Simple Algorithms for Weighted Perfect Matching

Fast and Simple Algorithms for Weighted Perfect Matching Fast and Simple Algorithms for Weighted Perfect Matching Mirjam Wattenhofer, Roger Wattenhofer {mirjam.wattenhofer,wattenhofer}@inf.ethz.ch, Department of Computer Science, ETH Zurich, Switzerland Abstract

More information

XACML Function Annotations

XACML Function Annotations XACML Function Annotations Prathima Rao Dan Lin Elisa Bertino Department of Computer Science Purdue University {prao,lindan,bertino}@cs.purdue.edu Abstract XACML is being increasingly adopted in large

More information

Principles of Compiler Construction ( )

Principles of Compiler Construction ( ) Principles of Compiler Construction ( ) Dr Mayer Goldberg October 25, 2017 Contents 1 Course Objectives 1 2 Course Requirements 2 3 Detailed Syllabus 3 4 Computation of grade 6 5 References 6 Course number:

More information

Extracting the Range of cps from Affine Typing

Extracting the Range of cps from Affine Typing Extracting the Range of cps from Affine Typing Extended Abstract Josh Berdine, Peter W. O Hearn Queen Mary, University of London {berdine, ohearn}@dcs.qmul.ac.uk Hayo Thielecke The University of Birmingham

More information

Resolving of Intersection Types in Java

Resolving of Intersection Types in Java Resolving of Intersection Types in Java Martin Plümicke University of Cooperative Education Stuttgart Department of Information Technology Florianstraße 15, D 72160 Horb m.pluemicke@ba-horb.de Abstract.

More information

How Efficient Can Fully Verified Functional Programs Be - A Case Study of Graph Traversal Algorithms

How Efficient Can Fully Verified Functional Programs Be - A Case Study of Graph Traversal Algorithms How Efficient Can Fully Verified Functional Programs Be - A Case Study of Graph Traversal Algorithms Mirko Stojadinović Faculty of Mathematics, University of Belgrade Abstract. One approach in achieving

More information

Timing Analysis of Parallel Software Using Abstract Execution

Timing Analysis of Parallel Software Using Abstract Execution Timing Analysis of Parallel Software Using Abstract Execution Björn Lisper School of Innovation, Design, and Engineering Mälardalen University bjorn.lisper@mdh.se 2014-09-10 EACO Workshop 2014 Motivation

More information

the application rule M : x:a: B N : A M N : (x:a: B) N and the reduction rule (x: A: B) N! Bfx := Ng. Their algorithm is not fully satisfactory in the

the application rule M : x:a: B N : A M N : (x:a: B) N and the reduction rule (x: A: B) N! Bfx := Ng. Their algorithm is not fully satisfactory in the The Semi-Full Closure of Pure Type Systems? Gilles Barthe Institutionen for Datavetenskap, Chalmers Tekniska Hogskola, Goteborg, Sweden Departamento de Informatica, Universidade do Minho, Braga, Portugal

More information

Embedding Cryptol in Higher Order Logic

Embedding Cryptol in Higher Order Logic Embedding Cryptol in Higher Order Logic Joe Hurd Computer Laboratory Cambridge University joe.hurd@cl.cam.ac.uk 10 March 2007 Abstract This report surveys existing approaches to embedding Cryptol programs

More information

A Type System for Object Initialization In the Java TM Bytecode Language

A Type System for Object Initialization In the Java TM Bytecode Language Electronic Notes in Theoretical Computer Science 10 (1998) URL: http://www.elsevier.nl/locate/entcs/volume10.html 7 pages A Type System for Object Initialization In the Java TM Bytecode Language Stephen

More information

An Approach to the Generation of High-Assurance Java Card Applets

An Approach to the Generation of High-Assurance Java Card Applets An Approach to the Generation of High-Assurance Java Card Applets Alessandro Coglio Kestrel Institute 3260 Hillview Avenue, Palo Alto, CA 94304, USA Ph. +1-650-493-6871 Fax +1-650-424-1807 http://www.kestrel.edu/

More information

Formal Methods for Java

Formal Methods for Java Formal Methods for Java Lecture 30: Conclusion Jochen Hoenicke Software Engineering Albert-Ludwigs-University Freiburg Feb 17, 2012 Jochen Hoenicke (Software Engineering) FM4J Feb 17, 2012 1 / 21 Topics

More information

Program Verification (6EC version only)

Program Verification (6EC version only) Program Verification (6EC version only) Erik Poll Digital Security Radboud University Nijmegen Overview Program Verification using Verification Condition Generators JML a formal specification language

More information

Beluga: A Framework for Programming and Reasoning with Deductive Systems (System Description)

Beluga: A Framework for Programming and Reasoning with Deductive Systems (System Description) Beluga: A Framework for Programming and Reasoning with Deductive Systems (System Description) Brigitte Pientka and Joshua Dunfield McGill University, Montréal, Canada {bpientka,joshua}@cs.mcgill.ca Abstract.

More information

A Certified Non-Interference Java Bytecode Verifier

A Certified Non-Interference Java Bytecode Verifier 1 A Certified Non-Interference Java Bytecode Verifier G. Barthe, D. Pichardie and T. Rezk, A Certified ightweight Non-Interference Java Bytecode Verifier, ESOP'07 2 Motivations 1: bytecode verification

More information

Note that in this definition, n + m denotes the syntactic expression with three symbols n, +, and m, not to the number that is the sum of n and m.

Note that in this definition, n + m denotes the syntactic expression with three symbols n, +, and m, not to the number that is the sum of n and m. CS 6110 S18 Lecture 8 Structural Operational Semantics and IMP Today we introduce a very simple imperative language, IMP, along with two systems of rules for evaluation called small-step and big-step semantics.

More information

F-Soft: Software Verification Platform

F-Soft: Software Verification Platform F-Soft: Software Verification Platform F. Ivančić, Z. Yang, M.K. Ganai, A. Gupta, I. Shlyakhter, and P. Ashar NEC Laboratories America, 4 Independence Way, Suite 200, Princeton, NJ 08540 fsoft@nec-labs.com

More information

Simulation of Timed Input/Output Automata

Simulation of Timed Input/Output Automata Simulation of Timed Input/Output Automata M.Eng Thesis Proposal Panayiotis P. Mavrommatis December 13, 2005 Abstract This proposal describes the design of the TIOA Simulator, a vital component of the TIOA

More information

COS 320. Compiling Techniques

COS 320. Compiling Techniques Topic 5: Types COS 320 Compiling Techniques Princeton University Spring 2016 Lennart Beringer 1 Types: potential benefits (I) 2 For programmers: help to eliminate common programming mistakes, particularly

More information

Resource Usage Analysis and its Application to Resource Certification (Part I)

Resource Usage Analysis and its Application to Resource Certification (Part I) Resource Usage Analysis and its Application to Resource Certification (Part I) Germán Puebla 1 joint work with Elvira Albert 2, Puri Arenas 2, Samir Genaim 2, and Damiano Zanardini 1 1 Technical University

More information

Chapter 1. Introduction

Chapter 1. Introduction 1 Chapter 1 Introduction An exciting development of the 21st century is that the 20th-century vision of mechanized program verification is finally becoming practical, thanks to 30 years of advances in

More information

Lecture 10 Design by Contract

Lecture 10 Design by Contract CS 5959 Writing Solid Code Fall 2015 Nov-23 Lecture 10 Design by Contract Zvonimir Rakamarić University of Utah Design by Contract Also called assume-guarantee reasoning Developers annotate software components

More information

1. true / false By a compiler we mean a program that translates to code that will run natively on some machine.

1. true / false By a compiler we mean a program that translates to code that will run natively on some machine. 1. true / false By a compiler we mean a program that translates to code that will run natively on some machine. 2. true / false ML can be compiled. 3. true / false FORTRAN can reasonably be considered

More information

Data-Flow Analysis Foundations

Data-Flow Analysis Foundations CS 301 Spring 2016 Meetings April 11 Data-Flow Foundations Plan Source Program Lexical Syntax Semantic Intermediate Code Generation Machine- Independent Optimization Code Generation Target Program This

More information

Formal Methods for Assuring Security of Computer Networks

Formal Methods for Assuring Security of Computer Networks for Assuring of Computer Networks May 8, 2012 Outline Testing 1 Testing 2 Tools for formal methods Model based software development 3 Principals of security Key security properties Assessing security protocols

More information

Idris, a language with dependent types Extended Abstract

Idris, a language with dependent types Extended Abstract Idris, a language with dependent types Extended Abstract Edwin Brady School of Computer Science, University of St Andrews, St Andrews, Scotland. Email: eb@cs.st-andrews.ac.uk. Tel: +44-1334-463253, Fax:

More information

Eliminating Annotations by Automatic Flow Analysis of Real-Time Programs

Eliminating Annotations by Automatic Flow Analysis of Real-Time Programs Eliminating Annotations by Automatic Flow Analysis of Real-Time Programs Jan Gustafsson Department of Computer Engineering, Mälardalen University Box 883, S-721 23 Västerås, Sweden jangustafsson@mdhse

More information

which a value is evaluated. When parallelising a program, instances of this class need to be produced for all the program's types. The paper commented

which a value is evaluated. When parallelising a program, instances of this class need to be produced for all the program's types. The paper commented A Type-Sensitive Preprocessor For Haskell Noel Winstanley Department of Computer Science University of Glasgow September 4, 1997 Abstract This paper presents a preprocessor which generates code from type

More information

How useful is the UML profile SPT without Semantics? 1

How useful is the UML profile SPT without Semantics? 1 How useful is the UML profile SPT without Semantics? 1 Susanne Graf, Ileana Ober VERIMAG 2, avenue de Vignate - F-38610 Gières - France e-mail:{susanne.graf, Ileana.Ober}@imag.fr http://www-verimag.imag.fr/~{graf,iober}

More information

TVLA: A SYSTEM FOR GENERATING ABSTRACT INTERPRETERS*

TVLA: A SYSTEM FOR GENERATING ABSTRACT INTERPRETERS* TVLA: A SYSTEM FOR GENERATING ABSTRACT INTERPRETERS* Tal Lev-Ami, Roman Manevich, and Mooly Sagiv Tel Aviv University {tla@trivnet.com, {rumster,msagiv}@post.tau.ac.il} Abstract TVLA (Three-Valued-Logic

More information

Unlabeled equivalence for matroids representable over finite fields

Unlabeled equivalence for matroids representable over finite fields Unlabeled equivalence for matroids representable over finite fields November 16, 2012 S. R. Kingan Department of Mathematics Brooklyn College, City University of New York 2900 Bedford Avenue Brooklyn,

More information

Typestate Checking for Actionscript 3

Typestate Checking for Actionscript 3 Typestate Checking for Actionscript 3 Yun-En Liu and Qi Shan December 10, 2010 1 Introduction This project proposes a compile-time check for function calls in a game system written in Actionscript 3, based

More information

CSCI-GA Scripting Languages

CSCI-GA Scripting Languages CSCI-GA.3033.003 Scripting Languages 12/02/2013 OCaml 1 Acknowledgement The material on these slides is based on notes provided by Dexter Kozen. 2 About OCaml A functional programming language All computation

More information

Principles of Compiler Construction ( )

Principles of Compiler Construction ( ) Principles of Compiler Construction ( ) Dr Mayer Goldberg September 5, 2016 Contents 1 Course Objectives 1 2 Course Requirements 2 3 Detailed Syllabus 3 4 References 6 Course number: 201-1-2061 Mandatory

More information

Functional Programming in Coq. Nate Foster Spring 2018

Functional Programming in Coq. Nate Foster Spring 2018 Functional Programming in Coq Nate Foster Spring 2018 Review Previously in 3110: Functional programming Modular programming Data structures Interpreters Next unit of course: formal methods Today: Proof

More information

Advances in Programming Languages

Advances in Programming Languages T O Y H Advances in Programming Languages APL4: JML The Java Modeling Language David Aspinall (slides originally by Ian Stark) School of Informatics The University of Edinburgh Thursday 21 January 2010

More information

Rectangular Matrix Multiplication Revisited

Rectangular Matrix Multiplication Revisited JOURNAL OF COMPLEXITY, 13, 42 49 (1997) ARTICLE NO. CM970438 Rectangular Matrix Multiplication Revisited Don Coppersmith IBM Research, T. J. Watson Research Center, Yorktown Heights, New York 10598 Received

More information

Precise Analysis of Memory Consumption using Program Logics

Precise Analysis of Memory Consumption using Program Logics Precise Analysis of Memory Consumption using Program Logics Gilles Barthe INRIA Sophia Antipolis, France Gilles.Barthe@sophia.inria.fr Mariela Pavlova INRIA Sophia Antipolis, France Mariela.Pavlova@sophia.inria.fr

More information

Exploring the Design Space of Higher-Order Casts ; CU-CS

Exploring the Design Space of Higher-Order Casts ; CU-CS University of Colorado, Boulder CU Scholar Computer Science Technical Reports Computer Science Fall 10-1-2008 Exploring the Design Space of Higher-Order Casts ; CU-CS-1047-08 Jeremy Siek University of

More information

Compiler Construction Lecture 1: Introduction Summer Semester 2017 Thomas Noll Software Modeling and Verification Group RWTH Aachen University

Compiler Construction Lecture 1: Introduction Summer Semester 2017 Thomas Noll Software Modeling and Verification Group RWTH Aachen University Compiler Construction Thomas Noll Software Modeling and Verification Group RWTH Aachen University https://moves.rwth-aachen.de/teaching/ss-17/cc/ Preliminaries People Lectures: Thomas Noll (noll@cs.rwth-aachen.de)

More information

Compiler Construction

Compiler Construction Compiler Construction Lecture 1: Introduction Thomas Noll Lehrstuhl für Informatik 2 (Software Modeling and Verification) noll@cs.rwth-aachen.de http://moves.rwth-aachen.de/teaching/ss-14/cc14/ Summer

More information

Flexible Coloring. Xiaozhou Li a, Atri Rudra b, Ram Swaminathan a. Abstract

Flexible Coloring. Xiaozhou Li a, Atri Rudra b, Ram Swaminathan a. Abstract Flexible Coloring Xiaozhou Li a, Atri Rudra b, Ram Swaminathan a a firstname.lastname@hp.com, HP Labs, 1501 Page Mill Road, Palo Alto, CA 94304 b atri@buffalo.edu, Computer Sc. & Engg. dept., SUNY Buffalo,

More information

Java Bytecode Specification and Verification

Java Bytecode Specification and Verification Java Bytecode Specification and Verification Lilian Burdy INRIA Sophia-Antipolis 2004, Route des Lucioles, BP 93, 06902 Sophia-Antipolis, France Lilian.Burdy@sophia.inria.fr Mariela Pavlova INRIA Sophia-Antipolis

More information

Verifying JML specifications with model fields

Verifying JML specifications with model fields Verifying JML specifications with model fields Cees-Bart Breunesse and Erik Poll Department of Computer Science, University of Nijmegen Abstract. The specification language JML (Java Modeling Language)

More information

Convex Hull of the Union of Convex Objects in the Plane: an Adaptive Analysis

Convex Hull of the Union of Convex Objects in the Plane: an Adaptive Analysis CCCG 2008, Montréal, Québec, August 13 15, 2008 Convex Hull of the Union of Convex Objects in the Plane: an Adaptive Analysis Jérémy Barbay Eric Y. Chen Abstract We prove a tight asymptotic bound of Θ(δ

More information

! Broaden your language horizons. ! Study how languages are implemented. ! Study how languages are described / specified

! Broaden your language horizons. ! Study how languages are implemented. ! Study how languages are described / specified Course Goal CMSC 330: Organization of Programming Languages Introduction Instructors: Mike Hicks, Chau-Wen Tseng TAs: Srividya Ramaswamy, Eylul Dogruel, Khoa Doan Learn how programming languages work!

More information

Compiler construction

Compiler construction Compiler construction Martin Steffen January 16, 2017 Contents 1 Abstract 1 1.1 Introduction............................................... 1 1.1.1 Introduction..........................................

More information

Handling Integer Arithmetic in the Verification of Java Programs

Handling Integer Arithmetic in the Verification of Java Programs Handling Integer Arithmetic in the Verification of Java Programs Steffen Schlager 1st Swedish-German KeY Workshop Göteborg, Sweden, June 2002 KeY workshop, June 2002 p.1 Introduction UML/OCL specification

More information

A Type System for Functional Traversal-Based Aspects

A Type System for Functional Traversal-Based Aspects A Type System for Functional Traversal-Based Aspects Bryan Chadwick College of Computer & Information Science Northeastern University, 360 Huntington Avenue Boston, Massachusetts 02115 USA chadwick@ccs.neu.edu

More information

Submitted to the Onward track of OOPSLA-03 ABSTRACT. Keywords

Submitted to the Onward track of OOPSLA-03 ABSTRACT. Keywords GUI Environments for Functional Languages Daniel J. Pless & George F. Luger University of New Mexico, Computer Science Ferris Engineering Center Albuquerque, NM 87131 (505) 277-9424 {dpless,luger}@cs.unm.edu

More information