Skip to content

Commit

Permalink
add check for correct number of arguments to 'instance'
Browse files Browse the repository at this point in the history
  • Loading branch information
apease committed Nov 13, 2023
1 parent c61d912 commit 1ecdd1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/java/com/articulate/sigma/trans/SUMOtoTFAform.java
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,7 @@ private static String processOtherRelation(Formula f, Formula car,
type = newArgTypes.get(i);
if (car.getFormula().startsWith("instance")) {
if (Formula.isTerm(s) && i == 1) {
if (args.size() > 1 && builtInOrSubNumericType(args.get(2))) {
if (args.size() > 2 && builtInOrSubNumericType(args.get(2))) {
if (debug) System.out.println("SUMOtoTFAform.processOtherRelation(): found constant: " + s + " with type " + args.get(2));
numericConstantTypes.put(s, args.get(2));
}
Expand Down Expand Up @@ -2307,7 +2307,7 @@ public static String process(Formula f, boolean query) {
//if (debug) System.out.println("SUMOtoTFAform.process(): f so far: " + f);
varmap = fp.findAllTypeRestrictions(f, kb);
if (inconsistentVarTypes()) {
System.out.println("SUMOtoTFAform.process(): rejected inconsistent variables types: " + varmap + " in : " + f);
System.out.println("SUMOtoTFAform.process(): rejected inconsistent variable types: " + varmap + " in : " + f);
return "";
}
counter = 0;
Expand Down

0 comments on commit 1ecdd1c

Please sign in to comment.