Castor is a pure C++ Library that introduces the Logic paradigm (LP)
into C++. Although LP has been well explored in Computer science, it
remains under utilized in main stream software development due to
lack of support in popular programming languages. Among the
few languages that do support it, Prolog is perhaps the most commonly
known.
Instead of attempting to embed a Logic interpreter or other heavy
weight engine into C++, Castor integrates LP using a few simple
library primitives. This unique approach not only allows a natural
and deep integration of declarative code into the language, but
also provides the flexibility of combining Logic with other paradigms
natively supported by C++ such as OOP, generics etc. STL concepts like
iterators,containers and streams can also be used in declarative code.
Castor is an open source library distributed under the MIT license
(http://www.opensource.org/licenses/mit-license.php). It relatively
small (under 5k LOC) and can be downloaded for free from
http://www.mpprogramming.com
For an introductory tutorial on LP and understanding its use in C++ refer
to
http://www.mpprogramming.om/resources/CastorTutorial.pdf
Feedback, comments and contributions are welcome.
-Roshan Naik