Automated Software Engineering

, Volume 11, Issue 4, pp 337–364 | Cite as

Automatically Restructuring Programs for the Web

  • Jacob Matthews
  • Robert Bruce Findler
  • Paul Graunke
  • Shriram Krishnamurthi
  • Matthias Felleisen
Article

Abstract

This paper explains how to automatically transform a batch program into a standard CGI program. The transformation preserves the program's behavior even if consumers use the back button or the window-cloning facilities of their Web browsers. The paper demonstrates the workings of the transformation for both Scheme and C programs and discusses how it applies to any full-fledged programming language.

CGI continuation-passing style lambda lifting closure conversion Web programming 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Appel, A. 1992. Compiling With Continuations. The Pitt Building, Trumpington Street, Cambridge CB2 1RP: Cambridge University Press.Google Scholar
  2. Atkins, D.L., Ball, T., Bruns, G., and Cox, K.C. 1999. Mawl: A domain-specific language for form-based services. Software Engineering, 25(3):334–346.Google Scholar
  3. Baker, H.G. 1994. CONS should not CONS its arguments, Part II: Cheney on the M.T.A. comp.lang.scheme.c newsgroup.Google Scholar
  4. Bakken, S.S., Aulbach, A., Schmid, E. Winstead, J. Wilson, L.T. Lerdorf R., Zmievski, A., and Ahto, J. 2002. http://www.php.net/manual/.Google Scholar
  5. Borland Software Corporation. http://www.borland.com/jbuilder/.Google Scholar
  6. Brabrand, C., MØller, A., Sandholm, A., and Schwartzbach, M.I. 1999. A runtime system for interactive web services. In Journal of Computer Networks.Google Scholar
  7. Clements, J., Flatt, M. and Felleisen, M. 2001. Modeling an algebraic stepper. In European Symposium on Programming.Google Scholar
  8. Clinger, W.D. 1998. Proper tail recursion and space efficiency. In Proceedings of ACMSIGPLAN Conference on Programming Language Design and Implementation, pp. 174–185.Google Scholar
  9. Coward, D. 2000. Java Servlet Specification Version 2.3. http://java.sun.com/products/servlet/.Google Scholar
  10. Daemen, J. and Rijmen, V. Advanced Encryption Standard. http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf.Google Scholar
  11. Felleisen, M. and Hieb, R. 1992. The revised report on the syntactic theories of sequential control and state. Theoretical Computer Science, 102:235–271. Original version in: Technical Report 89-100, Rice University, June 1989.Google Scholar
  12. Fielding, R., Gettys, J., Mogul, H. Frystyk, L. Masinter, P.L., and Berners-Lee, T. 1999. Hypertext transfer protocol-HTTP/1.1. Internet Request for Comments 2616.Google Scholar
  13. Findler, R.B., Clements, J. Flanagan, C., Flatt, M., Krishnamurthi, S., Steckler, P., and Felleisen, M. 2002. DrScheme: A programming environment for Scheme. Journal of Functional Programming, 12(2):159–182. A preliminary version of this paper appeared in PLILP 1997, LNCS vol. 1292, pp. 369-388.Google Scholar
  14. Findler, R.B. and Flatt, M. 1998. Modular object-oriented programming with units and mixins. In Proceedings of ACMSIGPLAN International Conference on Functional Programming, pp. 94–104.Google Scholar
  15. Flanagan, C., Sabry, A., Duba, B.F., and Felleisen, M. 1993. The essence of compiling with continuations. In Proceedings ACM SIGPLAN 1993 Conf. on Programming Language Design and Implementation, PLDI'93, Albuquerque, NM, USA, 23-25 June 1993, vol. 28(6), New York: ACM Press, pp. 237–247.Google Scholar
  16. Flatt, M. 1997. PLT MzScheme: language manual. Technical Report TR97-280, Rice University. http://www.pltscheme. org/software/mzscheme/.Google Scholar
  17. Flatt, M. 2002. Composable and compilable macros: You want it when?. In Proceedings of ACM SIGPLAN International Conference on Functional Programming.Google Scholar
  18. Flatt, M. and Felleisen, M. 1998. Units: Cool modules for HOT languages. In Proceedings of ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 236–248.Google Scholar
  19. Flatt, M., Findler, R.B., Krishnamurthi, S., and Felleisen, M. 1999. Programming languages as operating systems (or Revenge of the son of the lisp machine). In Proceedings of ACM SIGPLAN International Conference on Functional Programming, pp. 138–147.Google Scholar
  20. Flatt, M., Krishnamurthi, S., and Felleisen, M. 1998. Classes and mixins. In Proceedings of the ACM Conference Principles of Programming Languages.Google Scholar
  21. Friedman, D.P., Wand, M., and Haynes, C.T. 1992. Essentials of Programming Languages Cambridge. MA: The MIT Press.Google Scholar
  22. Graham, P., Lisp in web-based applications. http://www.paulgraham.com/lib/paulgraham/bbnexcerpts.txt.Google Scholar
  23. Graunke, P., Krishnamurthi, S., van der Hoeven, S., and Felleisen, M. 2001. Programming the web with high-level programming languages. In European Symposium on Programming.Google Scholar
  24. Hughes, J. 2000. Generalising monads to arrows. Science of Computer Programming, 37(1-3):67–111.Google Scholar
  25. International Business Machines, Inc. http://www.ibm.com/websphere.Google Scholar
  26. Jackson, M.A. 1975. Principles of Program Design. Academic Press.Google Scholar
  27. Johnsson, T. 1985. Lambda lifting:Transforming programs to recursive equations. In Proceedings of the Conference on Functional Programming Languages and Computer Architecture. Nancy, France.Google Scholar
  28. Kelsey, R., Clinger, W., and, J.R. (eds.). 1998, Revised5 report of the algorithmic language scheme. ACMSIGPLAN Notices, 33(9):26–76.Google Scholar
  29. Kristol, D. and Montulli, L. 1997. RFC 2109: Proposed Standard for HTTP state management mechanism. http://www.ietf.org/rfc/rfc2109.txt.Google Scholar
  30. NCSA, The Common Gateway Interface. http://hoohoo.ncsa.uiuc.edu/cgi/.Google Scholar
  31. Open Market, Inc., FastCGI specification. http://www.fastcgi.com/Google Scholar
  32. Queinnec, C. 2000. The influence of browsers on evaluators or, continuations to program Web servers'. In ACM SIGPLAN International Conference on Functional Programming.Google Scholar
  33. Reed, D.P. 1983. Implementing atomic actions on decentralized data. In ACMTransactions on Computer Systems. pp. 234–254.Google Scholar
  34. Rees, J.A., Adams, N.I., and Meehan, J.R. 1988. The T manual.Google Scholar
  35. Reynolds, J. 1972. Definitional interpreters for higher-order programming languages. In Proceedings of the 25th ACM National Conference, pp. 717–740.Google Scholar
  36. Roth, M. and Pelegrí-Llopart, E. 2002. JavaServer Pages Specification. http://java.sun.com/products/ jsp/.Google Scholar
  37. Strachey, C. and Wadsworth, C.P. 1974. Continuations: A mathematical semantics for handling full jumps, technical monograph PRG-11. Technical report, Oxford University Computing Laboratory, Programming Research Group.Google Scholar
  38. Sun Microsystems, Inc. http://java.sun.com/products/jpda/.Google Scholar
  39. Sun Microsystems, Inc., Forte Tools. http://www.sun.com/forte/.Google Scholar
  40. Thiemann, P. 2002. WASH/CGI: Server-side web scripting with sessions and typed, compositional forms. In Practical Applications of Declarative Languages.Google Scholar

Copyright information

© Kluwer Academic Publishers 2004

Authors and Affiliations

  • Jacob Matthews
    • 1
  • Robert Bruce Findler
    • 1
  • Paul Graunke
    • 2
  • Shriram Krishnamurthi
    • 3
  • Matthias Felleisen
    • 2
  1. 1.Computer Science DepartmentUniversity of ChicagoUSA
  2. 2.College of Computer and Information ScienceNortheastern University (now at Fleet Numerical Meteorology and Oceanography Center (FNMOC)USA
  3. 3.Computer Science DepartmentBrown UniversityUSA

Personalised recommendations