Skip to content
#

logic-programming

Here are 607 public repositories matching this topic...

oso
RAbraham
RAbraham commented Jul 25, 2021

Hi,

%%logica Engineers

@Engine("sqlite");

Employee(name: "Alice", role: "Product Manager");
Employee(name: "Bob", role: "Engineer");
Employee(name: "Caroline", role: "Engineer");
Employee(name: "David", role: "Data Scientist");
Employee(name: "Eve", role: "Data Scientist");

Engineers(..r) :- Employee(..r), r.role == "Engineer";  # <====== This fails
# Engineers(name:, role:) :-
fpopineau
fpopineau commented Jul 29, 2020

Hi there,

Thanks for this amazing module.

I think there is a problem with the way terms are printed.
I run some Prolog code from Python, querying Prolog with:

H = pyswip.Variable()
induce = pyswip.Functor('induce', 1)
q = Query(induce(H))
q.nextSolution()
print(H.value)

I get a result like this for H:

[Functor(319757,2,
 [Functor(9048461,3,_10560234,_10560236,_1056023

Improve this page

Add a description, image, and links to the logic-programming topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the logic-programming topic, visit your repo's landing page and select "manage topics."

Learn more