Extension of Interface Signature Descriptions for Automatic Test Generation Evgeny Chernov Institute for System Programming of RAS SYRCoSE 2008.

Slides:



Advertisements
Similar presentations
Construction process lasts until coding and testing is completed consists of design and implementation reasons for this phase –analysis model is not sufficiently.
Advertisements

OO Programming in Java Objectives for today: Overriding the toString() method Polymorphism & Dynamic Binding Interfaces Packages and Class Path.
Model Based Testing in Linux Standard Base Compliance Program A.V.Khoroshilov, A.K.Petrenko { khoroshilov, petrenko ispras.ru MBT Users Conference.
1 l Inheritance Basics l Programming with Inheritance l Dynamic Binding and Polymorphism Inheritance.
Automated creation of verification models for C-programs Yury Yusupov Saint-Petersburg State Polytechnic University The Second Spring Young Researchers.
Formal Methods of Systems Specification Logical Specification of Hard- and Software Prof. Dr. Holger Schlingloff Institut für Informatik der.
 2006 Pearson Education, Inc. All rights reserved Introduction to Classes and Objects.
Arrays An array is a collection of variables, all of the same type. An array is created with the new operator. The size of an array must be specified at.
1 Chapter 7 l Inheritance Basics l Programming with Inheritance l Dynamic Binding and Polymorphism Inheritance.
Feb. 23, 2004CS WPI1 CS 509 Design of Software Systems Lecture #5 Monday, Feb. 23, 2004.
AP Computer Science.  Not necessary but good programming practice in Java  When you override a super class method notation.
Programming Languages and Paradigms Object-Oriented Programming.
CSM-Java Programming-I Spring,2005 Introduction to Objects and Classes Lesson - 1.
C++ Programming: Program Design Including Data Structures, Fourth Edition Chapter 13: Pointers, Classes, Virtual Functions, and Abstract Classes.
C++ Programming: From Problem Analysis to Program Design, Fourth Edition Chapter 14: Pointers, Classes, Virtual Functions, and Abstract Classes.
Epydoc API Documentation Extraction in Python Edward Loper.
CSM-Java Programming-I Spring,2005 Objects and Classes Overview Lesson - 1.
Supporting Automatic Model Inconsistency Fixing Yingfei Xiong University of Tokyo, Japan Zhenjiang HuNational Institute of Informatics, Japan Haiyan ZhaoPeking.
Introduction to JavaServer Pages (JSP) Slides from Dr. Mark Llewellyn.
Contract Specification of Pipelined Designs Alexander Kamkin Institute for System Programming of RAS
COP INTERMEDIATE JAVA Designing Classes. Class Template or blueprint for creating objects. Their definition includes the list of properties (fields)
Programming in Java Unit 2. Class and variable declaration A class is best thought of as a template from which objects are created. You can create many.
Introduction to C++ Systems Programming. Systems Programming: Introduction to C++ 2 Systems Programming: 2 Introduction to C++  Syntax differences between.
Introduction to Programming David Goldschmidt, Ph.D. Computer Science The College of Saint Rose Java Fundamentals (Comments, Variables, etc.)
CS212: Object Oriented Analysis and Design Lecture 6: Friends, Constructor and destructors.
Hello.java Program Output 1 public class Hello { 2 public static void main( String [] args ) 3 { 4 System.out.println( “Hello!" ); 5 } // end method main.
Objective-C OOP Spring OOP Conceptually the same as C++, Java, and all other object oriented languages The syntax, however… …is, well, different.
C#.Net Development Version 1.0. Overview Nullable Datatype Description ? HasValue Lifted Conversions null coalescing operator ?? Partial Classes Copyright.
Session 08 Module 14: Generics and Iterator Module 15: Anonymous & partial class & Nullable type.
Java Objects and Classes. Overview n Creating objects that belong to the classes in the standard Java library n Creating your own classes.
Chair of Software Engineering 1 Introduction to Programming Bertrand Meyer Exercise Session October 2008.
1 Innovative Solutions For Mission Critical Systems Using EMF Annotations to Drive Program Behavior February 19, 2014.
Today’s Agenda  Reminder: HW #1 Due next class  Quick Review  Input Space Partitioning Software Testing and Maintenance 1.
Topic 1 Object Oriented Programming. 1-2 Objectives To review the concepts and terminology of object-oriented programming To discuss some features of.
Object Oriented Programming (OOP) Lecture No. 8. Review ► Class  Concept  Definition ► Data members ► Member Functions ► Access specifier.
CSC241 Object-Oriented Programming (OOP) Lecture No. 4.
Chapter 10 Defining Classes. The Internal Structure of Classes and Objects Object – collection of data and operations, in which the data can be accessed.
COP INTERMEDIATE JAVA Designing Classes. Class Template or blueprint for creating objects. Their definition includes the list of properties (fields)
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 1 Slide 1 Use Case Packets.
CS 61B Data Structures and Programming Methodology July 2, 2008 David Sun.
Class Builder Tutorial Presented By- Amit Singh & Sylendra Prasad.
ISP RAS Java Specification Extension for Automated Test Development Igor B. Bourdonov, Alexei V. Demakov, Andrei A. Jarov, Alexander S. Kossatchev, Victor.
CSC241 Object-Oriented Programming (OOP) Lecture No. 5.
Generics in C# 1. Generics List vs. non-generic ArrayList Generic List Namespace System.Collections.Generic List list = new List (); List.add(”Anders”);
Application development with Java Lecture 21. Inheritance Subclasses Overriding Object class.
Programmeren 1 6 september 2010 HOORCOLLEGE 2: INTERACTIE EN CONDITIES PROGRAMMEREN 1 6 SEPTEMBER 2009 Software Systems - Programming - Week.
Interfaces F What is an Interface? F Creating an Interface F Implementing an Interface F What is Marker Interface?
Inheritance and Class Hierarchies Chapter 3. Chapter 3: Inheritance and Class Hierarchies2 Chapter Objectives To understand inheritance and how it facilitates.
Inheritance and Class Hierarchies Chapter 3. Chapter Objectives  To understand inheritance and how it facilitates code reuse  To understand how Java.
PROGRAMMING PRE- AND POSTCONDITIONS, INVARIANTS AND METHOD CONTRACTS B MODULE 2: SOFTWARE SYSTEMS 13 NOVEMBER 2013.
1 Contractual Consistency Between BON Static and Dynamic Diagrams Ali Taleghani July 30, 2004.
Topic 1 Object Oriented Programming. 1-2 Objectives To review the concepts and terminology of object-oriented programming To discuss some features of.
Andrey Karaulov, Alexander Strabykin Institute for System Programming Russian Academy of Sciences SYRCoSE: Spring Young Researchers Colloquium on Software.
 Description of Inheritance  Base Class Object  Subclass, Subtype, and Substitutability  Forms of Inheritance  Modifiers and Inheritance  The Benefits.
CSE 332: C++ templates and generic programming II Review: Concepts and Models Templates impose requirements on type parameters –Types that are plugged.
2/23- Interfaces Reference: Java 6.5 and 9.3. PA-4 Review Requirements PA3 – Grading Key PA4 Requirements Doc.
A Simple Object Oriented Program public class Simple { public static void main (String [] args) { System.out.println(“howdy”); } System.out is an object.
Inheritance Chapter 7 Inheritance Basics Programming with Inheritance
Passing from design to implementation
Lecture 12 Inheritance.
Object Oriented Programming in Java
Object Oriented Analysis and Design
Inheritance Basics Programming with Inheritance
null, true, and false are also reserved.
Abstract Class As per dictionary, abstraction is the quality of dealing with ideas rather than events. For example, when you consider the case of ,
Computer Programming with JAVA
Object-Oriented Programming in PHP
ArrayLists 22-Feb-19.
An Extensible Contract Verifier for AspectJ
Special Registers, Date functions, Case and User Defined Functions!!
Presentation transcript:

Extension of Interface Signature Descriptions for Automatic Test Generation Evgeny Chernov Institute for System Programming of RAS SYRCoSE 2008

2 Overview 1) Problem with testing big software system. 2) Extension of interface signature by specialized types. 3) Properties of specialized types. 4) Results of practical work.

3 Introduction Problem: tests for big system (>1000 interfaces). Possible solution: automatic generation of shallow (low quality) tests. It based on: Formal description of interfaces to test. Some specialized information about parameters. Problem: How to get such specialized information for all interfaces?

4 Suggested Solution The set of standard types is extended by specialized types. Standard types are replaced (if necessary) by specialized types in signature. Specialized type less_1 specifies that parameter should be less or equal to 1.

5 Specialized Types Specialized type has the following properties: Name Data type – standard type that can be replaced by the specialized type Base type – specialized type-parent (for inheritance) Kind – {normal, once-only, common for parameter, common for return value} Value Constraint Init/Final code Auxiliary code Proxy-value

6 Value of Specialized Type ‘Value’ specifies a way of initialization directly. Specialized TypeGenerated code value = 3Par_N = 3; value = “Test string”Par_N = “Test string”; value = truePar_N = true; value = create_param()Par_N = create_param(); value = $obj.first()SomeClass Obj; OtherClass Par_N = Obj.first(); N – is a number of parameter, which is using the specialized type with corresponding value.

7 Constraint of Specialized Type ‘Constraint’ attribute contains constraint on parameter. Specialized TypeGenerated code constraint = “$0 == 1”SomeClass Obj; Obj.someMethod(Par_1, Par_2, …); If (!(Par_1 == 1)) { /* printing error message */ } If (!(Par_2 != NULL)) { /* printing error message */ } If (!(Obj.isEmpty() == false)) { /* printing error message */ } constraint = “$0 != NULL” constraint = “$obj.isEmpty() == false” 1 st and 2 nd specialized types are used by 1 st and 2 nd parameters, and the last one is used by object.

8 Init / Final Code in Specialized Type ‘Init code’ is inserted up before calling of target interface, ‘final code’ – after. Specialized TypeGenerated code Init code = “ for (int i = 0; i < 10; i++){ $0.append(i); } ” SomeClass Obj; // Init code for (int i = 0; i < 10; i++) { Par_1.append(i); } // Call of target interface Obj.someMethod(Par_1,…); Final code = “close($0);”Par_1 = fopen(“test.cpp”, “r+”); Obj.someMethod(Par_1); // Final code close(Par_1);

9 Auxiliary Code of Specialized Type ‘Auxiliary code’ allow to creation complex way of initialization. It contains description of additional functions or classes. New special constructions:  $(type_name) – the instruction to create a variable of type ‘type_name’.  $[function] – the instruction to initialize and to call corresponding function. It allows to decrease time for creation specialized types and number of mistakes.

10 Auxiliary code: Example of Using Auxiliary codeGenerated code SomeClass* create_SomeClass() { SomeClass* Obj = new SomeClass(); Obj->setEnabled(true); Obj->setFont( $(QFont *) ); Obj->setIconSet( $(QIconSet) ); return Obj; } static const char * const XPM[]={ " ", "a c #cec6bd" } SomeClass* create_SomeClass() { SomeClass* Obj = new SomeClass(); Obj->setEnabled(true); Obj->setFont(new QFont(“Times”, 10, Bold)); QPixmap Par_1_1(XPM); QIconSet Par_1(Par_1_1); Obj->setIconSet(Par_1); return Obj; }

11 Complex Specialized Type Problem: how to describe this case: Par_1 = “Some String”; Par_2 = strlen( Par_1 ); Solution: join descriptions of all dependent parameters into one complex specialized type. ‘Proxy-value’ attribute contains a list of values for initialization every parameter. ‘Proxy-value’ for our example:  1) $1=“Some String”  2) strlen( $1 );

12 Extended Description

13 Inheritance of Specialized Types One specialized type can inherit some attributes from another:  Value  Constraint  Init/final code  Auxiliary code Specialized type 2 inherits specialized type 1

14 Results of Practical Work The mechanism of specialized types has been implemented within the limits of ‘LSB Infrastructure’ project in ISP RAS. It’s based on existing LSB database. LSB database has been extended by 8 new tables tests for Qt3 library and tests for Qt4 library were created. The process of creation of tests has been executed by 3 developers and has taken 6 months. The maximal speed of creation of tests reached 500 tests per day.

15 Thank you!