Java PathFinder JPF 2 Second Generation of Java Model Checker

Size: px
Start display at page:

Download "Java PathFinder JPF 2 Second Generation of Java Model Checker"

Transcription

1 Java PathFinder JPF 2 Second Generation of Java Model Checker Guenther Brand Mat. Nr Abstract This essay is based on the papers Java PathFinder, Second Generation of Java Model Checker and Model Checking Programs, both written by Guillaumme Brat, Klaus Havelund, SeungJoon Park and Willem Visser. They describe a verification and testing environment for Java, the Java PathFinder (JPF), that integrates model checking, program analyses and testing. JPF uses state compression, partial order reduction, slicing, abstraction, and runtime analysis techniques. The first developed Java model checker, the Java PathFinder 1 (JPF1), was highly successful in finding errors in complex Java programs. However, it could not handle features like floating point numbers. Furthermore the complete Java source code is required. JPF2 solves this problems, because it works directly on Java bytecode. 0

2 1 Motivation The usual approach of model checking is to extract portions of the code, create a model, and then check that model. But this has the drawback that it requires expertise in the use of model checking tools. The first Java model ckecker, the Java PathFinder 1 (JPF1), automatically translated from Java source code to PROMELA in order to do model checking. JPF1 was highly successful in finding errors in complex Java programs. However, it could not handle specific features that were not supported by PROMELA, for example floating point numbers. Furthermore, all the Java source code is required to be available which is for example not the case if libraries are used. In order to solve this problems a new Java model checker, JPF2, was built. JPF2 works directly on Java bytecode, Model checking often suffers from the state-explosion problem. In order to alleviate some of this problems abstraction, static analysis, and runtime analysis are used. 2 Introduction With the Java PathFinder (JPF), an expicit-state model checker for Java programs, a verification, analysis and testing environment has been developed. It combines model checking techiques and techniques for dealing with large or infinite state spaces. These techniques include static analysis, predicate abstraction, and runtime analyses. The JPF itself is written in Java and contains a therefore new built Java Virtual Machine (MC-JVM) that interprets Java bytecode. The MC-JVM, suitable for model checking, requires efficient memory management rather than blistering speed. Currently, JPF can only check invariants and deadlocks. An invariant is specified as a Java method that returns a boolean value - this method can examine the contents of the memory of the program as well as special-purpose methods provided by the MC-JVM. The model checker consists of two parts: the MC-JVM that executes the bytecode and a depth-first algorithm that does the actual traversal of the state-graph of the program. Both the MC-JVM and the traversal algorithm are written in Java and hence executed by a commercial available JVM. The output of the model checker is whether or not the invariant holds, or the program is deadlock free - and in negative case a counter example is produced. Some of the novel features of MC-JVM are: Canonical Heap Representation: Regardless of which interleaving of statements is executed, memory will always be allocated in the same memory locations. This reduces the size of state-space. Garbage Collection: The MC-JVM has its own garbage colletion scheme, since without it statespace would grow to infinite. Nondeterminism: The MC-JVM traps certain method calls having nondeterministic behavior, namely Verify.Random(i) and Verify.RandomBool(). Atomicity: The level of atomicity during execution can be set to be one bytecode instruction, the bytecodes for one Java instruction, the bytecodes for one line of Java code or all bytecodes in a block of Java code. Structured State: Each state is highly structured, since it is consisting of a number of different Java classes. 2.1 Why Analyze Code? It is often argued that verification technologies should be applied to designs rather than to programs since catching errors early at the design level will reduce maintenance costs later on. However, there is a number of reasons for using formal methods on programs: 1

3 Programs often contain fatal errors, deadlocks and critical section violations for example, in spite of the existing of careful design, because design typically do not deal with them. Any research result on programming languages can benefit design verification since designs typically are less complex. Studying verification of real programs may drive the research into new areas. It is believed to be advantageous for formal methods to be combined with research fields more focused on programs, such as program analysis and testing. There may be some derived advantages for formal methods due to the fact that there is a tendency to standardize programming languages. 3 Model Checking Java Programs With Java the capability of writing concurrent programs, which is known as non-trivial, is given to everyone, so a model checker for Java might have a bright future. 3.1 Complexity of Language Constructs To allow efficient processing during model checking the input languages for model checker are often kept relatively simple. General programming lanugages, however, contain new features like classes, dynamic memory allocation, exceptions, floating point numbers, method calls, and so on, never seen in model checking input languages. To treat this there are three solutions pursued: Translation The new features are translated to existing ones. For example JPF1 and the JCAT system were base on a translation from Java to PROMELA. But there are two serious drawbacks: Each new feature in the source language must be coverd by a counterpart in the destination language (which in the case of Java and PROMELA is not true). And the original source code is required, which is often not the case. This can be overcome by rather doing a translation from bytecodes. Custom-made Model Checker In order to overcome the language coverage problem either the current model checkers need to be extended, or a new custom-made model checker must be developed. With JPF2 a new model-checker has been developed that can execute all the bytecode instructions, and hence allow the whole of Java to be model checked. It consists of an own Java Virtual Machine (MC-JVM) that executes the bytecodes and a search component that guides the execution. The current model checker can check for deadlocks, invariants and user-defined assertions in the code; temporal logic model checking will be added in the near future. Combination A combination of translation and a new/extended model checker is used. 3.2 Complex States In order to ensure termination during explicit state model checking it must be known when a sate is revisited. It is common for a hashtable to be used to store states, which means an efficient hash function is required as well as fast state comparison. In the JPF2 approach the states of the JVM are kept in a complex data-structure in order to determine if they have been visited before. Each state consists of three components: information for each thread in the Java program, the static varaibles and the dynamic variables in the system. The information of each thread consists of a stack of frames, one for each method called, whereas the static and dynamic information consists of information about the locks for the classes/objects and the fields in the classes/objects. 2

4 To make the storing of states more efficient each component of the JVM state is stored seperately in a table, and the index at which the component is stored is then used to represent the component. This has the effect of encoding a large structure into no more than an integer. Fast state comparison is possible, because only the indeces need to be compared and not the structures themselves. JPF in its current state already illustrates that software systems with complex states can be efficiency analyzed. 4 Curbing the State-explosion Maybe the most challenging part of model checking is reducing the size of the state-space to something that could be handled. So model checking is augmented with information gathered from other techniques in order to handle large programs. Specifically, abstract interpretation, static analysis and runtime analysis is used for more efficient model checking of Java programs. 4.1 Abstraction The basic idea underlying abstraction algorithms is that user specifies an abstraction function for certain parts of the data-domain of a system, and the model checking system then either automatically generates a state-graph over the abstract data or automatically generates an abstract system, that manipulates the abstract data. Ths generation of the state-graph can be more precise at the price of calling the decision procedures troughout the model checking process. An automated abstraction tool, that takes a Java program as input and, by using the Stanford Validity Checker (SVC), has been developed. With respect to user-defined predicates, another (abstract) Java program that operates on the abstract predicates will be generated. For example: x++ x == 0 Abstract.addBoolean( B, x == 0) if (B) then B = false else B = Verify.randomBool() original statement abstraction predicate (in code) abstracted code The abstraction tool is designed for object-oriented programs and the user can specify abstraction criteria. It can be used for abstracting subcomponents in a program and the user can specify abstract variables which depend on variables from different classes (inner-class abstraction). 4.2 Static Analysis Static analysis as program reduction technique has a wide range in software engineering. Specifically, slicing can be a useful way of reducing program size to allow more efficient model checking. JPF uses the slicing tool of the BANDERA toolset to reduce Java programs. The slicing criteria are automatically extracted. JPF also uses static analysis to compute information to perform partial-order reduction during model checking. Partial-order reduction techniques ensure that only one interleaving of independent statements is executed within the model checker and achieve an enormous state-space reduction. Model checking of program will not be tractable in general if partial-order reductions are not suppurted. 4.3 Runtime Analysis Runtime analysis is conceptually based on the idea of executing the program once, while observing the generated execution trace to extract various kinds of information. This information can then be 3

5 used to predict whether this trace or other different execution traces may violate some properties of interest. These algorithms typically will not guarantee that errors are found since they work on an arbitrary trace. They also may yield false positives. However, such algorithms scale very well, and they often catch the problems they are designed to. An example implemented in JPF is the data race detection algorithm Eraser. A data race occurs when two concurrent threads access a shared variable and when at least one access is a write, and the threads use no explicit mechanism to prevent from simultaneous accesses. Another example of runtime analysis algorithm is the locking order algorithm, which looks for potential deadlocks by detecting differences in the order in which threads take locks. A classical deadlock situation can occur then one thread accesses two locks in one order, while another thread accesses then in the reverse order. The algorithm searches for the violation of such orderings. Runtime analysis can be used in two models within JPF. It can first of all be used stand-alone in simulation mode. Second, runtime analysis can be used to guide the model chekcer. 5 Example: The Remote Agent Spacecraft Controller The Remote Agent (RA) is an AI-based spacecraft controller that has been developed at NASA Ames Research Center. It consists of three conponentes: a Planner that generates plans from mission goals; an Executive that executes the plans; and finally a Recovery system that monitors the RAs status, and suggests recovery actions in case of failures. Hence, the Executive contains multi-threaded features and exchanges interactive messages with the Planner, this system is highly vulnerable to multi-threaded errors. On this system a combination of code review, abstraction, and model checking to identify a known error has been applied. In the following there will be described the abstraction and the runtime analysis to reduce the state-space in order to find the known error in the RA. The major two components to be modeled were events and tasks: class Event int count = 0; public synchronized void wait_for_event() try wait(); catch( InterruptedException e ) ; public synchronized void signal_event() count = count + 1; notifyall(); class Planner extends Thread Event event1, event2; int count = 0; public void run() count = event1.count; while( true ) if( count == event1.count ) event1.wait_for_event(); count = event1.count; 4

6 /* Generate plan */ event2.signal_event(); 5.1 Applying Abstraction Due to the repeated increment of the count variable the program has theoretically infinitely many reachable states. To remove this Abstract.remove(counter) has been specified and for instance Abstract.addBoolean( EQ, count == event1.count ) has been put in the definition of the class Planner. With this annotations a new abstracted program is generated by the abstraction tool. JPF thereafter reveals a deadlock in this abstracted program. The solution is to enclose the conditional wait in a critical section such that no events can occur in between the test and the wait. 5.2 Applying Runtime Analysis The abstract Java model was created based on a suspicion about the source of the error obtained during code review. The source of the error, a missing critical section, could, however, have been found atomatically using the Eraser data detection algorithm. The variable count is accessed unsynchronized by the by run method in the class Planner. When running JPF in Eraser mode it detects this race condition immediately. To illustrate JPFs integration of runtime analysis and model checking, extra threads had been added to make it slightly more realistic, so that it had more than states. JPF applied in runtime analysis mode immediately identified the race condition. This illustrates the philosophy of integrating techniques from different disciplines: abstraction turns an infinite program to a finite one, slicing reduces it, and the model checker analyzes the result. 6 Conclusions So it has been depicted why sofware engineering should devote some efforts in using formal methods to the analysis of systems in real programming languages. It also has been described how this philosophy had been applied to the analysis of Java programs. Furthermore it has been shown that augmenting model checking with abstraction, static analysis and runtime analysis can lead to efficient analysis of complex (Java) software. Since there is drawing on different techniques and the synergy between them it should be clear that many areas for future research exists. 5

Model Checking Programs

Model Checking Programs Automated Software Engineering, 10, 203 232, 2003 c 2003 Kluwer Academic Publishers. Manufactured in The Netherlands. Model Checking Programs WILLEM VISSER RIACS/NASA Ames Research Center, Moffet Field,

More information

Model Checking Programs

Model Checking Programs Model Checking Programs Guillaume Brat and Klaus Havelund RECOM/NASA Ames Research Center fhavelund,bratg@ptolemy.arc.nasa.gov SeungJoon Park and Willem Visser RIACS/NASA Ames Research Center fwvisser,sparkg@ptolemy.arc.nasa.gov

More information

Java Pathfinder. State of Affairs. Pavel Parizek. School of Computer Science, University of Waterloo

Java Pathfinder. State of Affairs. Pavel Parizek. School of Computer Science, University of Waterloo Java Pathfinder General Overview and Current State of Affairs School of Computer Science, University of Waterloo Java Pathfinder Highly customizable and extensible platform for analysis and verification

More information

Java PathFinder. Pavel Parízek. CHARLES UNIVERSITY IN PRAGUE faculty of mathematics and physics

Java PathFinder. Pavel Parízek.  CHARLES UNIVERSITY IN PRAGUE faculty of mathematics and physics Java PathFinder http://d3s.mff.cuni.cz Pavel Parízek CHARLES UNIVERSITY IN PRAGUE faculty of mathematics and physics Java PathFinder (JPF) Verification framework for Java programs Explicit state space

More information

JPF SE: A Symbolic Execution Extension to Java PathFinder

JPF SE: A Symbolic Execution Extension to Java PathFinder JPF SE: A Symbolic Execution Extension to Java PathFinder Saswat Anand 1,CorinaS.Păsăreanu 2, and Willem Visser 2 1 College of Computing, Georgia Institute of Technology saswat@cc.gatech.edu 2 QSS and

More information

Verification of Intelligent Software

Verification of Intelligent Software Verification of Intelligent Software Charles Pecheur (RIACS / NASA Ames) Charles Pecheur 2003 1 Contents Model Checking for Intelligent Software Why? Intelligent software, how to verify it? What? A bird's-eye

More information

Model Requirements and JAVA Programs MVP 2 1

Model Requirements and JAVA Programs MVP 2 1 Model Requirements and JAVA Programs MVP 2 1 Traditional Software The Waterfall Model Problem Area Development Analysis REVIEWS Design Implementation Costly wrt time and money. Errors are found too late

More information

Lecture 12: Software Verification Using Explicit State Model Checking, Java Path Finder, CMC

Lecture 12: Software Verification Using Explicit State Model Checking, Java Path Finder, CMC CS 267: Automated Verification Lecture 12: Software Verification Using Explicit State Model Checking, Java Path Finder, CMC Instructor: Tevfik Bultan Software s Chronic Crisis Large software systems often:

More information

VyrdMC: Driving Runtime Refinement Checking with Model Checkers

VyrdMC: Driving Runtime Refinement Checking with Model Checkers Electronic Notes in Theoretical Computer Science 144 (2006) 41 56 www.elsevier.com/locate/entcs VyrdMC: Driving Runtime Refinement Checking with Model Checkers Tayfun Elmas 1 Serdar Tasiran 2 College of

More information

Model Checking with Abstract State Matching

Model Checking with Abstract State Matching Model Checking with Abstract State Matching Corina Păsăreanu QSS, NASA Ames Research Center Joint work with Saswat Anand (Georgia Institute of Technology) Radek Pelánek (Masaryk University) Willem Visser

More information

a major hurdle in applying model checking to software. Recent

a major hurdle in applying model checking to software. Recent Finding Feasible Counter-examples when Model Checking Abstracted Java Programs? Corina S. P as areanu 1, Matthew B. Dwyer 1, and Willem Visser 2 1 Department of Computing and Information Sciences, Kansas

More information

Symbolic Execution, Dynamic Analysis

Symbolic Execution, Dynamic Analysis Symbolic Execution, Dynamic Analysis http://d3s.mff.cuni.cz Pavel Parízek CHARLES UNIVERSITY IN PRAGUE faculty of mathematics and physics Symbolic execution Pavel Parízek Symbolic Execution, Dynamic Analysis

More information

Reachability testing for concurrent programs. Yu Lei and Richard Carver Presented by Thuan Huynh

Reachability testing for concurrent programs. Yu Lei and Richard Carver Presented by Thuan Huynh Reachability testing for concurrent programs Yu Lei and Richard Carver Presented by Thuan Huynh Introduction Some existing tools Reachability testing Concepts Algorithm Implementation Optimizations Results

More information

Promela and SPIN. Mads Dam Dept. Microelectronics and Information Technology Royal Institute of Technology, KTH. Promela and SPIN

Promela and SPIN. Mads Dam Dept. Microelectronics and Information Technology Royal Institute of Technology, KTH. Promela and SPIN Promela and SPIN Mads Dam Dept. Microelectronics and Information Technology Royal Institute of Technology, KTH Promela and SPIN Promela (Protocol Meta Language): Language for modelling discrete, event-driven

More information

Instrumentation of Java Bytecode for Runtime Analysis

Instrumentation of Java Bytecode for Runtime Analysis Instrumentation of Java Bytecode for Runtime Analysis Allen Goldberg and Klaus Havelund Kestrel Technology, NASA Ames Research Center Moffett Field, MS 269-3, California USA Phone: 650-604-4858, Email:

More information

Concurrency in Java Prof. Stephen A. Edwards

Concurrency in Java Prof. Stephen A. Edwards Concurrency in Java Prof. Stephen A. Edwards The Java Language Developed by James Gosling et al. at Sun Microsystems in the early 1990s Originally called Oak, first intended application was as an OS for

More information

i219 Software Design Methodology 11. Software model checking Kazuhiro Ogata (JAIST) Outline of lecture

i219 Software Design Methodology 11. Software model checking Kazuhiro Ogata (JAIST) Outline of lecture i219 Software Design Methodology 11. Software model checking Kazuhiro Ogata (JAIST) Outline of lecture 2 Concurrency Model checking Java Pathfinder (JPF) Detecting race condition Bounded buffer problem

More information

Specification Centered Testing

Specification Centered Testing Specification Centered Testing Mats P. E. Heimdahl University of Minnesota 4-192 EE/CS Building Minneapolis, Minnesota 55455 heimdahl@cs.umn.edu Sanjai Rayadurgam University of Minnesota 4-192 EE/CS Building

More information

Finding Concurrency Bugs in Java

Finding Concurrency Bugs in Java July 25, 2004 Background Our Work Recommendations Background Our Work Programmers are Not Scared Enough Java makes threaded programming too easy Language often hides consequences of incorrect synchronization

More information

Lectures. System Development. Motivation for Software Verification. System Validation #6 Monday, 26 May 2008

Lectures. System Development. Motivation for Software Verification. System Validation #6 Monday, 26 May 2008 ectures Note that the original lectures 5 and 6 have been combined. Also note that there will no presentation on dynamic POR. # 1 date Mon 14 April Topic SPIN Material [Gerth 1997] [SPIN QuickRef] [Hatcliff

More information

CMSC 132: Object-Oriented Programming II. Threads in Java

CMSC 132: Object-Oriented Programming II. Threads in Java CMSC 132: Object-Oriented Programming II Threads in Java 1 Problem Multiple tasks for computer Draw & display images on screen Check keyboard & mouse input Send & receive data on network Read & write files

More information

Summary: Issues / Open Questions:

Summary: Issues / Open Questions: Summary: The paper introduces Transitional Locking II (TL2), a Software Transactional Memory (STM) algorithm, which tries to overcomes most of the safety and performance issues of former STM implementations.

More information

The SPIN Model Checker

The SPIN Model Checker The SPIN Model Checker Metodi di Verifica del Software Andrea Corradini Lezione 1 2013 Slides liberamente adattate da Logic Model Checking, per gentile concessione di Gerard J. Holzmann http://spinroot.com/spin/doc/course/

More information

AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS

AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS PAUL L. BAILEY Abstract. This documents amalgamates various descriptions found on the internet, mostly from Oracle or Wikipedia. Very little of this

More information

Lecture 10: Nested Depth First Search, Counter- Example Generation Revisited, Bit-State Hashing, On-The-Fly Model Checking

Lecture 10: Nested Depth First Search, Counter- Example Generation Revisited, Bit-State Hashing, On-The-Fly Model Checking CS 267: Automated Verification Lecture 10: Nested Depth First Search, Counter- Example Generation Revisited, Bit-State Hashing, On-The-Fly Model Checking Instructor: Tevfik Bultan Buchi Automata Language

More information

Computation Abstractions. Processes vs. Threads. So, What Is a Thread? CMSC 433 Programming Language Technologies and Paradigms Spring 2007

Computation Abstractions. Processes vs. Threads. So, What Is a Thread? CMSC 433 Programming Language Technologies and Paradigms Spring 2007 CMSC 433 Programming Language Technologies and Paradigms Spring 2007 Threads and Synchronization May 8, 2007 Computation Abstractions t1 t1 t4 t2 t1 t2 t5 t3 p1 p2 p3 p4 CPU 1 CPU 2 A computer Processes

More information

FORMAL METHODS IN NETWORKING COMPUTER SCIENCE 598D, SPRING 2010 PRINCETON UNIVERSITY LIGHTWEIGHT MODELING IN PROMELA/SPIN AND ALLOY

FORMAL METHODS IN NETWORKING COMPUTER SCIENCE 598D, SPRING 2010 PRINCETON UNIVERSITY LIGHTWEIGHT MODELING IN PROMELA/SPIN AND ALLOY FORMAL METHODS IN NETWORKING COMPUTER SCIENCE 598D, SPRING 2010 PRINCETON UNIVERSITY LIGHTWEIGHT MODELING IN PROMELA/SPIN AND ALLOY Pamela Zave AT&T Laboratories Research Florham Park, New Jersey, USA

More information

A survey of new trends in symbolic execution for software testing and analysis

A survey of new trends in symbolic execution for software testing and analysis Int J Softw Tools Technol Transfer (2009) 11:339 353 DOI 10.1007/s10009-009-0118-1 REGULAR PAPER A survey of new trends in symbolic execution for software testing and analysis Corina S. Păsăreanu Willem

More information

Symbolic PathFinder, Pex, RoadRunner

Symbolic PathFinder, Pex, RoadRunner Symbolic PathFinder, Pex, RoadRunner http://d3s.mff.cuni.cz Pavel Parízek CHARLES UNIVERSITY IN PRAGUE faculty of mathematics and physics Pavel Parízek Symbolic Execution, Dynamic Analysis 2 JPF extensions

More information

Multi-threaded programming in Java

Multi-threaded programming in Java Multi-threaded programming in Java Java allows program to specify multiple threads of execution Provides instructions to ensure mutual exclusion, and selective blocking/unblocking of threads What is a

More information

Combining Test Case Generation and Runtime Verification

Combining Test Case Generation and Runtime Verification Combining Test Case Generation and Runtime Verification Cyrille Artho a,1, Howard Barringer b,2, Allen Goldberg c, Klaus Havelund c, Sarfraz Khurshid d,3, Mike Lowry e, Corina Pasareanu c, Grigore Roşu

More information

System Correctness. EEC 421/521: Software Engineering. System Correctness. The Problem at Hand. A system is correct when it meets its requirements

System Correctness. EEC 421/521: Software Engineering. System Correctness. The Problem at Hand. A system is correct when it meets its requirements System Correctness EEC 421/521: Software Engineering A Whirlwind Intro to Software Model Checking A system is correct when it meets its requirements a design without requirements cannot be right or wrong,

More information

Specification and Generation of Environment for Model Checking of Software Components *

Specification and Generation of Environment for Model Checking of Software Components * Specification and Generation of Environment for Model Checking of Software Components * Pavel Parizek 1, Frantisek Plasil 1,2 1 Charles University, Faculty of Mathematics and Physics, Department of Software

More information

Detection of Deadlock Potentials in Multi-Threaded Programs

Detection of Deadlock Potentials in Multi-Threaded Programs Detection of Deadlock Potentials in Multi-Threaded Programs Rahul Agarwal 1, Saddek Bensalem, Eitan Farchi, Klaus Havelund 2, Yarden Nir-Buchbinder, Scott D. Stoller 1, Shmuel Ur, and Liqiang Wang 1 November

More information

The Spin Model Checker : Part I/II

The Spin Model Checker : Part I/II The Spin Model Checker : Part I/II Moonzoo Kim CS Dept. KAIST Korea Advanced Institute of Science and Technology Motivation: Tragic Accidents Caused by SW Bugs 2 Cost of Software Errors June 2002 Software

More information

Multi-Threaded System int x, y, r; int *p, *q, *z; int **a; EEC 421/521: Software Engineering. Thread Interleaving SPIN. Model Checking using SPIN

Multi-Threaded System int x, y, r; int *p, *q, *z; int **a; EEC 421/521: Software Engineering. Thread Interleaving SPIN. Model Checking using SPIN EEC 421/521: Software Engineering Model Checking using SPIN 4/29/08 EEC 421/521: Software Engineering 1 Multi-Threaded System int x, y, r; int *p, *q, *z; int **a; thread_1(void) /* initialize p, q, and

More information

Logic Model Checking

Logic Model Checking Logic Model Checking Lecture Notes 17:18 Caltech 101b.2 January-March 2005 Course Text: The Spin Model Checker: Primer and Reference Manual Addison-Wesley 2003, ISBN 0-321-22862-6, 608 pgs. checking omega

More information

Environment Modeling for Modular Software Analysis with Java PathFinder Part 1

Environment Modeling for Modular Software Analysis with Java PathFinder Part 1 Environment Modeling for Modular Software Analysis with Java PathFinder Part 1 Oksana Tkachuk SGT/NASA Ames oksana.tkachuk@nasa.gov Peter Mehlitz SGT/NASA Ames peter.c.mehlitz@nasa.gov Software Model Checking

More information

Chapter 1 GETTING STARTED. SYS-ED/ Computer Education Techniques, Inc.

Chapter 1 GETTING STARTED. SYS-ED/ Computer Education Techniques, Inc. Chapter 1 GETTING STARTED SYS-ED/ Computer Education Techniques, Inc. Objectives You will learn: Java platform. Applets and applications. Java programming language: facilities and foundation. Memory management

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

Cover Page. The handle holds various files of this Leiden University dissertation

Cover Page. The handle   holds various files of this Leiden University dissertation Cover Page The handle http://hdl.handle.net/1887/22891 holds various files of this Leiden University dissertation Author: Gouw, Stijn de Title: Combining monitoring with run-time assertion checking Issue

More information

CalFuzzer: An Extensible Active Testing Framework for Concurrent Programs Pallavi Joshi 1, Mayur Naik 2, Chang-Seo Park 1, and Koushik Sen 1

CalFuzzer: An Extensible Active Testing Framework for Concurrent Programs Pallavi Joshi 1, Mayur Naik 2, Chang-Seo Park 1, and Koushik Sen 1 CalFuzzer: An Extensible Active Testing Framework for Concurrent Programs Pallavi Joshi 1, Mayur Naik 2, Chang-Seo Park 1, and Koushik Sen 1 1 University of California, Berkeley, USA {pallavi,parkcs,ksen}@eecs.berkeley.edu

More information

Automata-Theoretic LTL Model Checking. Emptiness of Büchi Automata

Automata-Theoretic LTL Model Checking. Emptiness of Büchi Automata Automata-Theoretic LTL Model Checking Graph Algorithms for Software Model Checking (based on Arie Gurfinkel s csc2108 project) Automata-Theoretic LTL Model Checking p.1 Emptiness of Büchi Automata An automation

More information

Proving Dekker with SPIN and PROMELA

Proving Dekker with SPIN and PROMELA 15-410...fairness disabled... Proving Dekker with SPIN and PROMELA Joshua Wise With help from Greg Hartman L36_SPIN 1 Synchronization Project 4 due Wednesday Everyone having fun? Kernel interviews If you

More information

Formal Specification and Verification

Formal Specification and Verification Formal Specification and Verification Introduction to Promela Bernhard Beckert Based on a lecture by Wolfgang Ahrendt and Reiner Hähnle at Chalmers University, Göteborg Formal Specification and Verification:

More information

Formal Verification of Control Software: A Case Study

Formal Verification of Control Software: A Case Study Formal Verification of Control Software: A Case Study Andreas Griesmayer 1, Roderick Bloem 1, Martin Hautzendorfer 2, and Franz Wotawa 1 1 Graz University of Technology, Austria {agriesma,rbloem,fwotawa}@ist.tu-graz.ac.at

More information

High-Level Language VMs

High-Level Language VMs High-Level Language VMs Outline Motivation What is the need for HLL VMs? How are these different from System or Process VMs? Approach to HLL VMs Evolutionary history Pascal P-code Object oriented HLL VMs

More information

Computing Approximate Happens-Before Order with Static and Dynamic Analysis

Computing Approximate Happens-Before Order with Static and Dynamic Analysis Department of Distributed and Dependable Systems Technical report no. D3S-TR-2013-06 May 7, 2018 Computing Approximate Happens-Before Order with Static and Dynamic Analysis Pavel Parízek, Pavel Jančík

More information

A Model-Derivation Framework for Timing Analysis of Java Software Systems

A Model-Derivation Framework for Timing Analysis of Java Software Systems A Model-Derivation Framework for Timing Analysis of Java Software Systems Bugra M. Yildiz 1, Arend Rensink 1, Christoph Bockisch 2, and Mehmet Aksit 1 1 Formal Methods and Tools Group, University of Twente,

More information

Model Checking for Autonomy Software

Model Checking for Autonomy Software Model Checking for Autonomy Software Charles Pecheur RIACS / ASE Group, NASA Ames Charles Pecheur, RIACS / NASA Ames 1 Contents Model Checking for Autonomy Software Why? Autonomy software, how to verify

More information

Research Collection. Formal background and algorithms. Other Conference Item. ETH Library. Author(s): Biere, Armin. Publication Date: 2001

Research Collection. Formal background and algorithms. Other Conference Item. ETH Library. Author(s): Biere, Armin. Publication Date: 2001 Research Collection Other Conference Item Formal background and algorithms Author(s): Biere, Armin Publication Date: 2001 Permanent Link: https://doi.org/10.3929/ethz-a-004239730 Rights / License: In Copyright

More information

\n is used in a string to indicate the newline character. An expression produces data. The simplest expression

\n is used in a string to indicate the newline character. An expression produces data. The simplest expression Chapter 1 Summary Comments are indicated by a hash sign # (also known as the pound or number sign). Text to the right of the hash sign is ignored. (But, hash loses its special meaning if it is part of

More information

Sharing Objects Ch. 3

Sharing Objects Ch. 3 Sharing Objects Ch. 3 Visibility What is the source of the issue? Volatile Dekker s algorithm Publication and Escape Thread Confinement Immutability Techniques of safe publication Assignment 1 Visibility

More information

Resource Sharing & Management

Resource Sharing & Management Resource Sharing & Management P.C.P Bhatt P.C.P Bhatt OS/M6/V1/2004 1 Introduction Some of the resources connected to a computer system (image processing resource) may be expensive. These resources may

More information

Source Code Formal Verification. Riccardo Sisto, Politecnico di Torino

Source Code Formal Verification. Riccardo Sisto, Politecnico di Torino Source Code Formal Verification Riccardo Sisto, Politecnico di Torino Formal Verification: Not Just High-Level Models How to improve correctness up to the coding phase? Possible solutions: Automatic code

More information

Fex: A Model Checking Framework for Event Sequences. Xin Li

Fex: A Model Checking Framework for Event Sequences. Xin Li Fex: A Model Checking Framework for Event Sequences Xin Li 2 Table of Contents 1 Introduction 1 1.1 Statement of Research Problem.......................... 1 1.2 Overview of the Work...............................

More information

An Overview of the BLITZ System

An Overview of the BLITZ System An Overview of the BLITZ System Harry H. Porter III Department of Computer Science Portland State University Introduction The BLITZ System is a collection of software designed to support a university-level

More information

Design and Analysis of Distributed Interacting Systems

Design and Analysis of Distributed Interacting Systems Design and Analysis of Distributed Interacting Systems Lecture 5 Linear Temporal Logic (cont.) Prof. Dr. Joel Greenyer May 2, 2013 (Last Time:) LTL Semantics (Informally) LTL Formulae are interpreted on

More information

A Causality-Based Runtime Check for (Rollback) Atomicity

A Causality-Based Runtime Check for (Rollback) Atomicity A Causality-Based Runtime Check for (Rollback) Atomicity Serdar Tasiran Koc University Istanbul, Turkey Tayfun Elmas Koc University Istanbul, Turkey RV 2007 March 13, 2007 Outline This paper: Define rollback

More information

Efficient Solving of Structural Constraints

Efficient Solving of Structural Constraints Efficient Solving of Structural Constraints Bassem Elkarablieh University of Texas at Austin Austin, TX 78712 elkarabl@ece.utexas.edu Darko Marinov University of Illinois at Urbana Urbana, IL 61801 marinov@cs.uiuc.edu

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

Combining Complementary Formal Verification Strategies to Improve Performance and Accuracy

Combining Complementary Formal Verification Strategies to Improve Performance and Accuracy Combining Complementary Formal Verification Strategies to Improve Performance and Accuracy David Owen June 15, 2007 2 Overview Four Key Ideas A Typical Formal Verification Strategy Complementary Verification

More information

Specification and Generation of Environment for Model Checking of Software Components

Specification and Generation of Environment for Model Checking of Software Components Specification and Generation of Environment for Model Checking of Software Components Pavel Parizek a,1, Frantisek Plasil a,b,1 a Department of Software Engineering Charles University, Faculty of Mathematics

More information

MultiJav: A Distributed Shared Memory System Based on Multiple Java Virtual Machines. MultiJav: Introduction

MultiJav: A Distributed Shared Memory System Based on Multiple Java Virtual Machines. MultiJav: Introduction : A Distributed Shared Memory System Based on Multiple Java Virtual Machines X. Chen and V.H. Allan Computer Science Department, Utah State University 1998 : Introduction Built on concurrency supported

More information

Lecture Notes on Memory Layout

Lecture Notes on Memory Layout Lecture Notes on Memory Layout 15-122: Principles of Imperative Computation Frank Pfenning André Platzer Lecture 11 1 Introduction In order to understand how programs work, we can consider the functions,

More information

Model Checking of Statecharts using Automatic White Box Test Generation

Model Checking of Statecharts using Automatic White Box Test Generation Abstract Model Checking of Statecharts using Automatic White Box Test Generation Doron Drusinsky Time Rover, Inc., 11425 Charsan Lane, Cupertino, CA, 95014 www.time-rover.com This paper describes a model

More information

EECS Mission Critical Systems

EECS Mission Critical Systems EECS 4315 3.0 Mission Critical Systems Midterm 9:00 10:15 on March 1, 2018 Last name: First name: EECS login: Instructions No questions are allowed during the test. If a question is not clear, then write

More information

Software Engineering using Formal Methods

Software Engineering using Formal Methods Software Engineering using Formal Methods Introduction to Promela Wolfgang Ahrendt 03 September 2015 SEFM: Promela /GU 150903 1 / 36 Towards Model Checking System Model Promela Program byte n = 0; active

More information

wait with priority An enhanced version of the wait operation accepts an optional priority argument:

wait with priority An enhanced version of the wait operation accepts an optional priority argument: wait with priority An enhanced version of the wait operation accepts an optional priority argument: syntax: .wait the smaller the value of the parameter, the highest the priority

More information

Static Analysis in C/C++ code with Polyspace

Static Analysis in C/C++ code with Polyspace 1 Static Analysis in C/C++ code with Polyspace Yongchool Ryu Application Engineer gary.ryu@mathworks.com 2016 The MathWorks, Inc. 2 Agenda Efficient way to find problems in Software Category of Static

More information

Verification of Java programs using networks of finite automata with discrete data.

Verification of Java programs using networks of finite automata with discrete data. Catholic University in Ružomberok Scientific Issues, Mathematica II, Ružomberok 2009 Verification of Java programs using networks of finite automata with discrete data. Bożena Woźna, Andrzej Zbrzezny Institute

More information

Efficient Testing of Concurrent Programs with Abstraction-Guided Symbolic Execution

Efficient Testing of Concurrent Programs with Abstraction-Guided Symbolic Execution Efficient Testing of Concurrent Programs with Abstraction-Guided Symbolic Execution Neha Rungta, Eric G Mercer and Willem Visser Dept. of Computer Science, Brigham Young University, Provo, UT 84602, USA

More information

Symbol Tables Symbol Table: In computer science, a symbol table is a data structure used by a language translator such as a compiler or interpreter, where each identifier in a program's source code is

More information

Software Engineering using Formal Methods

Software Engineering using Formal Methods Software Engineering using Formal Methods Introduction to Promela Wolfgang Ahrendt & Richard Bubel & Reiner Hähnle & Wojciech Mostowski 31 August 2011 SEFM: Promela /GU 110831 1 / 35 Towards Model Checking

More information

Non-blocking Array-based Algorithms for Stacks and Queues. Niloufar Shafiei

Non-blocking Array-based Algorithms for Stacks and Queues. Niloufar Shafiei Non-blocking Array-based Algorithms for Stacks and Queues Niloufar Shafiei Outline Introduction Concurrent stacks and queues Contributions New algorithms New algorithms using bounded counter values Correctness

More information

Hybrid Analysis for Partial Order Reduction of Programs with Arrays

Hybrid Analysis for Partial Order Reduction of Programs with Arrays Hybrid Analysis for Partial Order Reduction of Programs with Arrays Pavel Parízek Charles University in Prague, Faculty of Mathematics and Physics, Department of Distributed and Dependable Systems Abstract.

More information

Experimental Evaluation of Verification and Validation Tools on Martian Rover Software

Experimental Evaluation of Verification and Validation Tools on Martian Rover Software Experimental Evaluation of Verification and Validation Tools on Martian Rover Software Guillaume Brat 1, Doron Drusinsky 2, Dimitra Giannakopoulou 3, Allen Goldberg 1, Klaus Havelund 1, Mike Lowry 4, Corina

More information

Automatic On-demand Delegation of Calls in Java PathFinder

Automatic On-demand Delegation of Calls in Java PathFinder Automatic On-demand Delegation of Calls in Java PathFinder Nastaran Shafiei 1 and Franck van Breugel 1,2 1 Department of Computer Science and Engineering, York University, Canada 2 Department of Computer

More information

CS577 Modern Language Processors. Spring 2018 Lecture Garbage Collection

CS577 Modern Language Processors. Spring 2018 Lecture Garbage Collection CS577 Modern Language Processors Spring 2018 Lecture Garbage Collection 1 BASIC GARBAGE COLLECTION Garbage Collection (GC) is the automatic reclamation of heap records that will never again be accessed

More information

Using Java Pathfinder to Reason about Agent Systems

Using Java Pathfinder to Reason about Agent Systems Using Java Pathfinder to Reason about Agent Systems Franco Raimondi f.raimondi@mdx.ac.uk Department of Computer Science Middlesex University http://www.rmnd.net Liverpool, 11th September 2015 Joint work

More information

Models of concurrency & synchronization algorithms

Models of concurrency & synchronization algorithms Models of concurrency & synchronization algorithms Lecture 3 of TDA383/DIT390 (Concurrent Programming) Carlo A. Furia Chalmers University of Technology University of Gothenburg SP3 2016/2017 Today s menu

More information

Bogor An extensible and highly-modular model checking framework

Bogor An extensible and highly-modular model checking framework Bogor An extensible and highly-modular model checking framework SAnToS Laboratory, Kansas State University, USA http://bogor.projects.cis.ksu.edu Principal Investigators Matt Dwyer John Hatcliff Students

More information

Formal Verification by Model Checking

Formal Verification by Model Checking Formal Verication by Model Checking Jonathan Aldrich Carnegie Mellon University Based on slides developed by Natasha Sharygina 17-654/17-754: Analysis of Software Artacts Spring 2006 1 CTL Model Checking

More information

Runtime Atomicity Analysis of Multi-threaded Programs

Runtime Atomicity Analysis of Multi-threaded Programs Runtime Atomicity Analysis of Multi-threaded Programs Focus is on the paper: Atomizer: A Dynamic Atomicity Checker for Multithreaded Programs by C. Flanagan and S. Freund presented by Sebastian Burckhardt

More information

Name: CIS 341 Final Examination 10 December 2008

Name: CIS 341 Final Examination 10 December 2008 Name: CIS 341 Final Examination 10 December 2008 1 /8 2 /12 3 /18 4 /18 5 /14 Total /70 Do not begin the exam until you are told to do so. You have 120 minutes to complete the exam. There are 11 pages

More information

DOMAIN-SPECIFIC ENVIRONMENT GENERATION FOR MODULAR SOFTWARE MODEL CHECKING OKSANA TKACHUK. M.S, Kansas State University, 2003

DOMAIN-SPECIFIC ENVIRONMENT GENERATION FOR MODULAR SOFTWARE MODEL CHECKING OKSANA TKACHUK. M.S, Kansas State University, 2003 DOMAIN-SPECIFIC ENVIRONMENT GENERATION FOR MODULAR SOFTWARE MODEL CHECKING by OKSANA TKACHUK M.S, Kansas State University, 2003 AN ABSTRACT OF A DISSERTATION submitted in partial fulfillment of the requirements

More information

Outline. Introduction SDV Motivation Model vs Real Implementation SLIC SDVRP SLAM-2 Comparisons Conclusions

Outline. Introduction SDV Motivation Model vs Real Implementation SLIC SDVRP SLAM-2 Comparisons Conclusions Outline Introduction SDV Motivation Model vs Real Implementation SIC SDVRP SAM-2 Comparisons Conclusions SDV Research Platform Academic release of SDV (Static Driver Verifier), based on the code that ships

More information

Symbolic Evaluation/Execution

Symbolic Evaluation/Execution Symbolic Evaluation/Execution Reading Assignment *R.W. Floyd, "Assigning Meaning to Programs, Symposium on Applied Mathematics, 1967, pp. 19-32 (Appeared as volume 19 of Mathematical Aspects of Computer

More information

CHAPTER 5 GENERATING TEST SCENARIOS AND TEST CASES FROM AN EVENT-FLOW MODEL

CHAPTER 5 GENERATING TEST SCENARIOS AND TEST CASES FROM AN EVENT-FLOW MODEL CHAPTER 5 GENERATING TEST SCENARIOS AND TEST CASES FROM AN EVENT-FLOW MODEL 5.1 INTRODUCTION The survey presented in Chapter 1 has shown that Model based testing approach for automatic generation of test

More information

Distributed Systems Programming (F21DS1) Formal Verification

Distributed Systems Programming (F21DS1) Formal Verification Distributed Systems Programming (F21DS1) Formal Verification Andrew Ireland Department of Computer Science School of Mathematical and Computer Sciences Heriot-Watt University Edinburgh Overview Focus on

More information

Model Checking Real-time Java

Model Checking Real-time Java Model Checking Real-time Java Pavel Parizek 1, Tomas Kalibera 1, and Jan Vitek 2 1 Department of Software Engineering, Charles University 2 Computer Science Department, Purdue University Abstract. The

More information

Test Case Generation by Symbolic Execution. Concepts, a CLP-based Instance, and Actor-based Concurrency

Test Case Generation by Symbolic Execution. Concepts, a CLP-based Instance, and Actor-based Concurrency Test Case Generation by Symbolic Execution: Basic Concepts, a CLP-based Instance, and Actor-based Concurrency Elvira Albert Complutense University of Madrid elvira@sip.ucm.es SFM-14:ESM Bertinoro, 16-20

More information

Sustainable Memory Use Allocation & (Implicit) Deallocation (mostly in Java)

Sustainable Memory Use Allocation & (Implicit) Deallocation (mostly in Java) COMP 412 FALL 2017 Sustainable Memory Use Allocation & (Implicit) Deallocation (mostly in Java) Copyright 2017, Keith D. Cooper & Zoran Budimlić, all rights reserved. Students enrolled in Comp 412 at Rice

More information

Intermediate Code Generation

Intermediate Code Generation Intermediate Code Generation In the analysis-synthesis model of a compiler, the front end analyzes a source program and creates an intermediate representation, from which the back end generates target

More information

Programming Languages Third Edition. Chapter 9 Control I Expressions and Statements

Programming Languages Third Edition. Chapter 9 Control I Expressions and Statements Programming Languages Third Edition Chapter 9 Control I Expressions and Statements Objectives Understand expressions Understand conditional statements and guards Understand loops and variation on WHILE

More information

Testing Concurrent Java Programs Using Randomized Scheduling

Testing Concurrent Java Programs Using Randomized Scheduling Testing Concurrent Java Programs Using Randomized Scheduling Scott D. Stoller Computer Science Department State University of New York at Stony Brook http://www.cs.sunysb.edu/ stoller/ 1 Goal Pillars of

More information

4/6/2011. Model Checking. Encoding test specifications. Model Checking. Encoding test specifications. Model Checking CS 4271

4/6/2011. Model Checking. Encoding test specifications. Model Checking. Encoding test specifications. Model Checking CS 4271 Mel Checking LTL Property System Mel Mel Checking CS 4271 Mel Checking OR Abhik Roychoudhury http://www.comp.nus.edu.sg/~abhik Yes No, with Counter-example trace 2 Recap: Mel Checking for mel-based testing

More information

RAISE in Perspective

RAISE in Perspective RAISE in Perspective Klaus Havelund NASA s Jet Propulsion Laboratory, Pasadena, USA Klaus.Havelund@jpl.nasa.gov 1 The Contribution of RAISE The RAISE [6] Specification Language, RSL, originated as a development

More information

CMSC132, Practice Questions

CMSC132, Practice Questions CMSC132, Practice Questions Notice the final exam can include material not covered by the practice questions. You should practice beyond what is covered in this document. Although solutions will not be

More information

Final Exam. 12 December 2018, 120 minutes, 26 questions, 100 points

Final Exam. 12 December 2018, 120 minutes, 26 questions, 100 points Name: CS520 Final Exam 12 December 2018, 120 minutes, 26 questions, 100 points The exam is closed book and notes. Please keep all electronic devices turned off and out of reach. Note that a question may

More information