Abstract
We present and evaluate an automatic tool for extracting algebraic specifications from Java classes. Our tool maps a Java class to an algebraic signature and then uses the signature to generate a large number of terms. The tool evaluates these terms and based on the results of the evaluation, it proposes equations. Finally, the tool generalizes equations to axioms and eliminates many redundant axioms. Since our tool uses dynamic information, it is not guaranteed to be sound or complete. However, we manually inspected the axioms generated in our experiments and found them all to be correct.
This work is suported by NSF grants CCR-0085792 and CCR-0086255, and an IBM Faculty Partnership Award. Any opinions, findings and conclusions or recommendations expressed in this material are the authors’ and do not necessarily reflect those of the sponsors.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Ammons, G., Bodik, R., Larus, J.R.: Mining specifications. In: Proceedings of the 29th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 4–16 (2002)
Angluin, D.: Inference of reversible languages. Journal of the ACM (JACM) 29(3), 741–765 (1982)
Antoy, S.: Systematic design of algebraic specifications. In: Proceedings of the Fifth International Workshop on Software Specification and Design, Pittsburgh, Pennsylvania (1989)
Antoy, S., Hamlet, D.: Automatically checking an implementation against its formal specification. IEEE Transactions on Software Engineering 26(1) (January 2000)
Astesiano, E., Kreowski, H.-J., Krieg-Brückner, B. (eds.): Algebraic Foundations of Systems Specification. Springer, Heidelberg (1999)
Bartussek, W., Parnas, D.L.: Using assertions about traces to write abstract specifications for software modules. In: Bracchi, G., Lockemann, P.C. (eds.) ECI 1978. LNCS, vol. 65, Springer, Heidelberg (1978)
Biermann, A.W.: On the inference of turing machines from sample computations. Artificial Intelligence 3, 181–198 (1972)
Biermann, A.W.: The inference of regular Lisp programs from examples. IEEE Transactions on Systems, Man, and Cybernetics 8, 585–600 (1978)
Biermann, A.W., Krishnaswamy, R.: Constructing programs from example computations. IEEE Transactions on Software Engineering 2(3), 141–153 (1976)
Boyapati, C., Khurshid, S., Marinov, D.: Korat: Automated testing based on java predicates. In: International Symposium on Software Testing and Analysis, Rome, Italy (July 2002)
Buy, U., Orso, A., Pezze, M.: Automated testing of classes. In: Proceedings of the International Symposium on Software Testing and Analysis, Portland, Oregon (2000)
Chen, H.Y., Tse, T.H., Chan, F.T., Chen, T.Y. In black and white: An integrated approach to class-level testing of object oriented programs. ACM Transactions on Software Engineering 7(3) (July 1998)
Dodoo, N., Donovan, A., Lin, L., Ernst, M.D.: Selecting predicates for implications in program analysis (March 2002), http://pag.lcs.mit.edu/~mernst/pubs/invariants-implications.pdf
Doong, R., Frankl, P.G.: The ASTOOT approach to testing object-oriented programs. ACM Transactions on Software Engineering 3(2) (April 1994)
Ernst, M.D., Cockrell, J., Griswold, W.G., Notkin, D.: Dynamically discovering likely program invariants to support program evolution. ACM Transactions on Software Engineering 27(2), 1–25 (2001)
Ernst, M.D., Czeisler, A., Griswold, W.G., Notkin, D.: Quickly detecting relevant program invariants. In: Proceedings of the 22nd International Conference on Software Engineering, pp. 449–458 (June 2000)
Ernst, M.D., Griswold, W.G., Kataoka, Y., Notkin, D.: Dynamically discovering program invariants involving collections. TR UW-CSE-99- 11-02, University of Washington (2000) (revised version of March 17, 2000)
Gannon, J., McMullin, P., Hamlet, R.: Databstraction implementation, specification and testing. ACM Transactions on Programming Languages and Systems 3(3), 211–223 (1981)
Graves, T.L., Harrold, M.J., Kim, J.-M., Porter, A., Rothermel, G.: An empirical study of regression test selection techniques. ACM Transactions on Software Engineering and Methodology (TOSEM) 10(2), 184–208 (2001)
Gries, D.: The science of programming. Texts and monographs in computer science. Springer, Heidelberg (1981)
Guttag, J.V., Hornig, J.J., Garland, S.J., Jones, K.D., Modet, A., Wing, J.M.: Larch: Languages and Tools for Formal Specification. Springer, Heidelberg (1993) (out of print)
Guttag, J.V., Horning, J.J.: The algebraic specification of abstract data types. Acta Informatica 10, 27–52 (1978)
Hangal, S., Lam, M.S.: Tracking down software bugs using automatic anomaly detection. In: Proceedings of the International Conference on Software Engineering, pp. 291–301 (May 2002)
Harder, M., Morse, B., Ernst, M.D.: Specification coverage as a measure of test suite quality, Septermber 25 (2001)
Hardy, S.: Synthesis of Lisp functions from examples. In: Proceedings of the Fourth International Joint Conference on Artificial Intelligence, pp. 240–245 (1975)
Helm, R., Holland, I.M., Gangopadhyay, D.: Contracts: specifying behavioral compositions in object-oriented systems. In: Proceedings of the European conference on object-oriented programming on Object-oriented programming systems, languages, and applications, pp. 169–180. ACM Press, New York (1990)
Hoare, C.A.R.: An axiomatic basis for computer programming. Communications of the ACM 12(10), 576–580 (1969)
Van Horebeek, I., Lewi, J.: Algebraic specifications in software engineering: an introduction. Springer, Heidelberg (1989)
Hughes, M., Stotts, D.: Daistish: Systematic algebraic testing for OO programs in the presence of side-effects. In: Proceedings of the International Symposium on Software Testing and Verification, San Diego, California (1996)
Janicki, R., Sekerinski, E.: Foundations of the trace assertion method of module interface specification. ACM Transactions on Software Engineering 27(7) (July 2001)
Jeng, B., Weyuker, E.J.: A simplified domain-testing strategy. ACM Transactions on Software Engineering 3(3), 254–270 (1994)
Kataoka, Y., Ernst, M.D., Griswold, W.G., Notkin, D.: Automated support for program refactoring using invariants. In: International Conference on Software Maintenance, Florence, Italy (2001)
Lin, H.: Procedural implementation of algebraic specification. ACM Transactions on Programming Languages and Systems (1993)
Martena, V., Orso, A., Pezze, M.: Interclass testing of object oriented software. In: Proc. of the IEEE International Conference on Engineering of Complex Computer Systems (2002)
Mitchell, J.C.: Foundations of Programming Languages. MIT Press, Cambridge (1996)
Nimmer, J.W., Ernst, M.D.: Automatic generation of program specifications. In: Proceedings of the 2002 International Symposium on Software Testing and Analysis (ISSTA), Rome (July 2002)
O’Callahan, R., Jackson, D.: Lackwit: A program understanding tool based on type inference. In: International Conference on Software Engineering, pp. 338–348 (1997)
Rugaber, S., Shikano, T., Kurt Stirewalt, R.E.: Adequate reverse engineering. In: Proceedings of the 16th Annual International Conference on Automated Software Engineering, pp. 232–241 (2001)
Sagiv, M., Reps, T., Wilhelm, R.: Parametric shape analysis via 3-valued logic. ACM Transactions on Programming Languages and Systems 24(3), 217–298 (2002)
Sankar, S.: Run-time consistency checking of algebraic specifications. In: Proceedings of the Symposium on Testing, Analysis, and Verification, Victoria, British Columbia, Canada (September 1991)
Sannella, D., Tarlecki, A.: Essential concepts of algebraic specification and program development. Formal Aspects of Computing 9, 229–269 (1997)
Shapiro, E.Y.: Algorithmic Program Debugging. In: ACM Distinguished Dissertation 1982. MIT Press, Cambridge (1982)
Summers, P.D.: A methodology for lisp program construction from examples. Journal of the ACM (JACM) 24(1), 161–175 (1977)
Whaley, J., Martin, M.C., Lam, M.S.: Automatic extraction of object-oriented component interfaces. In: Proceedings of the International Symposium of Software Testing and Analysis (2002)
Woodward, M.R.: Errors in algebraic specifications and an experimental mutation testing tool. IEEE Software Engineering Journal 8(4), 237–245 (1993)
Zhu, H., Hall, P.A.V., May, J.H.R.: Software unit test coverage and adequacy. ACM Computing Surveys (CSUR) 29(4), 366–427 (1997)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2003 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Henkel, J., Diwan, A. (2003). Discovering Algebraic Specifications from Java Classes. In: Cardelli, L. (eds) ECOOP 2003 – Object-Oriented Programming. ECOOP 2003. Lecture Notes in Computer Science, vol 2743. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-45070-2_19
Download citation
DOI: https://doi.org/10.1007/978-3-540-45070-2_19
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-40531-3
Online ISBN: 978-3-540-45070-2
eBook Packages: Springer Book Archive