Skip to content

Commit

Permalink
remove optional universal quantifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
apease committed Feb 27, 2024
1 parent 4e11bfb commit 7cb3eb8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/java/com/articulate/sigma/trans/HOL.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ public static Formula handleHOLpred(Formula f, KB kb, Integer worldNum) {
StringBuffer fstring = new StringBuffer();
ArrayList<Formula> flist = f.complexArgumentsToArrayList(1);
worldNum = worldNum + 1;
fstring.append("(forall (?W" + worldNum + ") (=> (accreln s__" + f.car() + " " +
fstring.append("(=> (accreln " + f.car() + " " +
flist.get(0) + " ?W" + (worldNum - 1) + " ?W" + worldNum + ") ");
fstring.append(" " + processRecurse(flist.get(1),kb,worldNum));
fstring.append(")))");
fstring.append("))");
Formula result = new Formula();
result.read(fstring.toString());
return result;
Expand All @@ -58,10 +58,10 @@ public static Formula handleModalAttribute(Formula f, KB kb, Integer worldNum) {
StringBuffer fstring = new StringBuffer();
ArrayList<Formula> flist = f.complexArgumentsToArrayList(1);
worldNum = worldNum + 1;
fstring.append("(forall (?W" + worldNum + ") (=> (accreln s__modalAttribute " +
fstring.append("(=> (accreln modalAttribute " +
flist.get(1) + " ?W" + (worldNum - 1) + " ?W" + worldNum + ") ");
fstring.append(processRecurse(flist.get(0),kb,worldNum));
fstring.append(")))");
fstring.append("))");
Formula result = new Formula();
result.read(fstring.toString());
return result;
Expand Down Expand Up @@ -106,7 +106,7 @@ public static Formula processHigherOrder(Formula f, KB kb) {
// return f;
result = processRecurse(f,kb,worldNum);
String fstring = result.getFormula();
result.read("(forall (?W1) " + fstring + ")");
result.read(fstring);
return result;
}

Expand All @@ -122,7 +122,7 @@ public static void main(String[] args) {
" (not\n" +
" (modalAttribute ?FORMULA Permission)))";
Formula f = new Formula(fstr);
System.out.println(processHigherOrder(f,kb));
System.out.println(processHigherOrder(f,kb) + "\n\n");

fstr = "(=>\n" +
" (and\n" +
Expand Down

0 comments on commit 7cb3eb8

Please sign in to comment.