High-Level Server Side Web Scripting in Curry

  • Michael Hanus
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1990)


We propose a new approach to program web services. Although we base our approach on the Common Gateway Interface (CGI) to ensure wide applicability, we avoid many of the drawbacks and pitfalls of traditional CGI programming by providing an additional abstraction layer implemented in the multi-paradigm declarative language Curry. For instance, the syntactical details of HTML and passing values with CGI are hidden by a wrapper that executes abstract HTML forms by translating them into concrete HTML code. This leads to a high-level approach to server side web service programming where notions like event handlers, state variables and control of interactions are available. Thanks to the use of a functional logic language, we can structure our approach as an embedded domain specific language where the functional and logic programming features of the host language are exploited to abstract from details and frequent errors in standard CGI programming.


Logic Program Logic Programming Logical Variable Input Element Event Handler 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    S. Antoy, R. Echahed, and M. Hanus. A Needed Narrowing Strategy. Journal of the ACM, Vol. 47, No. 4, pp. 776–822, 2000.CrossRefMathSciNetGoogle Scholar
  2. 2.
    D. Cabeza and M. Hermenegildo. Internet and WWW Programming using Computational Logic Systems. In Workshop on Logic Programming and the Internet, 1996. See also
  3. 3.
    M. Hanus. The Integration of Functions into Logic Programming: From Theory to Practice. Journal of Logic Programming, Vol. 19&20, pp. 583–628, 1994.CrossRefMathSciNetGoogle Scholar
  4. 4.
    M. Hanus. A Unified Computation Model for Functional and Logic Programming. In Proc. of the 24th ACM Symposium on Principles of Programming Languages (Paris), pp. 80–93, 1997.Google Scholar
  5. 5.
    M. Hanus. Distributed Programming in a Multi-Paradigm Declarative Language. In Proc. of the International Conference on Principles and Practice of Declarative Programming (PPDP’99), pp. 376–395. Springer LNCS 1702, 1999.Google Scholar
  6. 6.
    M. Hanus. A Functional Logic Programming Approach to Graphical User Interfaces. In International Workshop on Practical Aspects of Declarative Languages (PADL’00), pp. 47–62. Springer LNCS 1753, 2000.Google Scholar
  7. 7.
    M. Hanus, S. Antoy, J. Koj, P. Niederau, R. Sadre, and F. Steiner. PAKCS: The Portland Aachen Kiel Curry System. Available at, 2000.
  8. 8.
    M. Hanus and F. Steiner. Controlling Search in Declarative Programs. In Principles of Declarative Programming (Proc. Joint International Symposium PLILP/ALP’98), pp. 374–390. Springer LNCS 1490, 1998.Google Scholar
  9. 9.
    M. Hanus (ed.). Curry: An Integrated Functional Logic Language (Vers. 0.7.1). Available at, 2000.
  10. 10.
    J. Hughes. Why Functional Programming Matters. In D.A. Turner, editor, Research Topics in Functional Programming, pp. 17–42. Addison Wesley, 1990.Google Scholar
  11. 11.
    J. Hughes. Generalising Monads to Arrows. Submitted for publication, 1998.Google Scholar
  12. 12.
    D.A. Ladd and J.C. Ramming. Programming the Web: An Application-Oriented Language for Hypermedia Services. In 4th International World Wide Web Conference, 1995.Google Scholar
  13. 13.
    E. Meijer. Server Side Web Scripting in Haskell. Journal of Functional Programming, Vol. 10, No. 1, pp. 1–18, 2000.CrossRefMathSciNetGoogle Scholar
  14. 14.
    J. Peterson et al. Haskell: A Non-strict, Purely Functional Language (Version 1.4). Technical Report, Yale University, 1997.Google Scholar
  15. 15.
    A. Sandholm and M.I. Schwartzbach. A Type System for Dynamic Web Documents. In Proc. of the 27th ACM Symposium on Principles of Programming Languages, pp. 290–301, 2000.Google Scholar
  16. 16.
    V.A. Saraswat. Concurrent Constraint Programming. MIT Press, 1993.Google Scholar
  17. 17.
    P. Thiemann. Modelling HTML in Haskell. In International Workshop on Practical Aspects of Declarative Languages (PADL’00), pp. 263–277. Springer LNCS 1753, 2000.Google Scholar
  18. 18.
    P. Wadler. How to Declare an Imperative. ACM Computing Surveys, Vol. 29, No. 3, pp. 240–263, 1997.CrossRefGoogle Scholar
  19. 19.
    D.H.D. Warren. Logic Programming and Compiler Writing. Software-Practice and Experience, Vol. 10, pp. 97–125, 1980.zbMATHCrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2001

Authors and Affiliations

  • Michael Hanus
    • 1
  1. 1.Institut für Informatik, Christian-Albrechts-Universität KielKielGermany

Personalised recommendations