Developing and debugging algebraic specifications for Java classes
(2008) In ACM Transactions on Software Engineering and Methodology 17(3).- Abstract
Modern programs make extensive use of reusable software libraries. For example, a study of a number of large Java applications shows that between 17% and 30% of the classes in those applications use container classes defined in the java.util package. Given this extensive code reuse in Java programs, it is important for the interfaces of reusable classes to be well documented. An interface is well documented if it satisfies the following requirements: (1) the documentation completely describes how to use the interface; (2) the documentation is clear; (3) the documentation is unambiguous; and (4) any deviation between the documentation and the code is machine detectable. Unfortunately, documentation in natural language, which is the norm,... (More)
Modern programs make extensive use of reusable software libraries. For example, a study of a number of large Java applications shows that between 17% and 30% of the classes in those applications use container classes defined in the java.util package. Given this extensive code reuse in Java programs, it is important for the interfaces of reusable classes to be well documented. An interface is well documented if it satisfies the following requirements: (1) the documentation completely describes how to use the interface; (2) the documentation is clear; (3) the documentation is unambiguous; and (4) any deviation between the documentation and the code is machine detectable. Unfortunately, documentation in natural language, which is the norm, does not satisfy the above requirements. Formal specifications can satisfy them but they are difficult to develop, requiring significant effort on the part of programmers. To address the practical difficulties with formal specifications, we describe and evaluate a tool to help programmers write and debug algebraic specifications. Given an algebraic specification of a class, our interpreter generates a prototype that can be used within an application like a regular Java class. When running an application that uses the prototype, the interpreter prints error messages that tell the developer in which way the specification is incomplete or inconsistent with a hand-coded implementation of the class. We use case studies to demonstrate the usefulness of our system.
(Less)
- author
- Henkel, Johannes
; Reichenbach, Christoph
LU
and Diwan, Amer
- publishing date
- 2008-06-01
- type
- Contribution to journal
- publication status
- published
- subject
- keywords
- Algebraic interpretation, Algebraic specifications, Specification discovery
- in
- ACM Transactions on Software Engineering and Methodology
- volume
- 17
- issue
- 3
- article number
- 14
- publisher
- Association for Computing Machinery (ACM)
- external identifiers
-
- scopus:46449105771
- ISSN
- 1049-331X
- DOI
- 10.1145/1363102.1363105
- language
- English
- LU publication?
- no
- id
- dea94c74-6bf1-4c24-87d1-ebaea80c26d1
- date added to LUP
- 2019-03-29 20:24:11
- date last changed
- 2022-01-31 18:36:04
@article{dea94c74-6bf1-4c24-87d1-ebaea80c26d1, abstract = {{<p>Modern programs make extensive use of reusable software libraries. For example, a study of a number of large Java applications shows that between 17% and 30% of the classes in those applications use container classes defined in the java.util package. Given this extensive code reuse in Java programs, it is important for the interfaces of reusable classes to be well documented. An interface is well documented if it satisfies the following requirements: (1) the documentation completely describes how to use the interface; (2) the documentation is clear; (3) the documentation is unambiguous; and (4) any deviation between the documentation and the code is machine detectable. Unfortunately, documentation in natural language, which is the norm, does not satisfy the above requirements. Formal specifications can satisfy them but they are difficult to develop, requiring significant effort on the part of programmers. To address the practical difficulties with formal specifications, we describe and evaluate a tool to help programmers write and debug algebraic specifications. Given an algebraic specification of a class, our interpreter generates a prototype that can be used within an application like a regular Java class. When running an application that uses the prototype, the interpreter prints error messages that tell the developer in which way the specification is incomplete or inconsistent with a hand-coded implementation of the class. We use case studies to demonstrate the usefulness of our system.</p>}}, author = {{Henkel, Johannes and Reichenbach, Christoph and Diwan, Amer}}, issn = {{1049-331X}}, keywords = {{Algebraic interpretation; Algebraic specifications; Specification discovery}}, language = {{eng}}, month = {{06}}, number = {{3}}, publisher = {{Association for Computing Machinery (ACM)}}, series = {{ACM Transactions on Software Engineering and Methodology}}, title = {{Developing and debugging algebraic specifications for Java classes}}, url = {{http://dx.doi.org/10.1145/1363102.1363105}}, doi = {{10.1145/1363102.1363105}}, volume = {{17}}, year = {{2008}}, }