Abstract
In logic metaprogramming, programs are not stored as plain textfiles but rather derived from a deductive database. While the benefits of this approach for metaprogramming are obvious, its incompatibility with separate checking limits its applicability to large-scale projects. We analyze the problems inhibiting separate checking and propose a class of logics that reconcile logic metaprogramming and separate checking. We have formalized the resulting module system and have proven the soundness of separate checking. We validate its feasibility by presenting the design and implementation of a specific logic that is able to express many metaprogramming examples from the literature.
- }}D. Ancona, F. Damiani, S. Drossopoulou, and E. Zucca. Polymorphic bytecode: Compositional compilation for Java-like languages. In Proceedings of the 32th Symposium on Principles of Programming Languages (POPL '05), New York, NY, USA, 2005. ACM Press. Google Scholar
Digital Library
- }}D. Ancona, G. Lagorio, and E. Zucca. Flexible type-safe linking of components for Java-like languages. In Proceedings of the 7th Joint Modular Languages Conference (JMLC '06), volume 4228 of Lecture Notes in Computer Science, pages 136--154, Berlin, Heidelberg, 2006. Springer Verlag. Google Scholar
Digital Library
- }}Chris Andreae, James Noble, Shane Markstrum, and Todd Millstein. A framework for implementing pluggable type systems. In Proceedings of the 21st conference on Object-Oriented Programing, Systems, Languages, and Applications (OOPSLA '06), pages 57--74, New York, NY, USA, 2006. ACM Press. Google Scholar
Digital Library
- }}Don Batory. Feature models, grammars, and propositional formulas. In Proceedings of the 9th International Software Product Line Conference (SPLC '05), volume 3714 of Lecture Notes in Computer Science, Berlin, Heidelberg, 2005. Springer Verlag. Google Scholar
Digital Library
- }}David Benavides, Pablo Trinidad, and Antonio Ruiz-cortés. Automated reasoning on feature models. In Proceedings of the 17th Conference on Advanced Information Systems Engineering (CAiSE '05), volume 3520 of Lecture Notes in Computer Science, pages 491--503, Berlin, Heidelberg, 2005. Springer Verlag. Google Scholar
Digital Library
- }}Gilad Bracha. Pluggable type systems, 2004. OOPSLA Workshop on Revival of Dynamic Languages.Google Scholar
- }}Daniel Cabeza and Manuel Hermenegildo. A new module system for Prolog. In Computational Logic (CL 2000), volume 1861 of Lecture Notes in Computer Science, pages 131--148, Berlin, Heidelberg, 2000. Springer Verlag. Google Scholar
Digital Library
- }}Luca Cardelli. Program fragments, linking, and modularization. In Proceedings of the 24th ACM SIGPLAN-SIGACT symposium on Principles of Programming Languages (POPL '97), pages 266--277, New York, 1997. ACM Press. Google Scholar
Digital Library
- }}S. Ceri, G. Gottlob, and L. Tanca. What you always wanted to know about datalog (and never dared to ask). IEEE Transactions on Knowledge and Data Engineering, 01(1):146--166, 1989. Google Scholar
Digital Library
- }}Arindam Chakrabarti, Luca de Alfaro, Thomas A. Henzinger, Marcin Jurdzinski, and Freddy Y. C. Mang. Interface compatibility checking for software modules. In Proceedings of the 14th International Conference on Computer Aided Verification (CAV '02), pages 428--441, Berlin, Heidelberg, 2002. Springer Verlag. Google Scholar
Digital Library
- }}Shigeru Chiba. A metaobject protocol for C++. In Proceedings of the 10th conference on Object-Oriented Programing, Systems, Languages, and Applications (OOPSLA '95), pages 285--299, New York, 1995. ACM Press. Google Scholar
Digital Library
- }}Shigeru Chiba. Load-time structural reflection in Java. In Proceedings of the 14th European Conference on Object-Oriented Programming (ECOOP '00), volume 1850 of Lecture Notes in Computer Science, pages 313--336, Berlin, Heidelberg, 2000. Springer Verlag. Google Scholar
Digital Library
- }}Luca de Alfaro and Thomas A. Henzinger. Interface automata. In Proceedings of the 8th European software engineering conference held jointly with 9th ACM SIGSOFT international symposium on Foundations of software engineering (ESEC/FSE-9), pages 109--120, New York, USA, 2001. ACM Press. Google Scholar
Digital Library
- }}Kris De Volder. Type-Oriented Logic Meta Programming. PhD thesis, Vrije Universiteit Brussel, 1998.Google Scholar
- }}Kris De Volder. Implementing design patterns as declarative code generators. http://www.cs.ubc.ca/ kdvolder/publications/design_patterns-abstract.ht%m, 2001.Google Scholar
- }}Kris De Volder, Johan Fabry, and Roel Wuyts. Logic meta components as a generic component model. In Fifth International Workshop on Component-Oriented Programming, Workshop reader of ECOOP '00, 2000.Google Scholar
- }}Dirk Draheim, Christof Lutteroth, and Gerald Weber. A type system for reflective program generators. In Proceedings of the 4th international conference on Generative programming and component engineering (GPCE '05), Lecture Notes in Computer Science, pages 327--341, Berlin, Heidelberg, 2005. Springer Verlag. Google Scholar
Digital Library
- }}Michael Eichberg, Sven Kloppenburg, Karl Klose, and Mira Mezini. Defining and continuous checking of structural program dependencies. In Proceedings of the 30th international conference on Software engineering (ICSE '08), pages 391--400, New York, NY, USA, 2008. ACM Press. Google Scholar
Digital Library
- }}Manuel Fahndrich, Michael Carbin, and James R. Larus. Reflective program generation with patterns. In Proceedings of the 5th international conference on Generative programming and component engineering (GPCE '06), pages 275--284, New York, NY, USA, 2006. ACM Press. Google Scholar
Digital Library
- }}Robert Bruce Findler, Mario Latendresse, and Matthias Felleisen. Behavioral contracts and behavioral subtyping. In Proceedings of the 8th European software engineering conference held jointly with 9th ACM SIGSOFT international symposium on Foundations of software engineering (ESEC/FSE-9), pages 229--236, New York, NY, USA, 2001. ACM Press. Google Scholar
Digital Library
- }}Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. Design Patterns. Addison-Wesley Professional, Indianapolis, USA, January 1995.Google Scholar
- }}J.A. Goguen and R.M. Burstall. Introduction to institutions. In Logic of Programs, Workshop, Carnegie Mellon University, volume 164 of Lecture Notes in Computer Science, pages 221--256. Springer Verlag, 1983. Google Scholar
Digital Library
- }}Elnar Hajiyev, Mathieu Verbaere, and Oege de Moor. Codequest: Scalable source code queries with datalog. In Proceedings of the 20th European conference on Object oriented programming (ECOOP '06), volume 4067 of Lecture Notes in Computer Science, pages 2--27, Berlin, Heidelberg, 2006. Springer Verlag. Google Scholar
Digital Library
- }}P. Hill. A module system for meta-programming. Logic Program Synthesis and Transformation - Meta-Programming in Logic, 883:395--409, 1994. Google Scholar
Digital Library
- }}Shan S. Huang and Yannis Smaragdakis. Expressive and safe static reflection with MorphJ. In Proceedings of the 2008 ACM SIGPLAN conference on Programming language design and implementation (PLDI '08), pages 79--89, New York, NY, USA, 2008. ACM Press. Google Scholar
Digital Library
- }}Shan S. Huang, David Zook, and Yannis Smaragdakis. cJ: enhancing Java with safe type conditions. In Proceedings of the 6th international conference on Aspect-oriented software development (AOSD '07), pages 185--198, New York, NY, USA, 2007. ACM Press. Google Scholar
Digital Library
- }}Shan S. Huang, David Zook, and Yannis Smaragdakis. Morphing: Safely Shaping a Class in the Image of Others. In Proceedings of the 21st European Conference on Object-Oriented Programming (ECOOP '07), Berlin, Heidelberg, 2007. Springer Verlag. Google Scholar
Digital Library
- }}Shan Shan Huang, David Zook, and Yannis Smaragdakis. Statically safe program generation with safegen. In Proceedings of the 4th international conference on Generative programming and component engineering (GPCE '05), Lecture Notes in Computer Science, pages 309--326. Springer Verlag, 2005. Google Scholar
Digital Library
- }}Evelina Lamma and Paola Mello. Modularity in logic programming. In Proceedings of the eleventh international conference on Logic programming, pages 15--17, Cambridge, MA, USA, 1994. MIT Press. Google Scholar
Digital Library
- }}Kim Mens, Isabel Michiels, and Roel Wuyts. Supporting software development through declaratively codified programming patterns. In Journal on Expert Systems with Applications, pages 236--243, New York, NY, USA, 2001. Elsevier Science Inc.Google Scholar
- }}Dale Miller. A logical analysis of modules in logic programming. J. Log. Program., 6(1-2):79--108, 1989. Google Scholar
Digital Library
- }}Gopalan Nadathur, Bharat Jayaraman, and Keehang Kwon. Scoping constructs in logic programming: Implementation problems and their solutions. J. Log. Program., 25(2):119--161, 1995.Google Scholar
Cross Ref
- }}Gopalan Nadathur and Dale Miller. An overview of łProlog. In Proceedings of the Fifth International Logic Programming Conference, pages 810--827, Cambridge, MA, USA, 1988. MIT Press.Google Scholar
- }}Klaus Ostermann, Mira Mezini, and Christoph Bockisch. Expressive pointcuts for increased modularity. In Proceedings of the 19th European Conference on Object-Oriented Programming (ECOOP '05), volume 3586 of Lecture Notes in Computer Science, pages 214--240, Berlin, Heidelberg, 2005. Springer Verlag. Google Scholar
Digital Library
- }}D. L. Parnas. On the criteria to be used in decomposing systems into modules. Communications of the ACM, 15(12):1053--1058, December 1972. Google Scholar
Digital Library
- }}Raymond Reiter. On closed world databases. In Logic and Databases, pages 55--76, New York, NY, USA, 1978. Plenum Press.Google Scholar
- }}Ehud Shapiro and Leon Sterling. The Art of PROLOG: Advanced Programming Techniques. The MIT Press, Cambridge, MA, USA, April 1994. Google Scholar
Digital Library
- }}Walid Taha and Tim Sheard. Multi-stage programming with explicit annotations. In Proceedings of the 1997 symposium on Partial Evaluation and semantics-based Program Manipulation (PEPM '97), pages 203--217, New York, USA, 1997. ACM Press. Google Scholar
Digital Library
- }}Roel Wuyts. A Logic Meta Programming Approach to Support the Co-Evolution of Object-Oriented Design and Implementation. PhD thesis, Vrije Universiteit Brussel, 2001.Google Scholar
Index Terms
Modular logic metaprogramming
Recommendations
Modular logic metaprogramming
OOPSLA '10: Proceedings of the ACM international conference on Object oriented programming systems languages and applicationsIn logic metaprogramming, programs are not stored as plain textfiles but rather derived from a deductive database. While the benefits of this approach for metaprogramming are obvious, its incompatibility with separate checking limits its applicability ...
Modular logic programming
Modularity is a key issue in the design of modern programming languages. When designing modular features for declarative languages in general, and for logic programming languages in particular, the challenge lies in avoiding the superimposition of a ...
Disjunction and modular goal-directed proof search
This article explores goal-directed proof search in first-order multimodal logic. I focus on a family of modal logics which offer the expressive power to specify modular goals and local assumptions. A modular goal must be proved from designated ...







Comments