skip to main content
10.1145/571157.571171acmconferencesArticle/Chapter ViewAbstractPublication PagesppdpConference Proceedingsconference-collections
Article

Transforming the .NET intermediate language using path logic programming

Authors Info & Claims
Published:06 October 2002Publication History

ABSTRACT

Path logic programming is a modest extension of Prolog for the specification of program transformations. We give an informal introduction to this extension, and we show how it can be used in coding standard compiler optimisations, and also a number of obfuscating transformations. The object language is the Microsoft .NET intermediate language (IL).

References

  1. Aho, A., Sethi, R., and Ullman, J. Compilers: Principles, Techniques, and Tools. Addison-Wesley, 1985.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Archer, T. Inside C#. Microsoft Press, 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Assmann, U. How to specify program analysis and transformation with graph rewrite systems. In Compiler Construction 1996 (1996), P. Fritzson, Ed., vol. 1060 of Lecture Notes in Computer Science, pp. 372--395.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Bik, A. J. C., Brinkhaus, P. J., Knijnenburg, P. M. W., and Wijshoff, H. A. G. Transformation mechanisms in MT1. Technical report, Leiden Institute of Advanced Computer Science, 1998.]]Google ScholarGoogle Scholar
  5. Borovansky, P., Kirchner, C., Kirchner, H., and Ringeissen, C. Rewriting with strategies in ELAN: a functional semantics. International Journal of Foundations of Computer Science 12, 1 (2001), 69--98. Also available as Technical Report A01-R-388, LORIA, Nancy (France).]]Google ScholarGoogle ScholarCross RefCross Ref
  6. Buneman, P., Fernandez, M., and Suciu, D. UnQL: A query language and algebra for semistructured data based on structural recursion. VLDB Journal 9, 1 (2000), 76--110.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Chou, A., Chelf, B., Hallam, S., and Engler, D. Checking system rules using system-specific, programmer-written compiler extensions. In USENIX Symposium on Operating System Design and Implementation (2000).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Collberg, C., Thomborson, C., and Low, D. A taxonomy of obfuscating transformations. Tech. Rep. 148, Department of Computer Science, University of Auckland, July 1997. Available from URL: http://www.cs.auckland.ac.nz/~collberg/Research/Publications/CollbergThomborsonLow97a/index.html.]]Google ScholarGoogle Scholar
  9. Crew, R. F. ASTLOG: a language for examining abstract syntax trees. In Proceedings of the USENIX Conference on Domain-Specific Languages (1997), C. Ramming, Ed., pp. 229--242.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Cui, B., Dong, Y., Du, X., Kumar, K. N., Ramakrishnan, C. R., Ramakrishnan, I. V., Roychoudhury, A., Smolka, S. A., and Warren, D. S. Logic programming and model checking. In PLILP/ALP (1998), pp. 1--20.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Dawson, S., Ramakrishnan, C. R., and Warren, D. S. Practical program analysis using general purpose logic programming systems - a case study. In SIGPLAN Conference on Programming Language Design and Implementation (1996), pp. 117--126.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. de Moor, O., Lacey, D., and Van Wyk, E. Universal regular path queries. Higher-order and symbolic computation (2002), to appear.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. de Volder, K. Type-oriented logic meta-programming. PhD dissertation, Vrije Universiteit Brussels, 1998.]]Google ScholarGoogle Scholar
  14. Dowd, T., Henderson, F., and Ross, P. Compiling Mercury to the .NET common language runtime. In BABEL '01: First International Workshop on Multi-Language Infrastructure and Interoperability (To appear, 2002), vol. 59 of Electronic Notes in Theoretical Computer Science.]]Google ScholarGoogle Scholar
  15. ECMA. Standard ECMA-335: Common language infrastructure (CLI). Available from http://www.ecma.ch/ecma1/STAND/ecma-335.htm.]]Google ScholarGoogle Scholar
  16. Felty, A. A logic programming approach to implementing higher-order term rewriting. In Proceedings of the January 1991 Workshop on Extensions to Logic Programming (1992), L.-H. Eriksson, L. Hallnäs, and P. Schroeder-Heister, Eds., vol. 596, Springer-Verlag Lecture Notes in Artificial Intelligence, pp. 135--161.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Gunnerson, E. A programmer's introduction to C#. APress, 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Kiczales, G., Lamping, J., Menhdhekar, A., Maeda, C., Lopes, C., Loingtier, J.-M., and Irwin, J. Aspect-oriented programming. In Proceedings European Conference on Object-Oriented Programming, M. Akcsit and S. Matsuoka, Eds., vol. 1241. Springer-Verlag, Berlin, Heidelberg, and New York, 1997, pp. 220--242.]]Google ScholarGoogle ScholarCross RefCross Ref
  19. Lacey, D., and de Moor, O. Imperative program transformation by rewriting. In Proceedings of the 10th International Conference on Compiler Construction (2001), R. Wilhelm, Ed., vol. 2027 of LNCS, Springer Verlag, pp. 52--68.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Liu, Y. A., and Yu, F. Solving regular path queries. In Proceedings of the 6th International Conference on Mathematics of Program Construction (2002), pp. 195--208.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Masuhara, H., Kiczales, G., and Dutchyn, C. Compilation semantics of aspect-oriented programs. In Proceedings of the AOSD workshop on Foundations of Aspect-oriented Languages (2002), vol. TR-02-06 of Technical report, Department of Computer Science, Iowa State University, pp. 17--25.]]Google ScholarGoogle Scholar
  22. Meijer, E., and Gough, J. A technical overview of the commmon language infrastructure. Available from URL: http://research.microsoft.com/~emeijer/Papers/CLR.pdf.]]Google ScholarGoogle Scholar
  23. Melski, D., and Reps, T. Interconvertibility of a class of set constraints and context-free language reachability. Theoretical Computer Science, 248 (2000), 29--98.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Nadathur, G., and Miller, D. Higher-order logic programming. In Handbook of logics for artificial intelligence and logic programming, D. M. Gabbay, C. Hogger, and J. A. Robinson, Eds., vol. 5. Clarendon Press, 1998, pp. 499--590.]]Google ScholarGoogle Scholar
  25. Orgun, M. A., and Ma, W. An overview of temporal and modal logic programming. In Proceedings of ICTL'94: The 1st International Conference on Temporal Logic (Berlin Heidelberg, 1994), D. M. Gabbay and H. J. Ohlbach, Eds., Springer-Verlag, pp. 445--479.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Paige, R. Viewing a program transformation system at work. In Proceedings of the Sixth International Symposium on Programming Language Implementation and Logic Programming (1994), M. Hermenegildo and J. Penjam, Eds., Springer Verlag, pp. 5--24.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Somogyi, Z., Henderson, F., and Conway, T. Mercury: an efficient purely declarative logic programming language. In Proceedings of the Australian Computer Science Conference (1995), pp. 499--512.]]Google ScholarGoogle Scholar
  28. Spivey, M. Logic Programming for Programmers. Prentice Hall, 1996.]]Google ScholarGoogle Scholar
  29. Vallee-Rai, R., Gagnon, E., Hendren, L. J., Lam, P., Pominville, P., and Sundaresan, V. Optimizing Java bytecode using the Soot framework: Is it feasible? In Proceedings of the International Conference on Compiler Construction (2000), pp. 18--34.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Vallee-Rai, R., Hendren, L., Sundaresan, V., Lam, P., Gagnon, E., and Co, P. Soot -- a Java optimization framework. In Proceedings of CASCON 1999 (1999), pp. 125--135.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Visser, E. Stratego: A language for program transformation based on rewriting strategies. System description of Stratego 0.5. In Rewriting Techniques and Applications (RTA'01) (May 2001), A. Middeldorp, Ed., no. 2051 in Lecture Notes in Computer Science, Springer-Verlag, pp. 357--362.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Whitfield, D. L., and Soffa, M. L. An approach for exploring code improving transformations. ACM Transactions on Programming Languages and Systems 19, 6 (1997), 1053--1084.]] Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Transforming the .NET intermediate language using path logic programming

      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
      • Published in

        cover image ACM Conferences
        PPDP '02: Proceedings of the 4th ACM SIGPLAN international conference on Principles and practice of declarative programming
        October 2002
        219 pages
        ISBN:1581135289
        DOI:10.1145/571157

        Copyright © 2002 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 6 October 2002

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • Article

        Acceptance Rates

        PPDP '02 Paper Acceptance Rate18of36submissions,50%Overall Acceptance Rate230of486submissions,47%

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader