Abstract
Interpreters and just-in-time (JIT) compilers are ubiquitous in modern computer systems, making it important to have good program analyses for reasoning about such systems. Control dependence, which plays a fundamental role in a number of program analyses, is an important contender in this regard. Existing algorithms for (dynamic) control dependence analysis do not take into account some important runtime characteristics of interpretive computations, and as a result produce results that may be imprecise and/or unsound. This paper describes a new notion of control dependence and an analysis algorithm for interpretive systems. This significantly improves dynamic control dependence information, with corresponding improvements in client analyses such as dynamic program slicing and reverse engineering. To the best of our knowledge, this is the first proposal to reason about low-level dynamic control dependencies in interpretive systems in the presence of dynamic code generation and optimization.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
There may be additional software components in the runtime system, e.g., a profiler to identify hot code that should be JIT-compiled, a garbage collector, etc. For the purposes of this paper we focus on the interpreter and the JIT compiler.
- 2.
We currently use the objdump utility for disassembly, invoking it as ‘objdump –disassemble –source’; however, any other disassembler would work. The ‘–source’ option allows us to identify control flow targets for indirect jumps corresponding to switch statements.
- 3.
Issues 4296 and 3720 can be found at http://bugs.python.org/issue4296 and http://bugs.python.org/issue3720 respectively.
- 4.
References
Adl-Tabatabai, A.R., Cierniak, M., Lueh, G.Y., Parikh, V.M., Stichnoth, J.M.: Fast, effective code generation in a just-in-time Java compiler. In: Proceedings of the PLDI 1998, pp. 280–290, June 1998
Agrawal, H., Horgan, J.R.: Dynamic program slicing. In: Proceedings of the PLDI 1990, pp. 246–256, June 1990
Agrawal, H., Horgan, J.R., Krauser, E.W., London, S.: Incremental regression testing. In: ICSM, vol. 93, pp. 348–357. Citeseer (1993)
Amtoft, T., Androutsopoulos, K., Clark, D., Harman, M., Li, Z.: An alternative characterization of weak order dependence. Inf. Process. Lett. 110(21), 939–943 (2010)
Arnold, M., Fink, S.J., Grove, D., Hind, M., Sweeney, P.F.: A survey of adaptive optimization in virtual machines. Proc. IEEE 93(2), 449–466 (2005)
Balakrishnan, G.: WYSINWYX: What you see is not what you eXecute. Ph.D. thesis, Computer Science Department, University of Wisconsin, Madison (2007)
Bao, T., Zheng, Y., Lin, Z., Zhang, X., Xu, D.: Strict control dependence and its effect on dynamic information flow analyses. In: Proceedings of the 19th ISSTA, pp. 13–24 (2010)
Barth, J.M.: A practical interprocedural data flow analysis algorithm. Commun. ACM 21(9), 724–736 (1978)
Bilardi, G., Pingali, K.: A framework for generalized control dependence. ACM SIGPLAN Not. 31(5), 291–300 (1996)
Chen, H., Cutler, C., Kim, T., Mao, Y., Wang, X., Zeldovich, N., Kaashoek, M.F.: Security bugs in embedded interpreters. In: Proceedings of the 4th Asia-Pacific Workshop on Systems, p. 17. ACM (2013)
Clausen, L.R.: A java bytecode optimizer using side-effect analysis. Concurrency Pract. Experience 9(11), 1031–1045 (1997)
Cytron, R., Ferrante, J., Sarkar, V.: Compact representations for control dependence. In: Proceedings of the PLDI 1990, pp. 337–351 (1990)
Danicic, S., Barraclough, R.W., Harman, M., Howroyd, J.D., Kiss, A., Laurence, M.R.: A unifying theory of control dependence and its application to arbitrary program structures. Theoret. Comput. Sci. 412(49), 6809–6842 (2011)
Denning, D.E.: A lattice model of secure information flow. Commun. ACM 19(5), 236–243 (1976)
Ertl, M.A., Gregg, D.: The structure and performance of efficient interpreters. J. Instr. Level Parallelism 5, 1–25 (2003)
Ferrante, J., Ottenstein, K.J., Warren, J.D.: The program dependence graph and its use in optimization. ACM Trans. Program. Lang. Syst. (TOPLAS) 9(3), 319–349 (1987)
Franz, M.: Adaptive compression of syntax trees and iterative dynamic code optimization: Two basic technologies for mobile object systems. In: Vitek, J., Tschudin, C. (eds.) MOS 1996. LNCS, vol. 1222, pp. 263–276. Springer, Heidelberg (1997). doi:10.1007/3-540-62852-5_19
Gagnon, E., Hendren, L.: Effective inline-threaded interpretation of java bytecode using preparation sequences. In: Hedin, G. (ed.) CC 2003. LNCS, vol. 2622, pp. 170–184. Springer, Heidelberg (2003). doi:10.1007/3-540-36579-6_13
Gal, A., et al.: Trace-based just-in-time type specialization for dynamic languages. In: Proceedings of the 30th SIGPLAN Conference on Programming Language Design and Implementation, pp. 465–478 (2009)
Hopcroft, J.E., Motwani, R., Ullman, J.D.: Introduction to Automata Theory, Languages, and Computation. Addison Wesley, Reading (1979)
Horwitz, S., Reps, T., Binkley, D.: Interprocedural slicing using dependence graphs. ACM Trans. Program. Lang. Syst. (TOPLAS) 12(1), 26–60 (1990)
Jones, N.D., Gomard, C.K., Sestoft, P.: Partial Evaluation and Automatic Program Generation. Prentice Hall, Upper Saddle River (1993)
Kang, M.G., McCamant, S., Poosankam, P., Song, D.: DTA++: Dynamic taint analysis with targeted control-flow propagation. In: NDSS (2011)
Korel, B., Laski, J.: Dynamic program slicing. Inf. Process. Lett. 29(3), 155–163 (1988)
Lattner, C., Adve, V.: LLVM: A compilation framework for lifelong program analysis & transformation. In: International Symposium on Code Generation and Optimization, pp. 75–86 (2004)
Luk, C.K., et al.: Pin: Building customized program analysis tools with dynamic instrumentation. In: Proceedings of the ACM Conference on Programming Language Design and Implementation, pp. 190–200, June 2005
Masri, W., Podgurski, A., Leon, D.: Detecting and debugging insecure information flows. In: ISSRE 2004, pp. 198–209 (2004)
Midkiff, S.P.: Automatic parallelization: an overview of fundamental compiler techniques. Synth. Lect. Comput. Architect. 7(1), 1–169 (2012)
Sharif, M., Lanzi, A., Giffin, J., Lee, W.: Automatic reverse engineering of malware emulators. In: 2009 Proceedings of the IEEE Symposium on Security and Privacy, May 2009
Smith, J., Nair, R.: Virtual Machines: Versatile Platforms for Systems and Processes. Elsevier, Amsterdam (2005)
Srinivasan, V., Reps, T.: Partial evaluation of machine code. In: ACM SIGPLAN Notices, vol. 50, pp. 860–879. ACM (2015)
Thibault, S., Consel, C., Lawall, J.L., Marlet, R., Muller, G.: Static and dynamic program compilation by interpreter specialization. High.-Order Symbolic Comput. 13(3), 161–178 (2000)
Tip, F.: A survey of program slicing techniques. J. Program. Lang. 3, 121–189 (1995)
Wang, X., et al.: Jitk: a trustworthy in-kernel interpreter infrastructure. In: Proceedings of the USENIX conference on Operating Systems Design and Implementation, pp. 33–47 (2014)
Weiser, M.: Program slicing. IEEE Trans. Softw. Eng. 10(4), 352–357 (1984)
Wouters, T., Yasskin, J., Winter, C.: unladen-swallow: A faster implementation of python, https://code.google.com/p/unladen-swallow/
Xin, B., Zhang, X.: Efficient online detection of dynamic control dependence. In: Proceedings of the 2007 International Symposium on Software Testing and Analysis, pp. 185–195. ACM (2007)
Zhang, X., Gupta, N., Gupta, R.: A study of effectiveness of dynamic slicing in locating real faults. Empirical Softw. Eng. 12(2), 143–160 (2007)
Acknowledgment
This research was supported in part by the National Science Foundation (NSF) under grants CNS-1115829, CNS-1145913, III-1318343, CNS-1318955, and CNS-1525820.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2017 Springer International Publishing AG
About this paper
Cite this paper
Yadegari, B., Debray, S. (2017). Control Dependencies in Interpretive Systems. In: Lahiri, S., Reger, G. (eds) Runtime Verification. RV 2017. Lecture Notes in Computer Science(), vol 10548. Springer, Cham. https://doi.org/10.1007/978-3-319-67531-2_19
Download citation
DOI: https://doi.org/10.1007/978-3-319-67531-2_19
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-67530-5
Online ISBN: 978-3-319-67531-2
eBook Packages: Computer ScienceComputer Science (R0)