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).
- Aho, A., Sethi, R., and Ullman, J. Compilers: Principles, Techniques, and Tools. Addison-Wesley, 1985.]] Google ScholarDigital Library
- Archer, T. Inside C#. Microsoft Press, 2001.]] Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 Scholar
- 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 ScholarCross Ref
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- de Moor, O., Lacey, D., and Van Wyk, E. Universal regular path queries. Higher-order and symbolic computation (2002), to appear.]] Google ScholarDigital Library
- de Volder, K. Type-oriented logic meta-programming. PhD dissertation, Vrije Universiteit Brussels, 1998.]]Google Scholar
- 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 Scholar
- ECMA. Standard ECMA-335: Common language infrastructure (CLI). Available from http://www.ecma.ch/ecma1/STAND/ecma-335.htm.]]Google Scholar
- 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 ScholarDigital Library
- Gunnerson, E. A programmer's introduction to C#. APress, 2001.]] Google ScholarDigital Library
- 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 ScholarCross Ref
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 Scholar
- 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 Scholar
- 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 ScholarDigital Library
- 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 Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 Scholar
- Spivey, M. Logic Programming for Programmers. Prentice Hall, 1996.]]Google Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
Index Terms
- Transforming the .NET intermediate language using path logic programming
Recommendations
A Lingua Franca for Concurrent Logic Programming
Two of the more important concurrent logic programming languages with nonflat guards are GHC and Parlog. They balance the requirements of having clean semantics and providing good control facilities rather differently, and their respective merits are ...
Template meta-programming for Haskell
We propose a new extension to the purely functional programming language Haskell that supports compile-time meta-programming. The purpose of the system is to support the algorithmic construction of programs at compile-time.The ability to generate code ...
Template meta-programming for Haskell
Haskell '02: Proceedings of the 2002 ACM SIGPLAN workshop on HaskellWe propose a new extension to the purely functional programming language Haskell that supports compile-time meta-programming. The purpose of the system is to support the algorithmic construction of programs at compile-time.The ability to generate code ...
Comments