Skip to main content

A Heuristic Approach for Computing Effects

  • Conference paper
Objects, Models, Components, Patterns (TOOLS 2011)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 6705))

Abstract

The effect of an operation on an object network can be described by the access paths along which the function reads or writes object properties. Abstracted to access path permissions, the effect can serve as part of the operation’s documentation, augmenting a type signature or a contract for the operation. Statically determining such an effect is a challenging problem, in particular in a dynamic language which represents objects by hash tables like the current breed of scripting languages.

In this work, we propose an analysis that computes access permissions describing the effect of an operation from a set of access paths obtained by running the program. The main ingredient of the analysis is a novel heuristic to abstract a set of access paths to a concise access permission.

Our analysis is implemented as part of JSConTest, a testing framework for JavaScript. It has been applied to a range of examples with encouraging results.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Heidegger, P., Thiemann, P.: Contract-driven testing of javaScript code. In: Vitek, J. (ed.) TOOLS 2010. LNCS, vol. 6141, pp. 154–172. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  2. Heidegger, P., Bieniusa, A., Thiemann, P.: Access permission contracts. Submitted for publication (2010), http://proglang.informatik.uni-freiburg.de/jscontest/

  3. Fredkin, E.: Trie memory. Communications of the ACM 3, 490–499 (1960)

    Article  Google Scholar 

  4. Gifford, D., Lucassen, J.: Integrating functional and imperative programming. In: Proc. 1986 ACM Conf. on Lisp and Functional Programming, pp. 28–38 (1986)

    Google Scholar 

  5. Talpin, J.P., Jouvelot, P.: The type and effect discipline. Information and Computation 111(2), 245–296 (1994)

    Article  MathSciNet  MATH  Google Scholar 

  6. Tofte, M., Talpin, J.P.: Region-based memory management. Information and Computation 132(2), 109–176 (1997)

    Article  MathSciNet  MATH  Google Scholar 

  7. Birkedal, L., Tofte, M.: A constraint-based region inference algorithm. Theoretical Computer Science 58, 299–392 (2001)

    Article  MathSciNet  MATH  Google Scholar 

  8. Deutsch, A.: A storeless model of aliasing and its abstractions using finite representations of right-regular equivalence relations. In: Proc. IEEE International Conference on Computer Languages 1992, pp. 2–13. IEEE, CA (1992)

    Chapter  Google Scholar 

  9. Greenhouse, A., Boyland, J.: An object-oriented effects system. In: Liu, H. (ed.) ECOOP 1999. LNCS, vol. 1628, pp. 205–229. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  10. Skalka, C.: Trace effects and object orientation. In: Proceedings of the ACM Conference on Principles and Practice of Declarative Programming, Lisbon, Portugal (2005)

    Google Scholar 

  11. Gold, E.M.: Language identification in the limit. Information and Control 10(5), 447–474 (1967)

    Article  MathSciNet  MATH  Google Scholar 

  12. Angluin, D.: Inductive inference of formal languages from positive data. Information and Control 45(2), 117–135 (1980)

    Article  MathSciNet  MATH  Google Scholar 

  13. Denis, F.: Learning regular languages from simple positive examples. Machine Learning 44(1/2), 37–66 (2001)

    Article  MATH  Google Scholar 

  14. Firoiu, L., Oates, T., Cohen, P.R.: Learning a deterministic finite automaton with a recurrent neural network. In: Honavar, V.G., Slutzki, G. (eds.) ICGI 1998. LNCS (LNAI), vol. 1433, pp. 90–101. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  15. Maffeis, S., Mitchell, J.C., Taly, A.: Isolating javaScript with filters, rewriting, and wrappers. In: Backes, M., Ning, P. (eds.) ESORICS 2009. LNCS, vol. 5789, pp. 505–522. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  16. Chugh, R., Meister, J.A., Jhala, R., Lerner, S.: Staged information flow for JavaScript. In: Proc. 2009 ACM Conf. PLDI, pp. 50–62. ACM Press, Ireland (2009)

    Google Scholar 

  17. Yu, D., Chander, A., Islam, N., Serikov, I.: JavaScript instrumentation for browser security. In: Felleisen, M. (ed.) Proc. 34th ACM Symp. POPL, pp. 237–249. ACM Press, France (2007)

    Google Scholar 

  18. Reis, C., Dunagan, J., Wang, H.J., Dubrovsky, O., Esmeir, S.: BrowserShield: Vulnerability-driven filtering of dynamic HTML. ACM Trans. Web 1(3), 11 (2007)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2011 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Heidegger, P., Thiemann, P. (2011). A Heuristic Approach for Computing Effects. In: Bishop, J., Vallecillo, A. (eds) Objects, Models, Components, Patterns. TOOLS 2011. Lecture Notes in Computer Science, vol 6705. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-21952-8_12

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-21952-8_12

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-21951-1

  • Online ISBN: 978-3-642-21952-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics