Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,13 @@ public void getDanglingAtoms(Rule query, double minCardinality, Collection<Rule>
// Pruning by maximum length for the \mathcal{O}_D operator.
if(query.getRealLength() == this.maxDepth - 1) {
if (this.exploitMaxLengthOption) {
if(!query.getOpenVariables().isEmpty()
&& !this.allowConstants
&& !this.enforceConstants) {
if (query.getOpenVariables().size() > 1) {
// There will be more than 2 open variables and we will not be able to close all of them.
return;
}

if (!canAddInstantiatedAtoms()) {
// We can't count on instantiation operator to close the new dangling variable.
return;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,13 @@ public void getDanglingAtoms(Rule rule, double minSupportThreshold, Collection<R

if (exploitMaxLengthOption) {
if(rule.getRealLength() == maxDepth - 1){
if(!rule.getOpenVariables().isEmpty() && !allowConstants){
if (rule.getOpenVariables().size() > 1) {
// There will be more than 2 open variables and we will not be able to close all of them.
return;
}

if (!canAddInstantiatedAtoms()) {
// We can't count on instantiation operator to close the new dangling variable.
return;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,13 @@ public void getDanglingAtoms(Rule query, double minCardinality, Collection<Rule>
//General case
if(query.getLength() == maxDepth - 1) {
if (this.exploitMaxLengthOption) {
if(!openVariables.isEmpty()
&& !this.allowConstants
&& !this.enforceConstants) {
if (query.getOpenVariables().size() > 1) {
// There will be more than 2 open variables and we will not be able to close all of them.
return;
}

if (!canAddInstantiatedAtoms()) {
// We can't count on instantiation operator to close the new dangling variable.
return;
}
}
Expand Down