Skip to main content

Using logic programming to test module specifications in early stages of software development

  • CAST Tools and Environments
  • Conference paper
  • First Online:
  • 163 Accesses

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1105))

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.

Unable to display preview. Download preview PDF.

References

  1. 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.

    Google Scholar 

  2. 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.

    Google Scholar 

  3. W.F. Clocksin and C.S. Mellish. Programming in Prolog. Springer-Verlag, Berlin, Heidelberg, third edition, 1987.

    Google Scholar 

  4. 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.

    Google Scholar 

  5. 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.

    Google Scholar 

  6. D. Hoffman and R. Snodgrass. Trace specifications: Methodology and models. IEEE Transactions on Software Engineering, 14(9):1243–1252, September 1988.

    Google Scholar 

  7. 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.

    Google Scholar 

  8. D. A. Lamb. Software Engineering — Planning for Change. Prentice-Hall, Englewood Clifs, USA, 1988.

    Google Scholar 

  9. 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.

    Google Scholar 

  10. 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.

    Google Scholar 

  11. 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.

    Google Scholar 

  12. D.L. Parnas and Y. Wang. The trace assertion method of module interface specfication. CRL Report 244, McMaster University, May 1992.

    Google Scholar 

  13. 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.

    Google Scholar 

  14. 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.

    Google Scholar 

  15. 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).

    Google Scholar 

  16. A. Togashi and S. Noguchi. A program transformation from equational programs into logic programs. Journal of Logic Programming, 4(2):85–103, June 1987.

    Google Scholar 

  17. 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.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

George J. Klir Tuncer I. Ören

Rights and permissions

Reprints 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

Publish with us

Policies and ethics