File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
dartagnan/src/main/java/com/dat3m/dartagnan/parsers/cat Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -171,7 +171,8 @@ public Void visitLetRecDefinition(LetRecDefinitionContext ctx) {
171171 }
172172 // Create the recursive relations.
173173 for (int i = 0 ; i < recSize ; i ++) {
174- final Relation .Arity arity = rhsContexts [i ].accept (new ArityInspector ());
174+ final Relation .Arity probedArity = rhsContexts [i ].accept (new ArityInspector ());
175+ final Relation .Arity arity = probedArity != null ? probedArity : Relation .Arity .BINARY ;
175176 recursiveGroup [i ] = wmm .newRelation (createUniqueName (lhsNames [i ]), arity );
176177 recursiveGroup [i ].setRecursive ();
177178 namespace .put (lhsNames [i ], recursiveGroup [i ]);
@@ -414,6 +415,11 @@ private final class ArityInspector extends CatBaseVisitor<Relation.Arity> {
414415
415416 private ArityInspector () {}
416417
418+ @ Override
419+ public Relation .Arity visitExpr (ExprContext c ) {
420+ return c .e .accept (this );
421+ }
422+
417423 @ Override
418424 public Relation .Arity visitExprBasic (ExprBasicContext c ) {
419425 final Object object = namespace .get (c .n .getText ());
You can’t perform that action at this time.
0 commit comments