Segmentation fault when using numbers in clauses

42 views
Skip to first unread message

didac.b...@gmail.com

unread,
Feb 25, 2013, 5:39:11 AM2/25/13
to pys...@googlegroups.com
Hi,

I'm new to pyswip (as well as in Prolog) and I'm having problems with using numbers in the clauses. 

Example:

from pyswip import Prolog
p = Prolog()
p.assertz("fact(a)")
p.assertz("fact(b)")
print list(p.query("fact(X)"))

This works fine, and it outputs, as expected:

[{'X': 'a'}, {'X': 'b'}]

However, if I add:

p.assertz("fact(3)")
print list(p.query("fact(X)"))

I then get a "Segmentation fault: 11"

Any idea of what is happening? Can I use numbers in clauses?
Reply all
Reply to author
Forward
0 new messages