Skip to content

Commit a41edff

Browse files
authored
Merge pull request #9 from mthom/ground_fact_differentiated_embedded_objectification
add normalization step of embedded undifferentiated/ground-fact-differentiated objectification
2 parents 67144a1 + 2903cae commit a41edff

File tree

89 files changed

+1079
-141
lines changed

Some content is hidden

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

89 files changed

+1079
-141
lines changed

PSOA2X/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<plugin>
1515
<groupId>org.antlr</groupId>
1616
<artifactId>antlr3-maven-plugin</artifactId>
17-
<version>3.4</version>
17+
<version>3.5.2</version>
1818
<executions>
1919
<execution>
2020
<goals>
@@ -72,7 +72,7 @@
7272
<dependency>
7373
<groupId>org.antlr</groupId>
7474
<artifactId>antlr-runtime</artifactId>
75-
<version>3.4</version>
75+
<version>3.5.2</version>
7676
<type>jar</type>
7777
<scope>compile</scope>
7878
</dependency>
Lines changed: 62 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,62 @@
1-
T__59=59
2-
T__60=60
3-
T__61=61
4-
ALPHA=4
5-
AND=5
6-
BASE=6
7-
COMMENT=7
8-
DEPSIGN=8
9-
DIGIT=9
10-
DOCUMENT=10
11-
ECHAR=11
12-
EOL=12
13-
EQUAL=13
14-
EXISTS=14
15-
EXTERNAL=15
16-
FALSITY=16
17-
FORALL=17
18-
GREATER=18
19-
GROUP=19
20-
HEX=20
21-
IMPLICATION=21
22-
IMPORT=22
23-
INSTANCE=23
24-
IRI=24
25-
IRI_REF=25
26-
IRI_REF_CHARACTERS=26
27-
LESS=27
28-
LITERAL=28
29-
LOCAL=29
30-
LPAR=30
31-
LSQBR=31
32-
MULTI_LINE_COMMENT=32
33-
NAF=33
34-
NAMESPACE=34
35-
NUMBER=35
36-
OR=36
37-
PERCENT=37
38-
PLX=38
39-
PN_CHARS=39
40-
PN_CHARS_BASE=40
41-
PN_CHARS_U=41
42-
PN_LOCAL=42
43-
PN_LOCAL_ESC=43
44-
PN_PREFIX=44
45-
PREFIX=45
46-
PSOA=46
47-
RPAR=47
48-
RSQBR=48
49-
SHORTCONST=49
50-
SLOT=50
51-
SLOT_ARROW=51
52-
STRING=52
53-
SUBCLASS=53
54-
SYMSPACE_OPER=54
55-
TOP=55
56-
TUPLE=56
57-
VAR_ID=57
58-
WHITESPACE=58
59-
'@'=59
60-
'no'=60
61-
'yes'=61
1+
T__60=60
2+
T__61=61
3+
T__62=62
4+
ALPHA=4
5+
AND=5
6+
BASE=6
7+
COMMENT=7
8+
DEPSIGN=8
9+
DIGIT=9
10+
DOCUMENT=10
11+
ECHAR=11
12+
EOL=12
13+
EQUAL=13
14+
EXISTS=14
15+
EXTERNAL=15
16+
FALSITY=16
17+
FORALL=17
18+
GREATER=18
19+
GROUP=19
20+
HEX=20
21+
IMPLICATION=21
22+
IMPORT=22
23+
INSTANCE=23
24+
IRI=24
25+
IRI_REF=25
26+
IRI_REF_CHAR=26
27+
LESS=27
28+
LITERAL=28
29+
LOCAL=29
30+
LPAR=30
31+
LSQBR=31
32+
MULTI_LINE_COMMENT=32
33+
NAF=33
34+
NAMESPACE=34
35+
NUMBER=35
36+
OIDLESSEMBATOM=36
37+
OR=37
38+
PERCENT=38
39+
PLX=39
40+
PN_CHARS=40
41+
PN_CHARS_BASE=41
42+
PN_CHARS_U=42
43+
PN_LOCAL=43
44+
PN_LOCAL_ESC=44
45+
PN_PREFIX=45
46+
PREFIX=46
47+
PSOA=47
48+
RPAR=48
49+
RSQBR=49
50+
SHORTCONST=50
51+
SLOT=51
52+
SLOT_ARROW=52
53+
STRING=53
54+
SUBCLASS=54
55+
SYMSPACE_OPER=55
56+
TOP=56
57+
TUPLE=57
58+
VAR_ID=58
59+
WHITESPACE=59
60+
'@'=60
61+
'no'=61
62+
'yes'=62

PSOA2X/src/main/java/org/ruleml/psoa/psoa2x/common/Translator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,4 @@ public Map<String, String> getQueryVarMap()
8282
public List<String> getQueryVars() {
8383
return new ArrayList<String>(m_queryVarMap.keySet());
8484
}
85-
}
85+
}

PSOACore/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<plugin>
1212
<groupId>org.antlr</groupId>
1313
<artifactId>antlr3-maven-plugin</artifactId>
14-
<version>3.4</version>
14+
<version>3.5.2</version>
1515
<executions>
1616
<execution>
1717
<goals>
@@ -68,7 +68,7 @@
6868
<dependency>
6969
<groupId>org.antlr</groupId>
7070
<artifactId>antlr-runtime</artifactId>
71-
<version>3.4</version>
71+
<version>3.5.2</version>
7272
<type>jar</type>
7373
<scope>compile</scope>
7474
</dependency>

PSOACore/src/main/antlr3/org/ruleml/psoa/TreeWalkerTemplate.g

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ external
114114
115115
psoa
116116
: ^(PSOA term? ^(INSTANCE term) tuple* slot*)
117+
| ^(OIDLESSEMBATOM ^(INSTANCE term) tuple* slot*)
117118
;
118119
119120
tuple

PSOACore/src/main/antlr3/org/ruleml/psoa/analyzer/KBInfoCollector.g

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,14 @@ psoa[boolean isAtomicFormula]
237237
if (isAtomicFormula)
238238
addPsoaTermInfo($pred.tree.toStringTree(), arities, oid != null, hasIndepTuple, hasMultiTuple, hasSlot);
239239
}
240+
| ^(OIDLESSEMBATOM ^(INSTANCE term)
241+
((t=tuple { arities.add($t.length); hasIndepTuple = !$t.dep; })
242+
(t=tuple { arities.add($t.length); if (!$t.dep) hasIndepTuple = true; hasMultiTuple = true; } )*)?
243+
(slot { hasSlot = true; })*)
244+
{
245+
if (isAtomicFormula)
246+
addPsoaTermInfo($pred.tree.toStringTree(), arities, false, hasIndepTuple, hasMultiTuple, hasSlot);
247+
}
240248
;
241249

242250
tuple returns [int length, boolean dep]

PSOACore/src/main/antlr3/org/ruleml/psoa/analyzer/SchemalessChecker.g

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,8 @@ external
208208
;
209209

210210
psoa
211-
: ^(PSOA term? ^(INSTANCE term) tuple* (slots+=slot)*)
211+
: ^(OIDLESSEMBATOM ^(INSTANCE term) tuple* slot*)
212+
| ^(PSOA term? ^(INSTANCE term) tuple* (slots+=slot)*)
212213
;
213214

214215
tuple

0 commit comments

Comments
 (0)