Re: [Flora-development] XSB and Flora-2 wrappers for .NET and Python
Brought to you by:
kifer
From: <ki...@cs...> - 2007-01-17 21:25:29
|
Hi Markus, It looks very promising. I think it is best if you could coordinate with Goncalo on the xsb.dll wrapper. >From what he described, it looks like he is using the same model as the Interprolog's Java interface, which is very convenient. Regarding Python, it all looks very interesting. I would like to see a more detailed description of how rules can be used from within Python. Unfortunately, I am Python-illiterate right now, but would like to learn. You probably know that we now have a high-level interface from Java to Flora where one can create Java proxy objects for Flora objects and then manipulate them from within Java through get/set style methods. This is far from seamless, so I would like to learn more on your design. Does your code work with Linux through Mono? best regards --michael > Dear Michael > > I'm fully dedicated to OpenSource and have allready added LGPL headers to= > > my source, so thats no problem. The wrapper is a .NET class library which= > > exports allmost all functions which are exported in xsb.dll (xsb_query,=20 > xsb_init, is_functor etc.). I have also included some examples for using=20 > the wrapper in VB.NET, C#.NET (using a simple Prolog program and a simple > > Flora-2 knowledge base). So it's just an export of the functions provided > > in xsb.dll (and since Flora-2 uses=20 > asserta(library_directory('C:\Flora2\dir')). and [flora2].=20 > bootrstrap_flora. I used xsb_command_string and xsb_query_string to load > Flora-2). So far for the .NET wrapper. The Python wrapper I'm now working > > on should make it more intuitive for Python programmers to use Flora-2 as > > a knowledge base engine (e.g. translation of Python objects directly into > Flora-2 F-molecules, using of queries and rules inside Python etc.) If you > want to take a look at the code be it for the .NET wrapper or for the > Python interface (done so far) just tell me where to send it :-) > > Best regards > > -- > Markus Schatten, dipl. inf. > e-mail: mar...@fo... > http://www.tiaktiv.hr > > > On Tue, 16 Jan 2007, Michael Kifer wrote: > > > > > Dear Markus, > > Thank you very much for the contribution. > > To be included in either XSB or Flora-2, your files have to be released > > under LGPL. > > > > I didn't quite understand what the wrapper around xsb.dll does. > > Is it exporting things like xsb_query to .NET languages > > (in this case it should be really part of XSB)? > > > > Or is it an object-oriented interface, which can talk to Flora-2 directly= > ? > > You alluded to this in connection with the Python wrapper, which is very > > interesting. > > > > > > =09regards > > =09 --michael > > > >> Dear sirs, > >> > >> my name is Markus Schatten, I'm an assistant on the Faculty of Organizat= > ion > >> and Informatics in Vara=C5=BEdin, Croatia in Databases and Formal Metho= > ds. One of > >> my professors (dr.sc. Mirko =C4?ubrilo) asked me to develop a XSB and F= > lora-2 > >> dll-wrapper for MS Visual Studio.NET, which I have developed using the > >> C-binding of XSB. I'm not a .NET professional so there are probably some= > bugs > >> in the solution, but it works fine, and since I'm not sure if I will hav= > e > >> time to develop it further I'd like to contribute it to your projects, o= > f > >> course if there is interest in such a contribution. > >> I've created a C# class which wraps around the xsb.dll and makes allmost= > all > >> functions exported in the dll available to all other .NET languages. I'v= > e > >> also implemented two methods for converting prolog terms to strings and > >> printing of terms (allmost direct translation of printpterm in cmain2.c)= > =2E > >> Since my primary programming language is Python I also created a wrapper= > for > >> Python (using SWIG http://www.swig.org) which could be used to wrap XSB = > and > >> Flora-2 to all the other scripting languages supported by SWIG. The Pyth= > on > >> wrapper is not fully implemented by now since I'd like to make the inter= > face > >> more intuitive to Python programmers and will probably try to combine th= > e > >> power of Flora-2 and ZODB (http://www.zope.org/Products/ZODB3.3). > >> So if there's any interest I'll be very happy if I can contribute to you= > r > >> projects. > >> > >> Best regards > >> > >> -- > >> Markus Schatten, dipl. inf. > >> Faculty of Organization and Informatics > >> Vara=C5=BEdin, Croatia > >> e-mail: mar...@fo... > >> http://www.foi.hr > >> > >> ------------------------------------------------------------------------= > - > >> Take Surveys. Earn Cash. Influence the Future of IT > >> Join SourceForge.net's Techsay panel and you'll get the chance to share = > your > >> opinions on IT & business topics through brief surveys - and earn cash > >> http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID= > =3DDEVDEV > >> _______________________________________________ > >> Flora-development mailing list > >> Flo...@li... > >> https://lists.sourceforge.net/lists/listinfo/flora-development |