Re: DLL interface for Lua & C++
Carlo Capelli <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <CABty9wzE4P8=caK3rT_LZLWT475XhAq+z7MqOnJU_0SnzUWwjw@mail.gmail.com> |
Hi Phil As an alternative to assert/retract, where you need to pass terms among threads, there is the recorded database<http://www.swi-prolog.org/pldoc/man?section=foreign-recorded> . HTH Carlo 2013/8/29 Philipp Kraus <[email protected]> > Hello, > > I have worked with SWIProlog for some years ago and I would like to use it > for an own project. The project based on C++ (also C and a little bit > Fortran) and Lua. > I have created objects in Lua which should store Prolog information > (atoms, etc). I would like to use Prologs planning and expert system. Each > Lua object is mapped > to it own C++ object and it stores its own dataset. This system is scaled > over different CPU cores (at the moment 32) with MPI. Each object can be > moved from one to another core. > > So I would like to create Prolog calls in Lua. I have found the C++ API > reference to SWIProlog, so I can create a SWIProlog instance on my C++ side > and so I can mapped the reference > to Lua (Lua is written in C). My Lua objects stores the, data which should > be used by Prolog, but the data can be modified many times and the dataset > is small. So can I handle the > dynamic dataset with SWIProlog in a fast way? I know only the retract / > consult command, but I think this is very slow. I have got more than 10^6 > Lua objects with own datasets and each > object call Prolog. > > So do you have got some useful ideas to create a structure with Lua, C++ > and SWIProlog in a fast way? > > Thanks a lot > > Phil > _______________________________________________ > SWI-Prolog mailing list > [email protected] > https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog > -------------- next part -------------- HTML attachment scrubbed and removed