Skip to main content

Specification, Implementation, and Verification of Domain Specific Languages: A Logic Programming-Based Approach

  • Chapter
  • First Online:
Computational Logic: Logic Programming and Beyond

Part of the book series: Lecture Notes in Computer Science ((LNAI,volume 2407))

  • 744 Accesses

Abstract

Domain Specific Languages (DSLs) are high level languages designed for solving problems in a particular domain, and have been suggested as means for developing reliable software systems. We present a (constraint) logic programming-based framework for specification, efficient implementation, and automatic verification of domain specific languages (DSLs). Our framework is based on using Horn logic (or pure Prolog), and eventually constraints, to specify denotational semantics of domain specific languages. Both the syntax as well as the semantic specification of the DSL in question are directly executable in our framework: the specification itself serves as an interpreter for the DSL. More efficient implementations of this DSL—a compiler—can be automatically derived via partial evaluation. Additionally, the executable specification can be used for automatic or semi-automatic verification of programs written in the DSL as well as for automatically obtaining traditional debuggers and profilers. The ability to verify DSL programs is a distinct advantage of our approach. In this paper we give a general outline of our approach, and illustrate it with practical examples.

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 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.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. R. Alur and D. Dill. The Theory of Timed Automata. Theoretical Computer Science, 126, 1994.

    Google Scholar 

  2. J. Bengtsson, et al. UPPAAL: A Tool Suite for Validation and Verification of Real-time Systems. http://www.docs.uu.se/rtmv/uppaal, 1997.

  3. J. Bentley. Little Languages. CACM, 29(8):711–721, 1986.

    MathSciNet  Google Scholar 

  4. W. Chen and D. S. Warren. Tabled Evaluation with Delaying for General Logic Programs. In Journal of the ACM, 43(1):20–74, 1996.

    Article  MATH  MathSciNet  Google Scholar 

  5. E. M. Clark, E. A. Emerson and A. P. Sistla. Automatic Verification of finite-state Concurrent Systems Using Temporal Logic Specification. In ACM TOPLAS, 8(2), 1986.

    Google Scholar 

  6. W. Codenie, K. De Hondt, P. Steyaert and A. Vercammen. From custom applications to domain-specific frameworks. In Communications of the A CM, Vol. 40, No. 10, pages 70–77, 1997.

    Google Scholar 

  7. C. Consel. Architecturing Software Using a Methodology for Language Development. In Proc. 10th Int’l Symp. on Prog. Lang. Impl., Logics and Programs (PLILP), Springer LNCS 1490, pp. 170–194, 1998.

    Google Scholar 

  8. M. A. Covington. Natural Language Processing for Prolog Programmers. Prentice Hall, Englewood Cliffs, NJ, 1994

    MATH  Google Scholar 

  9. S. M. Daniel. An Optimal Control System based on Logic Programming for Automated Synthesis of Software Systems Using Commodity Objects. Proc. Workshop on Logic Programming and Software Enginering. London, UK, July 2000.

    Google Scholar 

  10. S. K. Das. Deductive Databases and Logic Programming. Addison-Wesley. 1992.

    Google Scholar 

  11. S. Debray, P. Lopez-Garcia, and M. Hermenegildo. Non-failure Analysis for Logic Programs. In International Conference on Logic Programming. MIT Press, 1997.

    Google Scholar 

  12. M. Garcia de la Banda et al. Independence in Constraint Logic Programming. In Procs. Int. Symposium on Logic Programming, MIT Press, 1993.

    Google Scholar 

  13. C. Gunter. Programming Language Semantics. MIT Press. 1992.

    Google Scholar 

  14. G. Gupta. Horn Logic Denotations and Their Applications. In The Logic Programming Paradigm: The next 25 years, Proc. Workshop on Strategic Research Directions in Logic Prog., LNAI, Springer Verlag, May 1999.

    Google Scholar 

  15. G. Gupta. Logic Programming based Frameworks for Software Engineering. Proc. Workshop on Logic Programming and Software Enginering. London, UK, July 2000.

    Google Scholar 

  16. G. Gupta. A Horn Logic Denotational Approach to Verification based on First Order Theorem Proving. Internal report. Dec. 1998.

    Google Scholar 

  17. G. Gupta. Why Logic Programming Matters? In Proc. ACM Rio Grande chapter workshop on Computing. 1994.

    Google Scholar 

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

    Google Scholar 

  19. G. Gupta and E. Pontelli. Specification, Implementation, and Verification of Domain Specific Languages: A Logic Programming-based Approach. Technical Report, NMSU, Mar 1999.

    Google Scholar 

  20. G. Gupta, E. Pontelli, R. Felix-Cardenas, A. Lara, Automatic Derivation of a Prov-ably Correct Parallelizing Compiler, In Proceedings of International Conference on Parallel Processing, IEEE Press, pp. 579–586, 1998.

    Google Scholar 

  21. R. Hartley. MidiTrans: a MIDI File Transform Language. Tech. Report, NMSU, 1998.

    Google Scholar 

  22. C. A. R. Hoare. An Axiomatic Basis for Computer Programming. In Comm. of the ACM. Vol. 12. 1969.

    Google Scholar 

  23. C. A. R. Hoare. Unification of Theories: A Challenge for Computing Science. Proc. COMPASS/ADT, Springer LNCS 1130, 1995, pp. 49–57.

    Google Scholar 

  24. C. A. R. Hoare. Unifying Theories: A Personal Statement. ACM Computing Surveys 28(4):46 (1996).

    Article  Google Scholar 

  25. P. Hudak. Modular Domain Specific Languages and Tools. In IEEE Software Reuse Conf. 2000.

    Google Scholar 

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

    Article  Google Scholar 

  27. R. A. Kowalski. Logic for Problem Solving. North Holland. 1979.

    Google Scholar 

  28. R. A. Kowalski: Logic for Data Description. Logic and Data Bases 1977: 77–103

    Google Scholar 

  29. R. A. Kowalski: Logic for Knowledge Representation. FSTTCS 1984: 1–12

    Google Scholar 

  30. K. Larsen, P. Pettersson, and W. Yi. UPPAAL in a Nutshell. In Software Tools for Technology Transfer. 1997.

    Google Scholar 

  31. J. L. Lassez and J. Jaffar. Constraint logic programming. In Proc. 14th ACM POPL, 1987.

    Google Scholar 

  32. K.-K. Lau. The Role of Logic Programming in Next-generation Component-based Software Development. Proc. Workshop on Logic Programming and Software Enginering. G. Gupta and I. V. Ramakrishnan (eds), London, UK, July 2000.

    Google Scholar 

  33. N. G. Leveson, M. P. E. Heimdahl, and J. D. Reese. Designing Specification Languages for Process Control Systems: Lessons Learned and Steps to the Future. In Software Engineering-ESEC/FSE, Springer Verlag, pages 127–145, 1999.

    Google Scholar 

  34. J. W. Lloyd. Foundations of Logic Programming. Springer Verlag. 2nd ed. 1987.

    Google Scholar 

  35. V.W. Marek and M. Truszczyński. Stable Models and an Alternative Logic Programming Paradigm. In K.R. Apt, V.W. Marek, M. Truszcziński, and D. S. Warren, editors, The Logic Programming Paradigm. Springer Verlag, 1999.

    Google Scholar 

  36. T. L. McCluskey, J. M. Porteous, Y. Naik, C. T. Taylor, S. V. A Jones. Requirements Capture Method and its use in an Air Traffic Control Application, The Journal of Software Practice and Experience, 25(1), January 1995.

    Google Scholar 

  37. T. L. McCluskey, M. M. West, Towards the Automated Debugging and Maintenance of Logic-based Requirements Models. ASE’ 98: Proceedings of the 13th IEEE International Conference on Automated Software Engineering, Hawaii. IEEE Press, (pages 105–114). 1998.

    Google Scholar 

  38. S. Muggleton. Inductive Logic Programming. New Generation Computing, 1991, 8(4):295–310.

    Article  MATH  Google Scholar 

  39. E. Pontelli, W. Xiong, G. Gupta, A. Karshmer. A Domain Specific Language Framework for Non-Visual Browsing of Complex HTML Structures ACM Int. Conference on Assistive Technologies, 2000.

    Google Scholar 

  40. E. Pontelli, G. Gupta, and A. Lara. Horn Logical Semantics for MidiTrans. Internal Report, New Mexico State University.

    Google Scholar 

  41. E. Pontelli, D. Ranjan, G. Gupta, and B. Milligan. PhyLog: A Domain Specific Language for Describing Phylogenetic Inference Processes. Internal Report, New Mexico State University, 2000.

    Google Scholar 

  42. Y. S. Ramakrishnan, C. R. Ramakrishnan, I. V. Ramakrishnan et al. Efficient Model Checking using Tabled Resolution. In Proceedings of Computer Aided Verification (CAV’97). 1997.

    Google Scholar 

  43. C. Ramming. Proc. Usenix Conf. on Domain-Specific Languages. Usenix, 1997.

    Google Scholar 

  44. M. Raskovsky, P. Collier. From Standard to Implementational Denotational Semantics. In Semantics Directed Compiler Generation. Springer. pp. 94–139, 1994.

    Google Scholar 

  45. K. Sagonas, T. Swift, and D. S. Warren. XSB as an efficient deductive database engine. In Proc. SIGMOD International Conf. on Management of Data, 1994.

    Google Scholar 

  46. D. Sahlin. An Automatic Partial Evaluator for Full Prolog. Ph.D. Thesis, Royal Inst. of Techn. Sweden, 1994.

    Google Scholar 

  47. D. Schmidt. Denotational Semantics: a Methodology for Language Development. W. Brown Publishers, 1986.

    Google Scholar 

  48. D. Schmidt. Programming language semantics. In ACM Computing Surveys, 28-1, 265–267, 1996.

    Article  Google Scholar 

  49. D. Schmidt. On the Need for a Popular Formal Semantics. Proc. ACM Conf. on Strategic Directions in Computing Research, Cambridge, MA, June 1996. ACM SIGPLAN Notices 32-1 (1997) 115–116.

    Google Scholar 

  50. K. Ueda, T. Chikayama. Design of the Kernel Language for the Parallel Inference Machine. The Computer Journal 33(6):494–500 (1990).

    Article  MathSciNet  Google Scholar 

  51. P. Van Hentenryck. Constraint Handling in Prolog. MIT Press, 1988.

    Google Scholar 

  52. D. H. D. Warren. Logic Programming for Compiler-writing. Software Practice and Experience, 10, pp. 97–125. 1979.

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2002 Springer-Verlag Berlin Heidelberg

About this chapter

Cite this chapter

Gupta, G., Pontelli, E. (2002). Specification, Implementation, and Verification of Domain Specific Languages: A Logic Programming-Based Approach. In: Kakas, A.C., Sadri, F. (eds) Computational Logic: Logic Programming and Beyond. Lecture Notes in Computer Science(), vol 2407. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45628-7_10

Download citation

  • DOI: https://doi.org/10.1007/3-540-45628-7_10

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-43959-2

  • Online ISBN: 978-3-540-45628-5

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics