skip to main content
research-article
Free Access

Relations as an abstraction for BDD-based program analysis

Published:01 August 2008Publication History
Skip Abstract Section

Abstract

In this article we present Jedd, a language extension to Java that supports a convenient way of programming with Binary Decision Diagrams (BDDs). The Jedd language abstracts BDDs as database-style relations and operations on relations, and provides static type rules to ensure that relational operations are used correctly.

The article provides a description of the Jedd language and reports on the design and implementation of the Jedd translator and associated runtime system. Of particular interest is the approach to assigning attributes from the high-level relations to physical domains in the underlying BDDs, which is done by expressing the constraints as a SAT problem and using a modern SAT solver to compute the solution. Further, a runtime system is defined that handles memory management issues and supports a browsable profiling tool for tuning the key BDD operations.

The motivation for designing Jedd was to support the development of interrelated whole program analyses based on BDDs. We have successfully used Jedd to build Paddle, a framework of context-sensitive program analyses, including points-to analysis and call graph construction, as well as several client analyses.

References

  1. Beazley, D. M. 1996. SWIG: An easy to use tool for integrating scripting languages with C and C++. In Proceedings of the 4th USENIX Tcl/Tk Workshop. 129--139. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Behrmann, G. 2006. The interactive BDD environment. http://iben.sourceforge.net/.Google ScholarGoogle Scholar
  3. Berghammer, R., Leoniuk, B., and Milanese, U. 2002. Implementation of relational algebra using binary decision diagrams. In Proceedings of the 6th International Conference on Relational Methods in Computer Science. Lecture Notes in Computer Science, vol. 2561. 241--257. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Berndl, M., Lhoták, O., Qian, F., Hendren, L., and Umanee, N. 2003. Points-to analysis using BDDs. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM Press, 103--114. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Beyer, D., Noack, A., and Lewerentz, C. 2003. Simple and efficient relational querying of software structures. In Proceedings of the 10th Working Conference on Reverse Engineering (WCRE'03). Victoria, Canada, A. van Deursen, E. Stroulia, and M.-A. D. Storey, Eds. IEEE Computer Society, 216--227. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Bollig, B. and Wegener, I. 1996. Improving the variable ordering of OBDDs is NP-complete. IEEE Trans. Comput. 45, 9, 993--1002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Brabrand, C., Møller, A., and Schwartzbach, M. I. 2002. The <bigwig> project. ACM Trans. Internet Tech. 2, 2, 79--114. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Bryant, R. E. 1992. Symbolic boolean manipulation with ordered binary-decision diagrams. ACM Comput. Surv. 24, 3, 293--318. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Christensen, A. S., Møller, A., and Schwartzbach, M. I. 2003. Extending Java for high-level Web service construction. ACM Trans. Prog. Lang. Syst. 25, 6, 814--875. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Clocksin, W. F. and Mellish, C. S. 1987. Programming in Prolog. Springer-Verlag, Berlin, Germany. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Codd, E. F. 1970. A relational model of data for large shared data banks. Commu. ACM 13, 6, 377--387. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Das, M. 2000. Unification-based pointer analysis with directional assignments. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM Press, 35--46. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Fahmy, H., Holt, R. C., and Cordy, J. R. 2001. Wins and losses of algebraic transformations of software architectures. In Proceedings of the 16th IEEE International Conference on Automated Software Engineering (ASE'01). Coronado Island, San Diego, CA. IEEE Computer Society, 51--62. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Fähndrich, M., Foster, J. S., Su, Z., and Aiken, A. 1998. Partial online cycle elimination in inclusion constraint graphs. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM Press, 85--96. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Garcia-Molina, H., Ullman, J. D., and Widom, J. 2001. Database Systems: The Complete Book. Prentice Hall, Upper Saddle River, NJ. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Gosling, J., Joy, B., and Steele, G. L. 1996. The Java Language Specification. The Java Series. Addison-Wesley, Reading, MA. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Heintze, N. and Tardieu, O. 2001. Ultra-fast aliasing analysis using CLA: A million lines of C code in a second. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM Press, 254--263. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Hipp, D. R. 2006. SQLite: an embeddable database engine. http://www.sqlite.org/.Google ScholarGoogle Scholar
  19. Lhoták, O. 2002. Spark: A flexible points-to analysis framework for Java. M.S. thesis, McGill University.Google ScholarGoogle Scholar
  20. Lhoták, O. 2006. Program analysis using binary decision diagrams. Ph.D. thesis, McGill University.Google ScholarGoogle Scholar
  21. Lhoták, O. and Hendren, L. 2003. Scaling Java points-to analysis using Spark. In Proceedings of the 12th International Conference on Compiler Construction. G. Hedin, Ed. Lecture Notes in Computer Science, vol. 2622. Springer, 153--169. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Lhoták, O. and Hendren, L. 2004. Jedd: a BDD-based relational extension of Java. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM Press, 158--169. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Liang, D., Pennings, M., and Harrold, M. J. 2001. Extending and evaluating flow-insenstitive and context-insensitive points-to analyses for Java. In Proceedings of the ACM SIGPLAN-SIGSOFT Workshop on Program Analysis for Software Tools and Engineering. ACM Press, 73--79. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Lind-Nielsen, J. 2006. BuDDy, A Binary Decision Diagram Package. http://buddy.sourceforge.net/.Google ScholarGoogle Scholar
  25. Meijer, E. and Schulte, W. 2003. Unifying tables, objects, and documents. In Workshop on Declarative Programming in the Context of Object-Oriented Languages. 145--166.Google ScholarGoogle Scholar
  26. Minato, S. and Somenzi, F. 1997. Arithmetic boolean expression manipulator using BDDs. Formal Methods Syst. Design 10, 2/3, 221--242. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Moskewicz, M. W., Madigan, C. F., Zhao, Y., Zhang, L., and Malik, S. 2001. Chaff: Engineering an efficient SAT solver. In Proceedings of the 38th Conference on Design Automation. ACM Press, 530--535. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Nilsson, M. 2006. GBDD -- A package for representing relations with BDDs. http://www.regularmodelchecking.com/software/docs/stable/gbdd/index.html.Google ScholarGoogle Scholar
  29. Nystrom, N., Clarkson, M. R., and Myers, A. C. 2003. Polyglot: An extensible compiler framework for Java. In Proceedings of the 12th International Conference on Compiler Construction. Lecture Notes in Computer Science, vol. 2622. 138--152. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Poskanzer, J. 2006. thttpd: tiny/turbo/throttling HTTP server. http://www.acme.com/software/thttpd/.Google ScholarGoogle Scholar
  31. Qian, F. 2006. SableJBDD, A Java binary decision diagram package. http://www.sable.mcgill.ca/~fqian/SableJBDD/.Google ScholarGoogle Scholar
  32. Rountev, A., Milanova, A., and Ryder, B. G. 2001. Points-to analysis for Java using annotated constraints. In Proceedings of the Conference on Object-Oriented Programming Systems Languages and Applications (OOPSLA '01). ACM Press, 43--55. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Schmidt, J. W. 1977. Some high level language constructs for data of type relation. ACM Trans. Data Syst. 2, 3, 247--261. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Schwartz, J. T., Dewar, R. B. K., Dubinsky, E., and Schonberg, E. 1986. Programming with Sets—An Introduction to Setl. Springer, Berlin, Germany. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Shapiro, M. and Horwitz, S. 1997. Fast and accurate flow-insensitive points-to analysis. In Proceedings of the 24th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. ACM Press, 1--14. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Somenzi, F. 2006. CUDD: CU Decision Diagram Package. http://vlsi.colorado.edu/~fabio/CUDD/.Google ScholarGoogle Scholar
  37. Tani, S., Hamaguchi, K., and Yajima, S. 1993. The complexity of the optimal variable ordering problems of shared binary decision diagrams. In Proceedings of the 4th International Symposium on Algorithms and Computation (ISAAC'93). Springer-Verlag, 389--398. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. Tarjan, R. E. 1972. Depth first search and linear graph algorithms. J. Comput. 1, 2, 146--160.Google ScholarGoogle Scholar
  39. Ullman, J. D. 1988. Principles of Database and Knowledge-Base Systems, Vol. I. Computer Science Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Ullman, J. D. 1989. Principles of Database and Knowledge-Base Systems, Vol. II. Computer Science Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. Vahidi, A. 2006. JBDD, a Java interface to CUDD and BuDDY. http://javaddlib.sourceforge.net/jbdd/index.html.Google ScholarGoogle Scholar
  42. Whaley, J. 2006a. bddbddb. http://bddbddb.sourceforge.net.Google ScholarGoogle Scholar
  43. Whaley, J. 2006b. JavaBDD. http://javabdd.sourceforge.net.Google ScholarGoogle Scholar
  44. Whaley, J. and Lam, M. S. 2002. An efficient inclusion-based points-to analysis for strictly-typed languages. In Proceedings of the 9th International Symposium on Static Analysis (SAS'02). Lecture Notes in Computer Science, vol. 2477. 180--195. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. Whaley, J. and Lam, M. S. 2004. Cloning-based context-sensitive pointer alias analysis using binary decision diagrams. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM Press, 131--144. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. Zhang, L. and Malik, S. 2003. Validating SAT solvers using an independent resolution-based checker: Practical implementations and other applications. In Proceedings of Design, Automation and Test in Europe (DATE'03). 880--885. Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. Zhu, J. 2002. Symbolic pointer analysis. In Proceedings of the IEEE/ACM International Conference on Computer-Aided Design. ACM Press, 150--157. Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. Zhu, J. and Calman, S. 2004. Symbolic pointer analysis revisited. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM Press, 145--157. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Relations as an abstraction for BDD-based program analysis

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader
        About Cookies On This Site

        We use cookies to ensure that we give you the best experience on our website.

        Learn more

        Got it!