Font Size: a A A

Assessing the Effectiveness of Design Contracts as Test Oracles in the Detection of Faults in Concurrent Object-Oriented Software

Posted on:2011-04-15Degree:Ph.DType:Dissertation
University:Carleton University (Canada)Candidate:Araujo, WladimirFull Text:PDF
GTID:1448390002454982Subject:Engineering
Abstract/Summary:
Design by Contract (DbC) is a software development methodology that focuses on clearly defining the interfaces between components to produce better quality object-oriented software. The idea behind DbC is that a method defines a contract stating the requirements a client needs to fulfill to use it, the precondition, and the properties it ensures after its execution, the postcondition.;This work presents a solution to the problem of applying DbC to concurrent programs. Java is used as the target programming language and the Java Modelling Language (JML) as the specification language. This work defines what the above challenges are, propose changes and additions to JML and show how these constructs address such challenges. The new constructs are incorporated into the JML compiler to allow for the generation of Runtime Assertion Checking (RAC) code for such constructs. The compiler and its associated runtime libraries are modified to allow for the evaluation of assertion checking code in a concurrent environment.;Four case studies present a detailed evaluation of the applicability of DbC and the instrumentation techniques developed to concurrent systems. They use a highly concurrent industrial system. The first one assess the ability of the constructs introduced in JML to specify this product. The second one applies the modified JML compiler to this system and determines that the instrumented version can be used during system testing in place of the production version. This is done by analyzing the static and dynamic resource requirements introduced by the instrumentation overhead together with an analysis of the possible thread interleavings present in both versions. The third one studies the ability of the RAC code in detecting and diagnosing concurrent faults during system testing. Finally, the fourth assesses the effectiveness of contracts as test oracles by analyzing the observability and diagnosability of the instrumented version of the system with respect to functional faults. Based on these results, clear and objective requirements are defined for contracts to be effective test oracles for concurrent programs whilst balancing the effort in their design.;Though there exists ample support for DbC for sequential programs, applying DbC to concurrent programs presents several challenges. The first challenge is interference, the product of multiple threads of execution modifying and accessing shared data. The second is the specification of thread-safety properties (which objects are accessed by a single thread) in the presence of inheritance. The third is the specification of locking properties, which include the locks required to be held prior to a method execution and the order locks need to be acquired.
Keywords/Search Tags:Concurrent, Test oracles, Dbc, JML, Faults, Contracts
Related items