Example for reading prolog file, adding a clause and unifying #7
-
I am looking for an example of how to
In details, let say I have a script increment(A, B) :-
diff(C),
B is A + C. Then I'd like to enhance it on Java side Struct.of("diff", Integer.of(15)); and then run Struct.of("increment", Atom.of(15), Integer.of("X"));
... something that the returns the value of X as an int |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 14 replies
-
Hello @vasily-kartashov , |
Beta Was this translation helpful? Give feedback.
-
@gciatto-unibo I'll make the whole project publicly available at one point, which will make referencing the issues much simpler. On an unrelated note. You've mentioned that |
Beta Was this translation helpful? Give feedback.
-
@vasily-kartashov I've exemplified how primitives can be written in Java: The example relies on version |
Beta Was this translation helpful? Give feedback.
@vasily-kartashov I've exemplified how primitives can be written in Java:
https://github.com/tuProlog/2p-kt/blob/master/examples/src/test/java/it/unibo/tuprolog/examples/PrimitiveExamplesJvm.java
The example relies on version
0.18.0
which should be publicly available in a few hours.