Blending the Logic Paradigm into C + +
暂无分享,去创建一个
The Logic paradigm (LP) provides a powerful programming model that has been underrepresented in mainstream programming as compared to the object-oriented, functional and imperative paradigms. Lot of work can be cited in the space of integrating logic into functional programming or the functional into imperative paradigm but relatively less has been written about integrating logic programming into popular object-oriented languages used by the majority of software developers. Consequently a vast unexplored territory exists in the space of multiparadigm programming techniques that leverage logic programming in the dominant universe of imperative and object–oriented programming. This paper introduces a technique for seamlessly integrating Logic programming techniques into C++. In this approach, support for LP is provided in the form of a few library primitives and does not require any extensions or modifications to the C++ language. The proposed technique is directly based on the imperative paradigm and can be implemented in about 400 lines of C++ code. The code presented here is based on the Castor library. More advanced facilities, built using the core parts described here, are provided in Castor but not covered in this paper.
[1] Chris Mellish,et al. Integrating Prolog in the POPLOG Environment , 1984, Implementations of Prolog.
[2] Michael Spivey,et al. Embedding PROLOG in HASKELL , 1999 .
[3] William E. Byrd,et al. The reasoned schemer , 2005 .
[5] Timothy A. Budd,et al. Multiparadigm programming in Leda , 1994 .
[6] Peter Van Roy. Logic Programming in Oz with Mozart , 1999, ICLP.
[7] David Abrahams,et al. C++ template metaprogramming , 2005 .