DOM: Specification and Client Reasoning

  • Azalea Raad
  • José Fragoso Santos
  • Philippa Gardner
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10017)


We present an axiomatic specification of a key fragment of DOM using structural separation logic. This specification allows us to develop modular reasoning about client programs that call the DOM.


Element Node Attribute Node Separation Logic Client Program Variable Store 
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.



This research was supported by EPSRC programme grants EP/H008373/1, EP/K008528/1 and EP/K032089/1.


  1. 1.
  2. 2.
    Biri, N., Galmiche, D.: A separation logic for resource distribution. In: Pandya, P.K., Radhakrishnan, J. (eds.) FSTTCS 2003. LNCS, vol. 2914, pp. 23–37. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  3. 3.
    Biri, N., Galmiche, D.: Models and separation logics for resource trees. J. Logic Comput. 17, 687–726 (2007)MathSciNetCrossRefzbMATHGoogle Scholar
  4. 4.
    Bodin, M., Chargueraud, A., Filaretti, D., Gardner, P., Maffeis, S., Naudz̆iūnienė, D., Schmitt, A., Smith, G.: A mechanised JavaScript specification. In: POPL (2014)Google Scholar
  5. 5.
    Calcagno, C., Dinsdale-Young, T., Gardner, P.: Adjunct elimination in context logic for trees. In: Shao, Z. (ed.) APLAS 2007. LNCS, vol. 4807, pp. 255–270. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  6. 6.
    Calcagno, C., Gardner, P., Zarfaty, U.: Context logic and tree update. In: POPL (2005)Google Scholar
  7. 7.
    Gardner, P., Maffeis, S., Smith, G.: Towards a program logic for JavaScript. In: POPL (2012)Google Scholar
  8. 8.
    Gardner, P., Raad, A., Wheelhouse, M., Wright, A.: Local reasoning for concurrent libraries: mind the gap. In: MFPS (2014)Google Scholar
  9. 9.
    Gardner, P., Smith, G., Wheelhouse, M., Zarfaty, U.: Local Hoare reasoning about DOM. In: PODS (2008)Google Scholar
  10. 10.
    Igarashi, A., Pierce, B.C., Wadler, P.: Featherweight Java: a minimal core calculus for Java and GJ. In: OOPSLA (1999)Google Scholar
  11. 11.
    Jensen, S.H., Møller, A., Thiemann, P.: Type analysis for JavaScript. In: Palsberg, J., Su, Z. (eds.) SAS 2009. LNCS, vol. 5673, pp. 238–255. Springer, Heidelberg (2009). doi: 10.1007/978-3-642-03237-0_17 CrossRefGoogle Scholar
  12. 12.
    Jensen, S.H., Madsen, M., Møller, A.: Modeling the HTML DOM and browser API in static analysis of JavaScript Web applications. In: ESEC/FSE 2011 (2013)Google Scholar
  13. 13.
    Lerner, B.S., Carroll, M., Kimmel, D.P., La Vallee, H.Q., Krishnamurthi, S.: Modeling and reasoning about DOM events. In: WebApps (2012)Google Scholar
  14. 14.
    Maffeis, S., Mitchell, J.C., Taly, A.: An operational semantics for JavaScript. In: Ramalingam, G. (ed.) APLAS 2008. LNCS, vol. 5356, pp. 307–325. Springer, Heidelberg (2008). doi: 10.1007/978-3-540-89330-1_22 CrossRefGoogle Scholar
  15. 15.
    Park, C., Won, S., Jin, J., Ryu, S.: A static analysis of JavaScript web applications in the wild via practical DOM modeling (T). In: ASE (2015)Google Scholar
  16. 16.
    Parkinson, M.: Local reasoning for Java. Ph.D. thesis, Cambridge University (2006)Google Scholar
  17. 17.
    Raad, A.: Ph.D. thesis, Imperial College (2016, to appear)Google Scholar
  18. 18.
    Rajani, V., Bichhawat, A., Garg, D., Hammer, C.: Information flow control for event handling and the DOM in web browsers. In: CSF (2015)Google Scholar
  19. 19.
    Reynolds, J.C.: Separation logic: a logic for shared mutable data structures. In: LICS (2002)Google Scholar
  20. 20.
    Russo, A., Sabelfeld, A., Chudnov, A.: Tracking information flow in dynamic tree structures. In: Backes, M., Ning, P. (eds.) ESORICS 2009. LNCS, vol. 5789, pp. 86–103. Springer, Heidelberg (2009). doi: 10.1007/978-3-642-04444-1_6 CrossRefGoogle Scholar
  21. 21.
    Møller, A., Jensen, S.H., Madsen, M.: Modeling the HTML DOM and browser API in static analysis of JavaScript web applications. In: FSE (2011)Google Scholar
  22. 22.
    Smith, G.: Local reasoning for web programs. Ph.D. thesis, Imperial College (2010)Google Scholar
  23. 23.
    Swamy, N., Weinberger, J., Schlesinger, C., Chen, J., Livshits, B.: Verifying higher-order programs with the Dijkstra Monad. In: PLDI (2013)Google Scholar
  24. 24.
    Thiemann, P.: A type safe DOM API. In: Bierman, G., Koch, C. (eds.) DBPL 2005. LNCS, vol. 3774, pp. 169–183. Springer, Heidelberg (2005). doi: 10.1007/11601524_11 CrossRefGoogle Scholar
  25. 25.
    Wright, A.: Structural separation logic. Ph.D. thesis, Imperial College (2013)Google Scholar

Copyright information

© Springer International Publishing AG 2016

Authors and Affiliations

  • Azalea Raad
    • 1
  • José Fragoso Santos
    • 1
  • Philippa Gardner
    • 1
  1. 1.Imperial CollegeLondonUK

Personalised recommendations