473,621 Members | 2,743 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Support for the Logic paradigm in C++ (with Castor)

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

allows a natural and deep integration of declarative code into the language,
and

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 is 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/resource...orTutorial.pdf

Feedback, comments and contributions are welcome.
Feb 11 '08 #1
2 3117

"Roshan Naik" <na******@gmail .comha scritto nel messaggio
news:fo******** **@usenet01.boi .hp.com...
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

allows a natural and deep integration of declarative code into the
language, and

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 is 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/resource...orTutorial.pdf

Feedback, comments and contributions are welcome.

Hi Roshan.
Your work is very interesting.
Currently i'd like to approach the same problem from the easier C#.
Do you benchmarked your system (something like tak, nrev or similar)?
Bye Carlo
Feb 13 '08 #2
>
Hi Roshan.
Your work is very interesting.
Currently i'd like to approach the same problem from the easier C#.
My (not very dedicated) attempts have gone nowehere due to the simplistic
generics and operator overloading support in C#.
On the bright side, C# has direct support for coroutines... one of the two
key
techniques (the other being type erasure) that makes Castor possible.
Do you benchmarked your system (something like tak, nrev or similar)?
Limited resources have not allowed me to pursue benchmarking.

-Roshan
Feb 14 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3048
by: Casper B | last post by:
The www.castor.org project seems to be gone. I loved this XML-Java binding framework and I am wondering if anyone are aware of what has happened to it?! Thanks, Casper
1
2612
by: Przemyslaw Wegrzyn | last post by:
Hi! I'm quite new to Python. Is there anything like Castor or JAXB available for Python ? All I have found is generateDS.py, but it seems to be very limited and a bit buggy - it seems to be sensitive to the order in which I declare elements in my XML Schema file. In my upcoming project I need a robust XML support, and I wanted to give Python a try, unfortunately I'll probably have to switch back to Java for this project :(
1
1604
by: James Turner | last post by:
I'm looking for a tool like castor or JABX (ie that can create objects from an XSD schema), except I need it to create visual basic objects. I've seen a few tools that create C++ code, and I could use them at a push but I'd rather use VB. Cheers James
0
1400
by: George Palmer | last post by:
Hi, I'm writing an xml file using Castor. It looks something like this: <a> .... </a> <b> .... </b>
0
2712
by: Stacey | last post by:
I hate to start the email with the "I'm new to this clause", but there it is. I am understanding how the xsd files work and how the castor SourceGenerator works. What I am not understanding is how the binding of a complexType to another package in java works. Basically I have in my .xsd file: <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> .. ..
1
2062
by: madhununna | last post by:
I'm trying to parse string data using castor and it looks like the new lines are getting lost. I'm using castor 0.9.4.3 For example: Input <INPUT> First line
0
1591
by: Chris | last post by:
I am using Castor to marshal and unmharshal some objects. I have an object that has a List of strings. I can marshal it without using a mapping file. However, when I try to unmarshal it without using a mapping file, I get an error that the list elements occur more than once. If I use a mapping file and indicate that the data member is a collection, it unmarshals without error. My question is:
0
1456
by: manas589 | last post by:
Hi Can any one tell me how to use binding.xml while generating castor bean from an xsd file. i have one xsd file where two element are conflicting. so i thought to use binding file while generating castor bean. i have created my binding.xml file. but i don't know how to use this binding.xml file while creating beans. is it required to put the binding.xml file in classpath or where can i mentioned the path of this file so that while...
1
1669
by: Bruintje Beer | last post by:
Hi, Is there a C++ alternative for the Java Castor Project (Java thirdparty tool to create xml files from Java Objects and vice versa) John
0
8653
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8597
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8306
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8457
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6101
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5554
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4150
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2587
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1763
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.