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

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.

[1]  Joxan Jaffar,et al.  Constraint logic programming , 1987, POPL '87.

[2]  Michael A. Covington,et al.  Natural Language Processing for Prolog Programmers , 1993 .

[3]  Wim Codenie,et al.  From custom applications to domain-specific frameworks , 1997, CACM.

[4]  Lawrence C. Paulson A semantics-directed compiler generator , 1982, POPL '82.

[5]  Kim Marriott,et al.  Independence in Constraint Logic Programs , 1993, ILPS.

[6]  David Scott Warren,et al.  Tabled evaluation with delaying for general logic programs , 1996, JACM.

[7]  C. A. R. Hoare,et al.  An axiomatic basis for computer programming , 1969, CACM.

[8]  David A. Schmidt,et al.  Programming language semantics , 1996, CSUR.

[9]  Rajeev Alur,et al.  A Theory of Timed Automata , 1994, Theor. Comput. Sci..

[10]  Philip A. Collier,et al.  From standard to implementation denotational semantics , 1980, Semantics-Directed Compiler Generation.

[11]  Robert A. Kowalski,et al.  Logic for problem solving , 1982, The computer science library : Artificial intelligence series.

[12]  Victor W. Marek,et al.  Stable models and an alternative logic programming paradigm , 1998, The Logic Programming Paradigm.

[13]  Enrico Pontelli,et al.  A constraint-based approach for specification and verification of real-time systems , 1997, Proceedings Real-Time Systems Symposium.

[14]  Saumya K. Debray,et al.  Non-Failure Analysis for Logic Programs , 1997, ICLP.

[15]  T. L. McCluskey,et al.  Towards the automated debugging and maintenance of logic-based requirements models , 1998, Proceedings 13th IEEE International Conference on Automated Software Engineering (Cat. No.98EX239).

[16]  Rajeev Alur,et al.  The Theory of Timed Automata , 1991, REX Workshop.

[17]  Konstantinos Sagonas,et al.  XSB as an efficient deductive database engine , 1994, SIGMOD '94.

[18]  Enrico Pontelli,et al.  Automatic Generation of Provably Correct Parallelizing Compilers , 1998, ICPP.

[19]  T. L. McCluskey,et al.  A requirements capture method and its use in an air traffic control application , 1995, Softw. Pract. Exp..

[20]  Nancy G. Leveson,et al.  Designing specification languages for process control systems: lessons learned and steps to the future , 1999, ESEC/FSE-7.

[21]  Wang Yi,et al.  UPPAAL - a Tool Suite for Automatic Verification of Real-Time Systems , 1996, Hybrid Systems.

[22]  Gopal Gupta,et al.  Horn Logic Denotations , 1998, IJCSLP.

[23]  Charles Consel,et al.  Architecture Software Using: A Methodology for Language Development , 1998, PLILP/ALP.

[24]  David A. Schmidt,et al.  Denotationaisemantics: a methodology for language development , 1986 .

[25]  Jon Louis Bentley,et al.  Programming pearls: little languages , 1986, CACM.

[26]  C. A. R. Hoare,et al.  Unifying theories: a personal statement , 1996, CSUR.

[27]  Neil D. Jones,et al.  An introduction to partial evaluation , 1996, CSUR.

[28]  Wang Yi,et al.  Uppaal in a nutshell , 1997, International Journal on Software Tools for Technology Transfer.

[29]  Ehud Shapiro,et al.  Third International Conference on Logic Programming , 1986 .

[30]  Subrata Kumar Das,et al.  Deductive Databases and Logic Programming , 1992 .

[31]  Gopal Gupta,et al.  Horn Logic Denotations and Their Applications , 1999, The Logic Programming Paradigm.

[32]  Paul Hudak,et al.  Modular domain specific languages and tools , 1998, Proceedings. Fifth International Conference on Software Reuse (Cat. No.98TB100203).

[33]  David A. Schmidt On the need for a popular formal semantics , 1997, SIGP.

[34]  J. W. Lloyd,et al.  Foundations of logic programming; (2nd extended ed.) , 1987 .

[35]  Stan Szpakowicz,et al.  Review of Natural language processing for prolog programmers by Michael A. Covington. Prentice-Hall 1994. , 1996 .

[36]  C. R. Ramakrishnan,et al.  Efficient Model Checking Using Tabled Resolution , 1997, CAV.

[37]  C. A. R. Hoare,et al.  Unification of Theories: A Challenge for Computing Science , 1995, COMPASS/ADT.

[38]  Robert A. Kowalski Logic for Data Description , 1977, Logic and Data Bases.

[39]  Enrico Pontelli,et al.  A domain specific language framework for non-visual browsing of complex HTML structures , 2000, Assets '00.

[40]  Robert A. Kowalski Logic for Knowledge Representation , 1984, FSTTCS.

[41]  Kazunori Ueda,et al.  Design of the Kernel Language for the Parallel Inference Machine , 1990, Computer/law journal.

[42]  John Wylie Lloyd,et al.  Foundations of Logic Programming , 1987, Symbolic Computation.

[43]  David H. D. Warren Logic programming and compiler writing , 1980, Softw. Pract. Exp..