Castor : Logic paradigm for C++
Traditional approach to problem solving with computers is all about instructing the computer exactly how to solve the problem. This is called the Imperative paradigm and is based on the Turing machine. Languages such as C, C++, Java, Fortran etc. are all rooted in this paradigm.
The Logic paradigm (LP) is a declarative programming model. Instead of instructing the computer how to solve a particular problem, we describe the problem domain as facts and rules. Using the problem domain description, the computer figures out how to solve specific problems within that domain. Once the domain has been described, many different problems within that domain can be solved without additional code. Describing the problem domain and the specific problems that need to be solved are tasks for a programmer.
Logic programming is one approach in computer science towards what is sometimes referred to as the Holy Grail of programming: "The user states the problem, the computer solves it".
Prolog is the best known programming language that supports logic programming. The computational model underlying LP is rooted in Predicate calculus. This is analogous to the Turing machine which is the computational model for the imperative paradigm.
Castor is a small pure C++, all header library. It seamlessly integrates LP with the other programming paradigms supported by C++ such as OOP, generic programming, imperative etc. Blending LP into C++ enables new designs and programming techniques that are not available to purely LP approaches or pure OO approaches, but only feasible within a multiparadigm blend. A key design goal of Castor is to smoothly and efficiently blend Logic into the rest of C++ with minimal syntactic overhead.
Castor 1.1 is now available. The primary focus of v1.1 is to enrich Castor's support for general purpose programming and enable query expressions. Here is comprehensive list of new features. See the video covering the new features. Castor is distributed under the MIT license. Send your questions, feedback and technical contributions to roshan AT mpprogramming DOT c o m.
Also available: Version 1.0 .
Castor 1.1 - New features (Part 2 of 2) : Brand new stuff. TLRs, Coroutines, Query Expressions and examples.
Introduction to LP in C++ (using Castor 1.0)
Past Talks :
| ::: Headlines ::: | |
|
NEW! Castor 1.1 Version 1.1 is now available for download. See details of what's new. |
|
|
NEW! Videos on 1.1 See the two part video tutorial covering the new features in 1.1 with examples. |
|
| Understand the concepts behind LP, how to represent them in C++ and how LP blends with the other paradigms in C++. | |
| Discuss issues, collaborate, consider improvements, share code etc. |