Grokbase Groups Perl ai February 2005

--- Salvador Fandiño wrote:
I have uploaded to CPAN version 0.07 of Language::Prolog::Yaswi,
an interface to SWI-Prolog.

I have also released DBD::Yaswi, an experimental DBI interface to
SWI-Prolog. I am not completely sure if this module is a real
improvement over the raw Language::Prolog::Yaswi... well,
comments are welcome!!!
Hi Salvador,

It's great to see stuff happening with this again!

When I first tried to isntall DBD::Yaswi, I got:

ok 1 - use DBI;
install_driver(Yaswi) failed: Can't locate DBD/
in @INC (@INC contains:
Perhaps the DBD::Yaswi perl module hasn't been fully
installed, or perhaps the capitalisation of 'Yaswi' isn't
Available drivers: DBM, ExampleP, File, Pg, Proxy, SQLite, Sponge.
at t/1.t line 6

I just did a force install to see what would happen and I reran the

ok 1 - use DBI;
install_driver(Yaswi) failed: syntax error at
/usr/local/lib/perl5/site_perl/5.8.6/DBD/ line 134,
near "Vs qw(Q M N V B)"
BEGIN not safe after errors--compilation aborted at
/usr/local/lib/perl5/site_perl/5.8.6/DBD/ line 194.
Compilation failed in require at (eval 2) line 3.

At line 134, deleting the "Vs" from it makes the DBD load:

my @vs = Vs qw(Q M N V B);

But a few lines later we get 'can''t call method "length" on unblessed

$sth->STORE(NUM_OF_PARAMS => $marks->length);

That's when I stopped.

Also, from the docs, it's not clear how to build a database or issue
queries against it. So let's say I want to find all X and Y that
satisfy append/3, would I do something like this?

my $dbh = DBI->connect('dbi:Yaswi:user');
my $sth = $dbh->prepare(<<'END_PROLOG');
find [X,Y] where Z=[a,b,c,d], \
append([],X,X). \
append([W|X],Y,[W|Z]) :- append(X,Y,Z).

From your docs and the tests, that doesn't seem right.

Can I load a pre-existing prolog program, call assert, retract, etc?

As for the new Language::Prolog::Yaswi, it installed and ran just fine.
I even had a little sample program of my own that seemed to work.

Now to see if it can run on OS X.


If this message is a response to a question on a mailing list, please send
follow up questions to the list.

Web Programming with Perl --

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 4 | next ›
Discussion Overview
groupai @
postedFeb 22, '05 at 4:16p
activeMar 16, '05 at 1:06p

2 users in discussion

Salvador Fandiño: 3 posts Ovid: 1 post



site design / logo © 2021 Grokbase