Offline Model-based Testing and Runtime Monitoring

Size: px
Start display at page:

Download "Offline Model-based Testing and Runtime Monitoring"

Transcription

1 Offline Model-based Testing and Runtime Monitoring of the Sensor Voting Module Paolo Arcaini Angelo Gargantini Elvinia Riccobene Università of Bergamo- Italy Università di Milano - Italy Tolouse, ABZ 2014

2 Motivation For safety critical components, formal verification and validation of models must be combined with the validation of the implementation. confidence that the system has been implemented as specified, i.e., its implementation conforms to its requirements. regardless the correctness of the model (guaranteed by formal verification, simulation and so on), the implemented system must be validated itself. Even when formal refinement and/or program formal verification are applied Who would want to fly in an airplane with software proved correct, but not tested? Ed Brinksma in his 2009 keynote at the Dutch Testing Day and Testcom/FATES

3 General scenario Conforms to? requirements Formal specification Implementation Model-based testing Runtime Monitoring Models used for test data generation and verdicts computation (oracle) In off-line, test suites are derived from the model and saved. During runtime, checking whether a run of a system satisfies or violates a given correctness property

4 Proposed validation process 1.modelling ASM model 2 Model validation Req. 3. Implementing 4. Link Implementation and specification Java 5. Offline testing 6. Runtime monitoring Applied to the sensor voting module

5 1. ASM model for SVM Using AsmetaL function channel represents the signals coming from the three channels dynamic monitored channel: Channel > Boolean function validch keeps track if each channel is still valid dynamic controlled validch: Channel > Boolean the output is sensor and its validity is simply defined as a derived function valid dynamic controlled sensor: Boolean derived valid: Boolean RULES to set the value and the validity

6 2. Model validation 1. Simulation User guided Scenario guided all the sensors stay valid, the value is what expected sensor1 becomes invalid and after some steps also sensor2 fails We found at least one error in our initial specification 2. Formal Property Verification By model checking Once the sensor becomes invalid, then it will always remain invalid: CTLSPEC AG( not(valid) implies AG (not(valid))) There exists a path in which the sensor eventually becomes invalid: CTLSPEC EF (not(valid)) There exists a path in which the sensor always remains valid: CTLSPEC EG (valid)

7 3. Write the Java implementation The ASM and the Java implementation have been developed independently once we have agreed upon the interface A method to pass the current values of the channels A way to get the sensor value and validity More freedom (thanks to Java) Use of generics System.out / log4j The Java class can contain further methods not interested by the spec

8 4. Linking a Java class with its ASM model We reuse the approach CoMA Conformance Monitoring by ASMs Paolo Arcaini and Angelo Gargantini and Elvinia Riccobene CoMA: Conformance Monitoring of Java programs by Abstract State Machines in 2nd International Conference on RUNTIME VERIFICATION RV 2011 Based on the use of Java annotation (@) The implementation itself contains the definition of the links to the specification The link should be maintained during software evolution

9 4. Linking a Java class with its ASM model Given a Java class C and its ASM model Asm C 1. Link the class its specification Asm Specification Asm class Sensor {. } 2. Link the state Java state Abstract State 3. Link the execution Java methods link Java Class C

10 4b. Java observed state to ASM signature Java observed state OS(C) consists of all public fields, and pure non void public methods of the class C the user wants to observe link: OS C functions(asm C ) For the voting module: class Sensor sensor") public boolean getvalue(){ Asm Specification Asm C Signature Java Class public boolean isvalid(){ return sensorvalid;} OBSERVED STATE

11 4c Java methods to ASM execution the execution of the Java code must be linked with an execution(i.e., a run) of the ASM. Identify Java changing methods CM(C) is the set of methods of C whose execution is responsible for changing values of OS(C) and that the user wants to observe class public Sensor() { public void computesensorvalue() { Asm Specification Asm C Rules Java Class C Changing Methods

12 5. Offline testing ASM model Java Test generation TESTS Test concretization Test generation Using model checking (Spin) (ATGT) and several coverage criteria to generate abstract tests Test concretization The test are adapted to concrete test execution

13 5a. Test generation ATGT exploits the counter example generation of the model checker SPIN ATGT has derived 38 test predicates 20 for the BRC and 18 for the URC Each test predicate represents a test goal or test requirement For example valid = false : the sensor becomes invalid ATGT produces 38 test sequences 11 test sequences if tests reduction is applied They are enough to cover all the test goals Example of test sequence state 0 controlled valid = true monitored channel(one) = false channel(two) = false channel(three) = true state 1 controlled sensor = false valid = true

14 5b. Test concretization ATS - ABSTRACT TEST SEQUENCE Test are translated to JUnit code Deriving a concrete Java test A sequence of method calls with suitable checks (i.e., asserts) novel technique The test concretization leverages the linking between the Java class and the ASM and the definitions of state conformance and step conformance of point 3

15 Test translation to create a new Object For each state of the ATS, call the method annotated (+ parameters) Build the oracle by exploiting the state 0 controlled valid = true monitored channel(one) = false channel(two) = false channel(three) = true state 1 controlled sensor = false valid = public void test() { // state 0 Sensor sut = new Sensor (); assertequals(true, sut.isvalid()); sut.computesensorvalue(false, false, true); // state 1 assertequals(false, sut.getvalue()); assertequals(true, sut.isvalid()); }

16 6. Runtime Monitoring (CoMa) ASM model 1 2 O C - Java SIMULATOR OBSERVER 3 4 ANALYZER OK/FAIL 1. During the execution of the Java object of class C 2. an observer evaluates when the observed state is changed Using AspectJ 3. makes the abstract ASM to perform a machine step Using AsmetaL simulator 4. An analyzer evaluates the step conformance between the Java execution and the ASM simulation

17 Runtime conformance Runtime conformance O C is runtime conformant to its Asm C if: 1. no specification invariant of Asm C is ever violated. 2. the initial state of the computation of O C conforms to the initial state of the computation of Asm C 3. every observed change step conforms with the step of Asm C computation (states) Asm C O C Non changing methods steps are not

18 Experimental result Sensor Voting MBT: 38 Junit tests CoMA: we have simulated the environment by instantiating 10 times a new sensor and computing 10 times the sensor value passing three random values as inputs for the three channels. Evaluation Code coverage by EclEmma: 100% in both cases Mutation score by PIT 57 killed mutants over 74 in both cases Both techniques are equivalent regarding detecting faults inserted by the standard PIT mutation operators. CoMA has a great runtime overhead (ASM simulator must run in parallel)

19 When runtime monitoring is better? we have simulated a delayed short circuit fault that causes isvalid to return true after 5 times it is called. int nvcount = 0; boolean isvalid() { return valid nvcount++ > 5;} The tests produced from the specification do not detect this fault the rule coverage of the specification does not imply the coverage of this faulty behavior in the implementation. However, monitoring the code with CoMA exposes the failure by any run in which valid becomes false and isvalid is called at least 5 times. In general, unspecified anomalous behaviors of the implementation are better detected by runtime monitoring than by MBT

20 Conclusions A complete ASM-based methodology for the validation of code Guidelines/methodology for: Linking the code and its specification Deriving test cases from models Performing runtime monitoring Lesson learned Case study very useful for students/practitioners Importance of a linking (for both MBT and runtime, but also future use) This can limit the use of Java (skeleton generation could be useful) Future work: compare w.r.t other approaches like Junit tests written by hand/ JML - Design by Contract/ test generation -

Offline Model-based Testing and Runtime Monitoring of the Sensor Voting Module

Offline Model-based Testing and Runtime Monitoring of the Sensor Voting Module Offline Model-based Testing and Runtime Monitoring of the Sensor Voting Module Paolo Arcaini 1, Angelo Gargantini 1, and Elvinia Riccobene 2 1 Dipartimento di Ingegneria, Università degli Studi di Bergamo,

More information

Rigorous development process of a safety-critical system: from ASM models to Java code

Rigorous development process of a safety-critical system: from ASM models to Java code Software Tools for Technology Transfer manuscript No. (will be inserted by the editor) Rigorous development process of a safety-critical system: from ASM models to Java code Paolo Arcaini 1, Angelo Gargantini

More information

Generating Tests for Detecting Faults in Feature Models

Generating Tests for Detecting Faults in Feature Models Generating Tests for Detecting Faults in Feature Models Paolo Arcaini 1, Angelo Gargantini 2, Paolo Vavassori 2 1 Charles University in Prague, Czech Republic 2 University of Bergamo, Italy Outline Feature

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

AsmetaA: Animator for Abstract State Machines

AsmetaA: Animator for Abstract State Machines AsmetaA: Animator for Abstract State Machines Silvia Bonfanti 1, Angelo Gargantini 1, and Atif Mashkoor 2 1 Department of Economics and Technology Management, Information Technology and Production, University

More information

The JML Tool. Faculty of Engineering Pontificia Universidad Javeriana. The JML Tool p.1/23

The JML Tool. Faculty of Engineering Pontificia Universidad Javeriana. The JML Tool p.1/23 The JML Tool Néstor Cataño ncatano@puj.edu.co Faculty of Engineering Pontificia Universidad Javeriana The JML Tool p.1/23 Tools for JML 1. Parsing and type-checking 2. Checking assertions at runtime 3.

More information

Asm2C++ a tool for Code Generation from Abstract State Machines to Arduino

Asm2C++ a tool for Code Generation from Abstract State Machines to Arduino Angelo Gargantini - Asm2C++: Code generation from ASM to Arduino Asm2C++ a tool for Code Generation from Abstract State Machines to Arduino Silvia Bonfanti, Marco Carissoni, Angelo Gargantini, Atif Mashkoor

More information

Testing Library Specifications by Verifying Conformance Tests

Testing Library Specifications by Verifying Conformance Tests Testing Library Specifications by Verifying Conformance Tests Joseph R. Kiniry, Daniel M. Zimmerman, Ralph Hyland ITU Copenhagen, UW Tacoma, UCD Dublin 6th International Conference on Tests & Proofs Prague,

More information

Validation of transformation from Abstract State Machine models to C++ code

Validation of transformation from Abstract State Machine models to C++ code Validation of transformation from Abstract State Machine models to C++ code Silvia Bonfanti 1, Angelo Gargantini 1, and Atif Mashkoor 2,3 1 Università degli Studi di Bergamo, Italy {silvia.bonfanti,angelo.gargantini}@unibg.it

More information

Assertion-Based Test Oracles for Home Automation Systems

Assertion-Based Test Oracles for Home Automation Systems Assertion-Based Test Oracles for Home Automation Systems Ajitha Rajan Lydie du Bousquet Yves Ledru German Vega Jean-Luc Richier Team VASCO, LIG Grenoble Home Automation System (HAS) Facilitate the automation

More information

Exploiting Synergy Between Testing and Inferred Partial Specifications

Exploiting Synergy Between Testing and Inferred Partial Specifications Exploiting Synergy Between Testing and Inferred Partial Specifications Tao Xie David Notkin Department of Computer Science & Engineering, University of Washington {taoxie, notkin}@cs.washington.edu Technical

More information

Mutation Testing. Leaving the Stone Age

Mutation Testing. Leaving the Stone Age Mutation Testing Leaving the Stone Age 2017 whoami ios Developer by day compiler hacker by night https://twitter.com/1101_debian https://lowlevelbits.org https://systemundertest.org Outline Quality of

More information

Part I: Preliminaries 24

Part I: Preliminaries 24 Contents Preface......................................... 15 Acknowledgements................................... 22 Part I: Preliminaries 24 1. Basics of Software Testing 25 1.1. Humans, errors, and testing.............................

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

An introduction to formal specifications and JML. Invariant properties

An introduction to formal specifications and JML. Invariant properties An introduction to formal specifications and JML Invariant properties Yves Ledru Université Grenoble-1 Laboratoire d Informatique de Grenoble Yves.Ledru@imag.fr 2013 Page 1 Invariant properties Invariants

More information

Coverage Criteria for Model-Based Testing using Property Patterns

Coverage Criteria for Model-Based Testing using Property Patterns Coverage Criteria for Model-Based Testing using Property Patterns Kalou Cabrera Castillos 1, Frédéric Dadeau 2, Jacques Julliand 2 1 LAAS Toulouse, France 2 FEMTO-ST Besançon, France MBT workshop April

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

A Case Study of Model-Based Testing

A Case Study of Model-Based Testing A Case Study of Model-Based Testing Using Microsoft Spec Explorer and Validation Framework Carleton University COMP 4905 Andrew Wylie Jean-Pierre Corriveau, Associate Professor, School of Computer Science

More information

Test Oracles and Mutation Testing. CSCE Lecture 23-11/18/2015

Test Oracles and Mutation Testing. CSCE Lecture 23-11/18/2015 Test Oracles and Mutation Testing CSCE 740 - Lecture 23-11/18/2015 Software Testing - Back to the Basics Tests are sequences of stimuli and observations. We care about input and output. (I 1 O 1 ) (I 2

More information

Ingegneria del Software Corso di Laurea in Informatica per il Management

Ingegneria del Software Corso di Laurea in Informatica per il Management Ingegneria del Software Corso di Laurea in Informatica per il Management Software testing Davide Rossi Dipartimento di Informatica Università di Bologna Validation and verification Software testing is

More information

Part II. Hoare Logic and Program Verification. Why specify programs? Specification and Verification. Code Verification. Why verify programs?

Part II. Hoare Logic and Program Verification. Why specify programs? Specification and Verification. Code Verification. Why verify programs? Part II. Hoare Logic and Program Verification Part II. Hoare Logic and Program Verification Dilian Gurov Props: Models: Specs: Method: Tool: safety of data manipulation source code logic assertions Hoare

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

Validation of models and tests for constrained combinatorial interaction testing

Validation of models and tests for constrained combinatorial interaction testing Validation of models and tests for constrained combinatorial interaction testing Paolo Arcaini Angelo Gargantini Paolo Vavassori University of Bergamo- Italy International Workshop on Combinatorial Testing

More information

Formale Entwicklung objektorientierter Software

Formale Entwicklung objektorientierter Software Formale Entwicklung objektorientierter Software Praktikum im Wintersemester 2008/2009 Prof. P. H. Schmitt Christian Engel, Benjamin Weiß Institut für Theoretische Informatik Universität Karlsruhe 5. November

More information

How to Optimize the Use of SAT and SMT Solvers for Test Generation of Boolean Expressions

How to Optimize the Use of SAT and SMT Solvers for Test Generation of Boolean Expressions How to Optimize the Use of SAT and SMT Solvers for Test Generation of Boolean Expressions Paolo Arcaini 1, Angelo Gargantini 1 and Elvinia Riccobene 2 1 Dipartimento di Ingegneria, Università degli Studi

More information

Testing, Debugging, Program Verification

Testing, Debugging, Program Verification Testing, Debugging, Program Verification Automated Test Case Generation, Part II Wolfgang Ahrendt & Vladimir Klebanov & Moa Johansson 12 December 2012 TDV: ATCG II /GU 2011-12-12 1 / 17 Recap Specification-/Model-Based

More information

Observation-Based Modeling for Testing and Verifying Highly Dependable Systems A Practitioner s Approach

Observation-Based Modeling for Testing and Verifying Highly Dependable Systems A Practitioner s Approach Observation-Based Modeling for Testing and Verifying Highly Dependable Systems A Practitioner s Approach Teemu Kanstrén 1, Eric Piel 2, Alberto Gonzalez 2, and Hans-Gerhard Gross 2 1 VTT, Kaitováylá 1,

More information

https://www.lri.fr/ linaye/gl.html

https://www.lri.fr/ linaye/gl.html Software Engineering https://www.lri.fr/ linaye/gl.html lina.ye@centralesupelec.fr Sequence 3, 2017-2018 1/61 Software Engineering Plan 1 2 3 4 5 2/61 Software Engineering Software Testing 3/61 Software

More information

A Java Reference Model of Transacted Memory for Smart Cards

A Java Reference Model of Transacted Memory for Smart Cards Erik Poll p.1/23 A Java Reference Model of Transacted Memory for Smart Cards Erik Poll University of Nijmegen Joint work with Pieter Hartel Eduard de Jong University of Twente Sun Microsystems Erik Poll

More information

Self-checking software insert specifications about the intent of a system

Self-checking software insert specifications about the intent of a system Assertions Reading assignment A. J. Offutt, A Practical System for Mutation Testing: Help for the Common Programmer, Proceedings of the 12th International Conference on Testing Computer Software, Washington,

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

Finite State Verification. CSCE Lecture 14-02/25/2016

Finite State Verification. CSCE Lecture 14-02/25/2016 Finite State Verification CSCE 747 - Lecture 14-02/25/2016 So, You Want to Perform Verification... You have a property that you want your program to obey. Great! Let s write some tests! Does testing guarantee

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

An Eclipse Plug-in for Model Checking

An Eclipse Plug-in for Model Checking An Eclipse Plug-in for Model Checking Dirk Beyer, Thomas A. Henzinger, Ranjit Jhala Electrical Engineering and Computer Sciences University of California, Berkeley, USA Rupak Majumdar Computer Science

More information

Scenario-based Validation of Embedded Systems

Scenario-based Validation of Embedded Systems Scenario-based Validation of Embedded Systems A. Gargantini DIIMM, Università di Bergamo, Italy angelo.gargantini@unibg.it E. Riccobene, P. Scandurra, A. Carioni DTI, Università di Milano, Italy {riccobene,

More information

Distributed Runtime Verification of JADE and Jason Multiagent Systems with Prolog?

Distributed Runtime Verification of JADE and Jason Multiagent Systems with Prolog? Distributed Runtime Verification of JADE and Jason Multiagent Systems with Prolog? Daniela Briola, Viviana Mascardi, and Davide Ancona DIBRIS, Genoa University, Italy daniela.briola,viviana.mascardi,davide.ancona@unige.it

More information

Formal methods What are they? Uses Tools Application to software development

Formal methods What are they? Uses Tools Application to software development FormalMethods Page 1 Formal methods introduction 9:26 PM Formal methods What are they? Uses Tools Application to software development FormalMethods Page 2 What are formal methods? 9:49 PM Do you have any

More information

Design by Contract: An Overview

Design by Contract: An Overview : An Overview CSCI 5828 Michael M. Vitousek University of Colorado at Boulder michael.vitousek@colorado.edu March 21, 2012 1 / 35 Outline 1 Introduction Motivation and Introduction Simple Example Contract

More information

Modeling and Analyzing MAPE-K Feedback Loops for Self-adaptation

Modeling and Analyzing MAPE-K Feedback Loops for Self-adaptation Modeling and Analyzing MAPE-K Feedback Loops for Self-adaptation Paolo Arcaini DIGIP Università degli Studi di Bergamo, Italy Email: paolo.arcaini@unibg.it Elvinia Riccobene Dipartimento di Informatica

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

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

Object-Oriented Programming and Software Engineering CITS1001 MID-SEMESTER TEST

Object-Oriented Programming and Software Engineering CITS1001 MID-SEMESTER TEST Object-Oriented Programming and Software Engineering School of Computer Science & Software Engineering The University of Western Australia CITS1001 MID-SEMESTER TEST Semester 1, 2013 CITS1001 This Paper

More information

Java PathFinder JPF 2 Second Generation of Java Model Checker

Java PathFinder JPF 2 Second Generation of Java Model Checker Java PathFinder JPF 2 Second Generation of Java Model Checker Guenther Brand Mat. Nr. 9430535 27. 06. 2003 Abstract This essay is based on the papers Java PathFinder, Second Generation of Java Model Checker

More information

Finite State Verification. CSCE Lecture 21-03/28/2017

Finite State Verification. CSCE Lecture 21-03/28/2017 Finite State Verification CSCE 747 - Lecture 21-03/28/2017 So, You Want to Perform Verification... You have a property that you want your program to obey. Great! Let s write some tests! Does testing guarantee

More information

The Contract Pattern. Design by contract

The Contract Pattern. Design by contract The Contract Pattern Copyright 1997, Michel de Champlain Permission granted to copy for PLoP 97 Conference. All other rights reserved. Michel de Champlain Department of Computer Science University of Canterbury,

More information

Runtime assertion checking of multithreaded Java programs

Runtime assertion checking of multithreaded Java programs Master Thesis Runtime assertion checking of multithreaded Java programs An extension of the STROBE framework Author: Jorne Kandziora Supervisors: dr. M. Huisman dr. C.M. Bockisch M. Zaharieva-Stojanovski,

More information

ESC/Java 2. Checker for Java 2. Extended. Static. B y K ats man Andrey S oftware E ngineering S em inar

ESC/Java 2. Checker for Java 2. Extended. Static. B y K ats man Andrey S oftware E ngineering S em inar ESC/Java 2 Extended Static Checker for Java 2 B y K ats man Andrey S oftware E ngineering S em inar 2 0 0 8 Background ESC/Java - Original development by Compaq Systems Research Center (1997) as a successor

More information

PROCESS DEVELOPMENT METHODOLOGY The development process of an API fits the most fundamental iterative code development

PROCESS DEVELOPMENT METHODOLOGY The development process of an API fits the most fundamental iterative code development INTRODUCING API DESIGN PRINCIPLES IN CS2 Jaime Niño Computer Science, University of New Orleans New Orleans, LA 70148 504-280-7362 jaime@cs.uno.edu ABSTRACT CS2 provides a great opportunity to teach an

More information

ESC/Java2 extended static checking for Java Erik Poll Radboud University Nijmegen

ESC/Java2 extended static checking for Java Erik Poll Radboud University Nijmegen ESC/Java2 extended static checking for Java Erik Poll Radboud University Nijmegen Erik Poll - JML p.1/19 Extended static checker for Java ESC/Java by Rustan Leino et.al. Extension ESC/Java2 by David Cok

More information

Programming Embedded Systems

Programming Embedded Systems Programming Embedded Systems Lecture 8 Overview of software testing Wednesday Feb 8, 2012 Philipp Rümmer Uppsala University Philipp.Ruemmer@it.uu.se 1/53 Lecture outline Testing in general Unit testing

More information

10. Software Testing Fundamental Concepts

10. Software Testing Fundamental Concepts 10. Software Testing Fundamental Concepts Department of Computer Science and Engineering Hanyang University ERICA Campus 1 st Semester 2016 Testing in Object-Oriented Point of View Error Correction Cost

More information

Introduction to Software Testing Chapter 5.1 Syntax-based Testing

Introduction to Software Testing Chapter 5.1 Syntax-based Testing Introduction to Software Testing Chapter 5.1 Syntax-based Testing Paul Ammann & Jeff Offutt http://www.cs.gmu.edu/~offutt/ softwaretest/ Ch. 5 : Syntax Coverage Four Structures for Modeling Software Graphs

More information

No Source Code. EEC 521: Software Engineering. Specification-Based Testing. Advantages

No Source Code. EEC 521: Software Engineering. Specification-Based Testing. Advantages No Source Code : Software Testing Black-Box Testing Test-Driven Development No access to source code So test cases don t worry about structure Emphasis is only on ensuring that the contract is met Specification-Based

More information

Generation of Behavior-Driven Development C ++ Tests from Abstract State Machine Scenarios

Generation of Behavior-Driven Development C ++ Tests from Abstract State Machine Scenarios Generation of Behavior-Driven Development C ++ Tests from Abstract State Machine Scenarios Silvia Bonfanti 1, Angelo Gargantini 1, and Atif Mashkoor 2,3 1 Università degli Studi di Bergamo, Italy {silvia.bonfanti,angelo.gargantini}@unibg.it

More information

Finding and Fixing Bugs in Liquid Haskell. Anish Tondwalkar

Finding and Fixing Bugs in Liquid Haskell. Anish Tondwalkar Finding and Fixing Bugs in Liquid Haskell Anish Tondwalkar Overview Motivation Liquid Haskell Fault Localization Fault Localization Evaluation Predicate Discovery Predicate Discovery Evaluation Conclusion

More information

CSC Advanced Object Oriented Programming, Spring Specification

CSC Advanced Object Oriented Programming, Spring Specification CSC 520 - Advanced Object Oriented Programming, Spring 2018 Specification Specification A specification is an unambiguous description of the way the components of the software system should be used and

More information

JML. Java Modeling Language

JML. Java Modeling Language JML Java Modeling Language Overview About the JML Project DBC Design By Contract JML concepts, examples, syntax and capabilities Basics Exceptions Invariants Assertions Quantifiers Other keywords JML hiding

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

JML Class Specifications The Java Modeling Language (Part 2) A Java Class

JML Class Specifications The Java Modeling Language (Part 2) A Java Class JML Class Specifications The Java Modeling Language (Part 2) Wolfgang Schreiner Wolfgang.Schreiner@risc.jku.at Research Institute for Symbolic Computation (RISC) Johannes Kepler University, Linz, Austria

More information

MTAT : Software Testing

MTAT : Software Testing MTAT.03.159: Software Testing Lecture 04: White-Box Testing (advanced) Part1 Dietmar Pfahl Spring 2018 email: dietmar.pfahl@ut.ee White-Box Testing Techniques Control-Flow Testing Data-Flow Testing Mutation

More information

Black Box Testing. EEC 521: Software Engineering. Specification-Based Testing. No Source Code. Software Testing

Black Box Testing. EEC 521: Software Engineering. Specification-Based Testing. No Source Code. Software Testing Black Box Testing EEC 521: Software Engineering Software Testing Black-Box Testing Test-Driven Development Also known as specification-based testing Tester has access only to running code and the specification

More information

Formal Methods for Java

Formal Methods for Java Formal Methods for Java Lecture 1: Introduction Jochen Hoenicke Software Engineering Albert-Ludwigs-University Freiburg October 26, 2011 Jochen Hoenicke (Software Engineering) Formal Methods for Java October

More information

An Empirical Comparison of Automated Generation and Classification Techniques for Object-Oriented Unit Testing

An Empirical Comparison of Automated Generation and Classification Techniques for Object-Oriented Unit Testing An Empirical Comparison of Automated Generation and Classification Techniques for Object-Oriented Unit Testing Marcelo d Amorim (UIUC) Carlos Pacheco (MIT) Tao Xie (NCSU) Darko Marinov (UIUC) Michael D.

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

Advances in Programming Languages

Advances in Programming Languages Advances in Programming Languages Lecture 12: Practical Tools for Java Correctness Ian Stark School of Informatics The University of Edinburgh Friday 31 November 2014 Semester 1 Week 7 http://www.inf.ed.ac.uk/teaching/courses/apl

More information

Testing. ECE/CS 5780/6780: Embedded System Design. Why is testing so hard? Why do testing?

Testing. ECE/CS 5780/6780: Embedded System Design. Why is testing so hard? Why do testing? Testing ECE/CS 5780/6780: Embedded System Design Scott R. Little Lecture 24: Introduction to Software Testing and Verification What is software testing? Running a program in order to find bugs (faults,

More information

Structural Testing & Mutation

Structural Testing & Mutation Structural Testing & Mutation Filippo Ricca DISI, Università di Genova, Italy ricca@disi.unige.it 1 White vs. Black box testing A white box testing is based upon explicit knowledge of the SUT and its structure

More information

Model Checking with Automata An Overview

Model Checking with Automata An Overview Model Checking with Automata An Overview Vanessa D Carson Control and Dynamical Systems, Caltech Doyle Group Presentation, 05/02/2008 VC 1 Contents Motivation Overview Software Verification Techniques

More information

The Java Modeling Language (Part 2)

The Java Modeling Language (Part 2) The Java Modeling Language (Part 2) Wolfgang Schreiner Wolfgang.Schreiner@risc.jku.at Research Institute for Symbolic Computation (RISC) Johannes Kepler University, Linz, Austria http://www.risc.jku.at

More information

CMPSCI 521/621 Homework 2 Solutions

CMPSCI 521/621 Homework 2 Solutions CMPSCI 521/621 Homework 2 Solutions Problem 1 Direct data dependencies: 3 is directly data dependent on 1 and 5 5 is directly data dependent on 1,3, and 5 7 is directly data dependent on 1,3, and 5 Note,

More information

Canica: An IDE for the Java Modeling Language

Canica: An IDE for the Java Modeling Language Canica: An IDE for the Java Modeling Language Angelica B. Perez, Yoonsik Cheon, and Ann Q. Gates TR #06-36 August 2006 Keywords: Integrated development environment, specification tool, programming tool,

More information

Using Model Checking to Generate Tests from Requirement Specifications

Using Model Checking to Generate Tests from Requirement Specifications Using Model Checking to Generate Tests from Requirement Authors: A. Gargantini & C. Heitmeyer Presented By Dishant Langayan Overview Automate construction of test sequences from a SCR requirements specification

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

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

Formal Verification for safety critical requirements From Unit-Test to HIL

Formal Verification for safety critical requirements From Unit-Test to HIL Formal Verification for safety critical requirements From Unit-Test to HIL Markus Gros Director Product Sales Europe & North America BTC Embedded Systems AG Berlin, Germany markus.gros@btc-es.de Hans Jürgen

More information

Test Advising Framework

Test Advising Framework University of Nebraska - Lincoln DigitalCommons@University of Nebraska - Lincoln Computer Science and Engineering: Theses, Dissertations, and Student Research Computer Science and Engineering, Department

More information

Model Checking Applications of Aspects and Superimpositions

Model Checking Applications of Aspects and Superimpositions Model Checking Applications of Aspects and Superimpositions Marcelo Sihman and Shmuel Katz Department of Computer Science Technion - Israel Institute of Technology Haifa 32000, Israel {sihman, katz@cs.technion.ac.il

More information

International Journal of Advanced Research in Computer Science and Software Engineering

International Journal of Advanced Research in Computer Science and Software Engineering Volume 3, Issue 4, April 2013 ISSN: 2277 128X International Journal of Advanced Research in Computer Science and Software Engineering Research Paper Available online at: www.ijarcsse.com Testing Techniques

More information

On the Role of Formal Methods in Software Certification: An Experience Report

On the Role of Formal Methods in Software Certification: An Experience Report Electronic Notes in Theoretical Computer Science 238 (2009) 3 9 www.elsevier.com/locate/entcs On the Role of Formal Methods in Software Certification: An Experience Report Constance L. Heitmeyer 1,2 Naval

More information

Object Ownership in Program Verification

Object Ownership in Program Verification Object Ownership in Program Verification Werner Dietl 1 and Peter Müller 2 1 University of Washington wmdietl@cs.washington.edu 2 ETH Zurich peter.mueller@inf.ethz.ch Abstract. Dealing with aliasing is

More information

Approximate Transformations as Mutation Operators

Approximate Transformations as Mutation Operators Approximate Transformations as Mutation Operators ICST 18 Västerås, Sweden April 12 th, 2018 Farah Hariri, August Shi, Owolabi Legunsen Milos Gligoric, Sarfraz Khurshid, Sasa Misailovic CCF- 1409423, CCF-1421503,

More information

JML tool-supported specification for Java Erik Poll Radboud University Nijmegen

JML tool-supported specification for Java Erik Poll Radboud University Nijmegen JML tool-supported specification for Java Erik Poll Radboud University Nijmegen Erik Poll - JML p.1/41 Overview The specification language JML Tools for JML, in particular runtime assertion checking using

More information

No model may be available. Software Abstractions. Recap on Model Checking. Model Checking for SW Verif. More on the big picture. Abst -> MC -> Refine

No model may be available. Software Abstractions. Recap on Model Checking. Model Checking for SW Verif. More on the big picture. Abst -> MC -> Refine No model may be available Programmer Software Abstractions Tests Coverage Code Abhik Roychoudhury CS 5219 National University of Singapore Testing Debug Today s lecture Abstract model (Boolean pgm.) Desirable

More information

Proof Carrying Code(PCC)

Proof Carrying Code(PCC) Discussion p./6 Proof Carrying Code(PCC Languaged based security policy instead of OS-based A mechanism to determine with certainity that it is safe execute a program or not Generic architecture for providing

More information

Specification-based Testing of Embedded Systems H. Schlingloff, SEFM 2008

Specification-based Testing of Embedded Systems H. Schlingloff, SEFM 2008 SEFM School 2008 Specification-based Testing of Embedded Systems Prof. Dr. Holger Schlingloff Humboldt-Universität zu Berlin and Fraunhofer FIRST, Berlin Lecture 4: Mutations, OCL etc. Course Outline L1:

More information

Software Testing. Testing: Our Experiences

Software Testing. Testing: Our Experiences Software Testing Testing: Our Experiences Test Case Software to be tested Output 1 Test Case Generation When to Stop? Test Case Software to be tested Verification Output No Enough? Test Coverage Yes A

More information

ISO compliant verification of functional requirements in the model-based software development process

ISO compliant verification of functional requirements in the model-based software development process requirements in the model-based software development process Hans J. Holberg SVP Marketing & Sales, BTC Embedded Systems AG An der Schmiede 4, 26135 Oldenburg, Germany hans.j.holberg@btc-es.de Dr. Udo

More information

Specification-based test design

Specification-based test design Software and Systems Verification (VIMIMA01) Specification-based test design Zoltan Micskei, Istvan Majzik Budapest University of Technology and Economics Fault Tolerant Systems Research Group Budapest

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

Test automation / JUnit. Building automatically repeatable test suites

Test automation / JUnit. Building automatically repeatable test suites Test automation / JUnit Building automatically repeatable test suites Test automation n Test automation is software that automates any aspect of testing n Generating test inputs and expected results n

More information

Test automation Test automation / JUnit

Test automation Test automation / JUnit Test automation Test automation / JUnit Building automatically repeatable test suites Test automation is software that automates any aspect of testing Generating test inputs and expected results Running

More information

Analysis and Research on the Automated Generation of Unit Test

Analysis and Research on the Automated Generation of Unit Test 1+, 1 1, 1 (, 200062) Analysis and Research on the Automated Generation of Unit Test XU Guo-qing 1+, YANG Zong-yuan 1, HUANG Hai-tao 1 1 (Software Engineering Lab, Department of Computer Science, East

More information

Hardware Design and Simulation for Verification

Hardware Design and Simulation for Verification Hardware Design and Simulation for Verification by N. Bombieri, F. Fummi, and G. Pravadelli Universit`a di Verona, Italy (in M. Bernardo and A. Cimatti Eds., Formal Methods for Hardware Verification, Lecture

More information

Overview The Java Modeling Language (Part 1) Related Work

Overview The Java Modeling Language (Part 1) Related Work Overview The Java Modeling Language (Part 1) Wolfgang Schreiner Wolfgang.Schreiner@risc.jku.at Research Institute for Symbolic Computation (RISC) Johannes Kepler University, Linz, Austria http://www.risc.jku.at

More information

Software Testing. Overview

Software Testing. Overview Software Testing Overview Software is NOT simply programming! Complex development process required Domain of Software Engineering Top Down software development popular The WaterFall model... November 28,

More information

Analysis of Software Artifacts

Analysis of Software Artifacts Analysis of Software Artifacts Properties with ESC/Java Jonathan Aldrich 1 ESC/Java A checker for Java programs Finds null pointers, array dereferences Checks Hoare logic specifications Expressed in Java

More information

Java Modeling Language (JML)

Java Modeling Language (JML) CIS 771: Software Specifications Introduction to JML Java Modeling Language (JML) A behavioral interface specification language for Java supporting design-by-contract (DBC)... invented by Gary T. Leavens

More information

A Correctness Proof for a Practical Byzantine-Fault-Tolerant Replication Algorithm

A Correctness Proof for a Practical Byzantine-Fault-Tolerant Replication Algorithm Appears as Technical Memo MIT/LCS/TM-590, MIT Laboratory for Computer Science, June 1999 A Correctness Proof for a Practical Byzantine-Fault-Tolerant Replication Algorithm Miguel Castro and Barbara Liskov

More information

In this Lecture you will Learn: Testing in Software Development Process. What is Software Testing. Static Testing vs.

In this Lecture you will Learn: Testing in Software Development Process. What is Software Testing. Static Testing vs. In this Lecture you will Learn: Testing in Software Development Process Examine the verification and validation activities in software development process stage by stage Introduce some basic concepts of

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