Skip to main content

Towards Provably Correct Code Generation via Horn Logical Continuation Semantics

  • Conference paper
Practical Aspects of Declarative Languages (PADL 2005)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 3350))

Included in the following conference series:

Abstract

Provably correct compilation is an important aspect in development of high assurance software systems. In this paper we explore approaches to provably correct code generation based on programming language semantics, particularly Horn logical semantics, and partial evaluation. We show that the definite clause grammar (DCG) notation can be used for specifying both the syntax and semantics of imperative languages. We next show that continuation semantics can also be expressed in the Horn logical framework.

The authors have been partially supported by NSF grants CCR 9900320, INT 9904063, and EIA 0130847, by the Department of Education and the Environmental Protection Agency, and by the Information Society Technologies programme of the European Commission, Future and Emerging Technologies under the IST-2001-38059 ASAP project.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Brogi, A., Contiero, S.: Specializing Meta-Level Compositions of Logic Programs. In: Gallagher, J.P. (ed.) LOPSTR 1996. LNCS, vol. 1207. Springer, Heidelberg (1997)

    Google Scholar 

  2. Debray, S.: Resource bounded partial evaluation. In: PEPM 1997, pp. 179–192 (1997)

    Google Scholar 

  3. Dold, A., Gaul, T., Zimmermann, W.: Mechanized Verification of Compiler Backends. In: Proc. Software Tools for Technology Transfer, Denmark (1998)

    Google Scholar 

  4. Faulk, S.R.: State Determination in Hard-Embedded Systems. Ph.D. Thesis. Univ. of NC, Chapel Hill, NC (1989)

    Google Scholar 

  5. Futamura, Y.: Partial Evaluation of Computer Programs: An approach to compilercompiler. J. Inst. Electronics and Comm. Engineers, Japan (1971)

    Google Scholar 

  6. Gupta, G.: Horn Logic Denotations and Their Applications. In: The Logic Programming Paradigm: A 25 year perspective, pp. 127–160. Springer, Heidelberg (1999)

    Google Scholar 

  7. Gupta, G., Pontelli, E.: A Constraint-based Denotational Approach to Specification and Verification of Real-time Systems. In: Proc. IEEE Real-time Systems Symposium, December 1997, pp. 230–239 (1997)

    Google Scholar 

  8. Gupta, G., Pontelli, E.: A Logic Programming Framework for Specification and Implementation of Domain Specific Languages. In: Essays in Honor of Robert Kowalski, vol. LNAI. Springer, Heidelberg (2003)

    Google Scholar 

  9. Henninger, K.L.: Specifying software requirements for complex systems: New techniques and their application. IEEE Trans. on Software Engg. 5(1), 2–13

    Google Scholar 

  10. Heitmeyer, C.L., Jeffords, R.D., Labaw, B.G.: Automated Consistency Checking of Requirements Specifications. ACM TOSEM 5(3) (1996)

    Google Scholar 

  11. Hoare, C.A.R.: The Verifying Compiler: A Grand Challenge for Computing Research. J. ACM 50(1), 63–69 (2003)

    Article  Google Scholar 

  12. Jones, N.: Introduction to Partial Evaluation. ACM Computing Surveys 28(3), 480–503

    Google Scholar 

  13. King, L., Gupta, G., Pontelli, E.: Verification of BART Controller. In: High Integrity Software. Kluwer Academic, Dordrecht (2001)

    Google Scholar 

  14. Leuschel, M., Jørgensen, J., Vanhoof, W., Bruynooghe, M.: Offline specialization in Prolog using a hand-written compiler generator. Theory and Practice of Logic Programming 4(1), 139–191 (2004)

    Article  MATH  Google Scholar 

  15. Leuschel, M., Martens, B., De Schreye, D.: Controlling Generalization and Polyvariance in Partial Deduction of Normal Logic Programs. ACM Transactions on Programming Languages and Systems (TOPLAS) 20(1), 208–258

    Google Scholar 

  16. Leonard, E.I., Heitmeyer, C.L.: Program Synthesis from Requirements Specifications Using APTS. Kluwer Academic Publishers, Dordrecht (2002)

    Google Scholar 

  17. Lloyd, J.: Foundations of Logic Programming, 2nd edn. Springer, Heidelberg (1987)

    MATH  Google Scholar 

  18. McCarthy, J., Painter, J.: Correctness of a Compiler for Arithmetic Expressions. MIT AI Lab Memo (1967)

    Google Scholar 

  19. Owen, S.: Issues in the Partial Evaluation of Meta-Interpreters. In: Proceedings Meta 1988, pp. 319–339. MIT Press, Cambridge (1988)

    Google Scholar 

  20. Paige, R.: Viewing a Program Transformation System at Work. In: Proc. Programming Language Implementation and Logic Programming. LNCS, vol. 844. Springer, Heidelberg (1994)

    Google Scholar 

  21. Pnueli, A., Siegel, M., Singerman, E.: Translation Validation. In: Steffen, B. (ed.) TACAS 1998. LNCS, vol. 1384, p. 151. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  22. Sahlin, D.: An Automatic Partial Evaluator for Full Prolog. Ph.D. Thesis. 1994. Royal Institute of Tech., Sweden., Available at http://www.sics.se

  23. Schmidt, D.: Denotational Semantics: a Methodology for Language Development. W.C. Brown Publishers (1986)

    Google Scholar 

  24. Sterling, L., Shapiro, S.: The Art of Prolog. MIT Press, Cambridge (1994)

    MATH  Google Scholar 

  25. Wang, Q., Gupta, G., Leuschel, M.: Horn Logical Continuation Semantics. UT Dallas Technical Report (2004)

    Google Scholar 

  26. Wang, Q., Gupta, G.: Resource Bounded Compilation via Constrained Partial Evaluation. UTD Technical Report. Forthcoming

    Google Scholar 

  27. Winter, V.L.: Program Transformation in HATS. Software Transformation Systems Workshop (1999)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2005 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Wang, Q., Gupta, G., Leuschel, M. (2005). Towards Provably Correct Code Generation via Horn Logical Continuation Semantics. In: Hermenegildo, M.V., Cabeza, D. (eds) Practical Aspects of Declarative Languages. PADL 2005. Lecture Notes in Computer Science, vol 3350. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-30557-6_9

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-30557-6_9

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-24362-5

  • Online ISBN: 978-3-540-30557-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics