Korat
Top Cited Papers
- 1 July 2002
- proceedings article
- Published by Association for Computing Machinery (ACM)
- Vol. 27 (4) , 123-133
- https://doi.org/10.1145/566172.566191
Abstract
This paper presents Korat, a novel framework for automated testing of Java programs. Given a formal specification for a method, Korat uses the method precondition to automatically generate all (nonisomorphic) test cases up to a given small size. Korat then executes the method on each test case, and uses the method postcondition as a test oracle to check the correctness of each output.To generate test cases for a method, Korat constructs a Java predicate (i.e., a method that returns a boolean) from the method's pre-condition. The heart of Korat is a technique for automatic test case generation: given a predicate and a bound on the size of its inputs, Korat generates all (nonisomorphic) inputs for which the predicate returns true. Korat exhaustively explores the bounded input space of the predicate but does so efficiently by monitoring the predicate's executions and pruning large portions of the search space.This paper illustrates the use of Korat for testing several data structures, including some from the Java Collections Framework. The experimental results show that it is feasible to generate test cases from Java predicates, even when the search space for inputs is very large. This paper also compares Korat with a testing framework based on declarative specifications. Contrary to our initial expectation, the experiments show that Korat generates test cases much faster than the declarative framework.Keywords
This publication has 15 references indexed in Scilit:
- A micromodularity mechanismPublished by Association for Computing Machinery (ACM) ,2001
- Generating effective symmetry-breaking predicates for search problemsElectronic Notes in Discrete Mathematics, 2001
- The pointer assertion logic enginePublished by Association for Computing Machinery (ACM) ,2001
- Finding bugs with a constraint solverPublished by Association for Computing Machinery (ACM) ,2000
- BanderaPublished by Association for Computing Machinery (ACM) ,2000
- The design and implementation of an intentional naming systemPublished by Association for Computing Machinery (ACM) ,1999
- Solving shape-analysis problems in languages with destructive updatingACM Transactions on Programming Languages and Systems, 1998
- The model checker SPINIEEE Transactions on Software Engineering, 1997
- Model checking for programming languages using VeriSoftPublished by Association for Computing Machinery (ACM) ,1997
- Toward a theory of test data selectionACM SIGPLAN Notices, 1975