Skip to content

Commit 4c16b42

Browse files
authored
Merge pull request #2 from MitsiCash/master
add SWI Prolog backend support
2 parents e258b11 + f469d06 commit 4c16b42

File tree

884 files changed

+3197
-387
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

884 files changed

+3197
-387
lines changed

PSOA2X/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>org.ruleml.psoa</groupId>
55
<artifactId>PSOA2X</artifactId>
6-
<version>1.3</version>
6+
<version>1.4</version>
77
<name>PSOA2X</name>
88
<properties>
99
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -84,7 +84,7 @@
8484
<dependency>
8585
<groupId>org.ruleml.psoa</groupId>
8686
<artifactId>PSOACore</artifactId>
87-
<version>1.3</version>
87+
<version>1.4</version>
8888
</dependency>
8989
</dependencies>
9090
</project>

PSOA2X/src/main/java/org/ruleml/psoa/psoa2x/psoa2prolog/AbstractPrologConverter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public abstract class AbstractPrologConverter extends PrologTermLangConverter {
1919
{
2020
// Taken from W3C RIF-DTB library
2121
s_builtInMap.put("http://www.w3.org/2007/rif-builtin-predicate#numeric-equal", "\'=:=\'");
22-
s_builtInMap.put("http://www.w3.org/2007/rif-builtin-predicate#numeric-not-equal", "\'=\\=\'");
22+
s_builtInMap.put("http://www.w3.org/2007/rif-builtin-predicate#numeric-not-equal", "\'=\\\\=\'");
2323
s_builtInMap.put("http://www.w3.org/2007/rif-builtin-predicate#numeric-greater-than", "\'>\'");
2424
s_builtInMap.put("http://www.w3.org/2007/rif-builtin-predicate#numeric-greater-than-or-equal", "\'>=\'");
2525
s_builtInMap.put("http://www.w3.org/2007/rif-builtin-predicate#numeric-less-than", "\'<\'");
@@ -58,12 +58,12 @@ public abstract class AbstractPrologConverter extends PrologTermLangConverter {
5858
s_builtInMap.put("https://www.iso.org/standard/21413.html#exp", "exp");
5959
s_builtInMap.put("https://www.iso.org/standard/21413.html#log", "log");
6060

61-
// Predicates
61+
// Predicates
6262
s_builtInMap.put("https://www.iso.org/standard/21413.html#integer", "integer"); // Test if integer
6363
s_builtInMap.put("https://www.iso.org/standard/21413.html#float", "float"); // Test if shortcut or xs:double float number (represented as double) [Currently redundant because of above same-named coerce]
6464
s_builtInMap.put("https://www.iso.org/standard/21413.html#number", "number"); // Test if number
6565
s_builtInMap.put("https://www.iso.org/standard/21413.html#eq", "\'=:=\'"); // XSB's special character tokens ...
66-
s_builtInMap.put("https://www.iso.org/standard/21413.html#not_eq", "\'=\\=\'"); //
66+
s_builtInMap.put("https://www.iso.org/standard/21413.html#not_eq", "\'=\\\\=\'"); //
6767
s_builtInMap.put("https://www.iso.org/standard/21413.html#greater_than", "\'>\'"); //
6868
s_builtInMap.put("https://www.iso.org/standard/21413.html#greater_than_or_eq", "\'>=\'"); //
6969
s_builtInMap.put("https://www.iso.org/standard/21413.html#less_than", "\'<\'"); //

PSOACore/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>org.ruleml.psoa</groupId>
55
<artifactId>PSOACore</artifactId>
6-
<version>1.3</version>
6+
<version>1.4</version>
77
<name>PSOACore</name>
88
<build>
99
<defaultGoal>install</defaultGoal>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
RuleML(
2+
Assert(
3+
% atomic-formula expressivity
4+
% 2 relationships
5+
% single tuple
6+
% dependent tuple
7+
% implicit tuple
8+
% 1 element
9+
% constant elements
10+
p(a)
11+
p(b)
12+
% '_p'('_a').
13+
% '_p'('_b').
14+
) )
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
?x=_a
2+
?x=_b
3+
?x=_c
4+
?x=_d
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
p(?x)
2+
% '_p'(Qx).
3+
% Correctness Criterion: query for the an implicit atom with query variable matching
4+
% both of two implicit atoms in a KB answers with both bindings.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
RuleML(
2+
Assert(
3+
% atomic-formula expressivity
4+
% pn1 (perspeneutral)
5+
% single tuple
6+
% independent tuple
7+
% 3 elements
8+
% constant elements
9+
p(-[a b c])
10+
% tupterm('_1','_a','_b','_c').
11+
% memterm('_1','_p').
12+
) )
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
?x=_a
2+
?x=_b
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
?x=_a ?y=_b ?z=_c
2+
?x=_c ?y=_b ?z=_a
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
?x=_1
2+
?x=_2

0 commit comments

Comments
 (0)