Abstract
To build a complete software system, it is widely recognized that a proper decomposition of the system into modules can facilitate the software construction process. Such decomposition can be accomplished by modeling software modules as Abstract Data Types (ADTs). ADTs can be formally specified by using Bartussek and Parnas' TRACE. We investigate the feasibility and practicality of translating TRACE specifications into Prolog programs, keeping a TRACE-like format, in such a way that can actually be executed. Besides exercising the specification before any implementation, we can run both the actual implementation and the TRACE specification and then verify whether the implementation matches the specification. Additionally, we can partially avoid the maintenance of test-case databases as the specification itself will provide output according to a given input. An experiment has been carried out.
On leave from CNPTIA-EMBRAPA, Campinas, Brazil (mario@cnptia.embrapa.br) and supported by CNPq (Process No. 260088/92.7,) Brasilia, Brazil.
On leave from CTI, Campinas, Brazil (clenio@ic.cti.br) and supported by CNPq (Process No. 200801/87-2,) Brasilia, Brazil.
This is a preview of subscription content, log in via an institution.
Preview
Unable to display preview. Download preview PDF.
References
W. Bartusseky and D.L. Parnas. Using assertion about trace to write abstract specification for software modules. In N. Gehani and A.D. McGettrick, editors, Software Specification Techniques, pages 111–130. Addison-Wesley, 1986.
C. Beirle and U. Pletat. Integrating logic programming and equational specification of abstract data types. In J. Grabowski, P. Lescanne, and W. Wechler, editors, Proceedings of the International Workshop on Algebraic and Logic Programming, number 343 in Lecture Notes in Computer Science, pages 71–82, Gaussig, GDR, November 1988. Springer-Verlag.
W.F. Clocksin and C.S. Mellish. Programming in Prolog. Springer-Verlag, Berlin, Heidelberg, third edition, 1987.
K. Drosten. Translating algebraic specifications to prolog programs: A comparative approach. In J. Grabowski, P. Lescanne, and W. Wechler, editors, Proceedings of the International Workshop on Algebraic and Logic Programming, number 343 in Lecture Notes in Computer Science, pages 137–146, Gaussig, GDR, November 1988. Springer-Verlag.
D. Hoffman. A CASE study in module testing. In Proceedings of the Conference on Software Maintenance, pages 100–105, Los Alamitos, USA, October 1989. IEEE Computer Society Press.
D. Hoffman and R. Snodgrass. Trace specifications: Methodology and models. IEEE Transactions on Software Engineering, 14(9):1243–1252, September 1988.
D. Hoffman and Y. Wang. Executables prototypes of trace specifications. In Proceedings of the Canadian Information Processing Society, pages 176–184, Edmonton, Canada, October 1987.
D. A. Lamb. Software Engineering — Planning for Change. Prentice-Hall, Englewood Clifs, USA, 1988.
C.G.N. Macario and F.B. Camargo. The component production line. In Proceedings of the 2nd International Workshop on the Brazilian Software Plant Project, pages 13–29, Campinas, Brazil, 1990. BB/EMBRAPA/CTI.
T.I. Ören. Artificial intelligence and quality assurance in computer aided systems theory. In F. Pichler and R. Moreno-Diaz, editors, Proceedings of the International Workshop on Computer Aided Systems Theory — EUROCAST'89, number 410 in Lecture Notes in Computer Science, pages 336–344, Las Palmas, Spain, March 1989. Springer-Verlag.
T.I. Ören. Computer aided systems technology: Its role in advanced computerization. In F. Pichler and R. Moreno-Diaz, editors, Proceedings of the Third International Workshop on Computer Aided Systems Theory — EUROCAST'93, number 763 in Lecture Notes in Computer Science, pages 11–20, Las Palmas, Spain, February 1993. Springer-Verlag.
D.L. Parnas and Y. Wang. The trace assertion method of module interface specfication. CRL Report 244, McMaster University, May 1992.
G.G. Schulmeyer. The move toward zero defect software. In G.G. Schulmeyer and J.I. McManus, editors, Handbook of Softeware Quality Assurance, chapter 10, pages 189–224. Van Nostrand-Reinhold, New Yourk, USA, 1992.
P. Strooper and D. Hoffman. Prolog testing of C modules. In V. Sraswat and K. Ueda, editors, Proceedings of the 1991 International Symposium on Logic Programming, pages 596–608, San Diego, USA, October 1991. MIT Press.
M.M. Tanik and A. Ertas. Design as a basis for unification: Systems interface engineering. In Proceedings of the 16th Annual ASME-ETCE Conference, pages 113–114, Houston, USA, 1992. ASME. Symposium on Computer Applications and Design Abstractions (PD-Vol.43).
A. Togashi and S. Noguchi. A program transformation from equational programs into logic programs. Journal of Logic Programming, 4(2):85–103, June 1987.
Y. Wang and D.L. Parnas. Simulating the behavior of software modules by trace rewriting. In Proceedings 15th International Conference on Software Engineering, Baltimore, USA, 1993. IEEE Computer Society Press.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1996 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Nascimento, M.A., Salviano, C.F., Tanik, M.M. (1996). Using logic programming to test module specifications in early stages of software development. In: Klir, G.J., Ören, T.I. (eds) Computer Aided Systems Theory — CAST '94. Lecture Notes in Computer Science, vol 1105. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-61478-8_90
Download citation
DOI: https://doi.org/10.1007/3-540-61478-8_90
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-61478-4
Online ISBN: 978-3-540-68600-2
eBook Packages: Springer Book Archive