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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
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)
Heidegger, P., Bieniusa, A., Thiemann, P.: Access permission contracts. Submitted for publication (2010), http://proglang.informatik.uni-freiburg.de/jscontest/
Fredkin, E.: Trie memory. Communications of the ACM 3, 490–499 (1960)
Gifford, D., Lucassen, J.: Integrating functional and imperative programming. In: Proc. 1986 ACM Conf. on Lisp and Functional Programming, pp. 28–38 (1986)
Talpin, J.P., Jouvelot, P.: The type and effect discipline. Information and Computation 111(2), 245–296 (1994)
Tofte, M., Talpin, J.P.: Region-based memory management. Information and Computation 132(2), 109–176 (1997)
Birkedal, L., Tofte, M.: A constraint-based region inference algorithm. Theoretical Computer Science 58, 299–392 (2001)
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)
Greenhouse, A., Boyland, J.: An object-oriented effects system. In: Liu, H. (ed.) ECOOP 1999. LNCS, vol. 1628, pp. 205–229. Springer, Heidelberg (1999)
Skalka, C.: Trace effects and object orientation. In: Proceedings of the ACM Conference on Principles and Practice of Declarative Programming, Lisbon, Portugal (2005)
Gold, E.M.: Language identification in the limit. Information and Control 10(5), 447–474 (1967)
Angluin, D.: Inductive inference of formal languages from positive data. Information and Control 45(2), 117–135 (1980)
Denis, F.: Learning regular languages from simple positive examples. Machine Learning 44(1/2), 37–66 (2001)
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)
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)
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)
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)
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)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)