Skip to main content

Control Dependencies in Interpretive Systems

  • Conference paper
  • First Online:
Runtime Verification (RV 2017)

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

Included in the following conference series:

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.

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 EPUB and 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

Notes

  1. 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. 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. 3.

    Issues 4296 and 3720 can be found at http://bugs.python.org/issue4296 and http://bugs.python.org/issue3720 respectively.

  4. 4.

    https://www.infoq.com/news/2015/07/NET46-bug2.

References

  1. 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

    Google Scholar 

  2. Agrawal, H., Horgan, J.R.: Dynamic program slicing. In: Proceedings of the PLDI 1990, pp. 246–256, June 1990

    Google Scholar 

  3. Agrawal, H., Horgan, J.R., Krauser, E.W., London, S.: Incremental regression testing. In: ICSM, vol. 93, pp. 348–357. Citeseer (1993)

    Google Scholar 

  4. 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)

    Article  MathSciNet  Google Scholar 

  5. 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)

    Article  Google Scholar 

  6. Balakrishnan, G.: WYSINWYX: What you see is not what you eXecute. Ph.D. thesis, Computer Science Department, University of Wisconsin, Madison (2007)

    Google Scholar 

  7. 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)

    Google Scholar 

  8. Barth, J.M.: A practical interprocedural data flow analysis algorithm. Commun. ACM 21(9), 724–736 (1978)

    Article  Google Scholar 

  9. Bilardi, G., Pingali, K.: A framework for generalized control dependence. ACM SIGPLAN Not. 31(5), 291–300 (1996)

    Article  Google Scholar 

  10. 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)

    Google Scholar 

  11. Clausen, L.R.: A java bytecode optimizer using side-effect analysis. Concurrency Pract. Experience 9(11), 1031–1045 (1997)

    Article  Google Scholar 

  12. Cytron, R., Ferrante, J., Sarkar, V.: Compact representations for control dependence. In: Proceedings of the PLDI 1990, pp. 337–351 (1990)

    Google Scholar 

  13. 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)

    Article  MathSciNet  MATH  Google Scholar 

  14. Denning, D.E.: A lattice model of secure information flow. Commun. ACM 19(5), 236–243 (1976)

    Article  MathSciNet  MATH  Google Scholar 

  15. Ertl, M.A., Gregg, D.: The structure and performance of efficient interpreters. J. Instr. Level Parallelism 5, 1–25 (2003)

    Google Scholar 

  16. 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)

    Article  MATH  Google Scholar 

  17. 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

    Chapter  Google Scholar 

  18. 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

    Chapter  Google Scholar 

  19. 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)

    Google Scholar 

  20. Hopcroft, J.E., Motwani, R., Ullman, J.D.: Introduction to Automata Theory, Languages, and Computation. Addison Wesley, Reading (1979)

    MATH  Google Scholar 

  21. Horwitz, S., Reps, T., Binkley, D.: Interprocedural slicing using dependence graphs. ACM Trans. Program. Lang. Syst. (TOPLAS) 12(1), 26–60 (1990)

    Article  Google Scholar 

  22. Jones, N.D., Gomard, C.K., Sestoft, P.: Partial Evaluation and Automatic Program Generation. Prentice Hall, Upper Saddle River (1993)

    MATH  Google Scholar 

  23. Kang, M.G., McCamant, S., Poosankam, P., Song, D.: DTA++: Dynamic taint analysis with targeted control-flow propagation. In: NDSS (2011)

    Google Scholar 

  24. Korel, B., Laski, J.: Dynamic program slicing. Inf. Process. Lett. 29(3), 155–163 (1988)

    Article  MATH  Google Scholar 

  25. 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)

    Google Scholar 

  26. 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

    Google Scholar 

  27. Masri, W., Podgurski, A., Leon, D.: Detecting and debugging insecure information flows. In: ISSRE 2004, pp. 198–209 (2004)

    Google Scholar 

  28. Midkiff, S.P.: Automatic parallelization: an overview of fundamental compiler techniques. Synth. Lect. Comput. Architect. 7(1), 1–169 (2012)

    Article  MathSciNet  Google Scholar 

  29. 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

    Google Scholar 

  30. Smith, J., Nair, R.: Virtual Machines: Versatile Platforms for Systems and Processes. Elsevier, Amsterdam (2005)

    MATH  Google Scholar 

  31. Srinivasan, V., Reps, T.: Partial evaluation of machine code. In: ACM SIGPLAN Notices, vol. 50, pp. 860–879. ACM (2015)

    Google Scholar 

  32. 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)

    Article  MATH  Google Scholar 

  33. Tip, F.: A survey of program slicing techniques. J. Program. Lang. 3, 121–189 (1995)

    Google Scholar 

  34. 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)

    Google Scholar 

  35. Weiser, M.: Program slicing. IEEE Trans. Softw. Eng. 10(4), 352–357 (1984)

    Article  MATH  Google Scholar 

  36. Wouters, T., Yasskin, J., Winter, C.: unladen-swallow: A faster implementation of python, https://code.google.com/p/unladen-swallow/

  37. 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)

    Google Scholar 

  38. 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)

    Article  Google Scholar 

Download references

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

Authors

Corresponding author

Correspondence to Babak Yadegari .

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics