A multi-tier semantics for Hop

Hop is a multi-tier programming language where the behavior of interacting servers and clients are expressed by a single program. Hop adheres to the standard web programming style where servers elaborate HTML pages containing JavaScript code. This JavaScript code responds locally to user’s interactions but also (following the so-called Ajax style) requests services from remote servers. These services bring back new HTML fragments containing additional JavaScript code replacing or modifying the state of the client.This paper presents a continuation-based denotational semantics for a sequential subset of Hop. Though restricted to a single server and a single client, this semantics takes into account the key feature of Hop namely that the server elaborates client code to be run in the client’s browser. This new client-code dynamically requests services from the server which, again, elaborate new client code to be run in the client’s browser.This semantics details the programming model advocated by Hop and provides a sound basis for future studies such as security of web applications and web continuations.

[1]  Manuel Serrano,et al.  Hop, a Fast Server for the Diffuse Web , 2009, COORDINATION.

[2]  Ohad Kammar,et al.  Algebraic foundations for effect-dependent optimisations , 2012, POPL '12.

[3]  Peter Thiemann,et al.  From sequential programs to multi-tier applications by program transformation , 2005, POPL '05.

[4]  Tommi Mikkonen,et al.  Web Applications – Spaghetti Code for the 21st Century , 2008, 2008 Sixth International Conference on Software Engineering Research, Management and Applications.

[5]  Philip Wadler,et al.  Links: Web Programming Without Tiers , 2006, FMCO.

[6]  Philip Wadler,et al.  The RPC calculus , 2009, PPDP '09.

[7]  B. J. Mailloux,et al.  Report on the Algorithmic Language , 1971 .

[8]  Shriram Krishnamurthi,et al.  Flapjax: a programming language for Ajax applications , 2009, OOPSLA 2009.

[9]  Karl Crary,et al.  Type-Safe Distributed Programming with ML5 , 2007, TGC.

[10]  Juan-Carlos Cano,et al.  HOP: achieving efficient anonymity in MANETs by combining HIP, OLSR, and pseudonyms , 2006, OOPSLA 2006.

[11]  Andrew C. Myers,et al.  SIF: Enforcing Confidentiality and Integrity in Web Applications , 2007, USENIX Security Symposium.

[12]  Xin Zheng,et al.  Building secure web applications with automatic partitioning , 2009, CACM.

[13]  Walid Taha,et al.  A Gentle Introduction to Multi-stage Programming , 2003, Domain-Specific Program Generation.

[14]  Amr Sabry,et al.  Macros as multi-stage computations: type-safe, generative, binding macros in MacroML , 2001, ICFP '01.

[15]  Michael Hicks,et al.  Defeating script injection attacks with browser-enforced embedded policies , 2007, WWW '07.

[16]  Erick Gallesio,et al.  Hop: a language for programming the web 2.0 , 2006, OOPSLA Companion.

[17]  Martin Odersky,et al.  Domain-Specific Program Generation , 2004, Lecture Notes in Computer Science.

[18]  R. Kent Dybvig,et al.  Revised5 Report on the Algorithmic Language Scheme , 1986, SIGP.

[19]  Christian Queinnec,et al.  Continuations and Web Servers , 2004, High. Order Symb. Comput..

[20]  Manuel Serrano,et al.  Hop Client-Side Compilation , 2007, Trends in Functional Programming.

[21]  Fan Yang,et al.  A unified platform for data driven web applications with automatic client-server partitioning , 2007, WWW '07.

[22]  Joseph E. Stoy,et al.  Denotational Semantics: The Scott-Strachey Approach to Programming Language Theory , 1981 .

[23]  Robert Hieb,et al.  Revised 5 Report on the Algorithmic Language , 1999 .

[24]  Philip Wadler,et al.  A located lambda calculus , 2010 .

[25]  Shriram Krishnamurthi,et al.  Embedding Dynamic Dataflow in a Call-by-Value Language , 2006, ESOP.