You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems that Forge throws errors when we use parens instead of brackets for function application. Need to either enforce that fun/pred definitions only use brackets or that parens/brackets are interchangeable in this sense. See https://piazza.com/class/k47gct456or1u6?cid=275
The text was updated successfully, but these errors were encountered:
Looking at the Piazza thread for this, I believe the issue was that students were trying to use syntax like p(a) instead of p[a]. While the situation has improved, the errors could be better. Here are two examples:
#lang forge
sig A {}
pred p[a: A] {}
test expect { {some x: A | p(x)} is sat }
produces: x: unbound identifier at the use of x.
#lang forge
sig A {}
pred p[a: A] {}
test expect { {some x: A | {p(x)}} is sat }
produces: Element 1 of this block was an ill-formed predicate or helper function call. Check that the number of arguments given matches the declaration.
The latter indicates that, when enclosed in braces, Forge detects that predicate p is being used incorrectly. (Under the hood, >0-ary p is a Racket procedure. )
Seems that Forge throws errors when we use parens instead of brackets for function application. Need to either enforce that fun/pred definitions only use brackets or that parens/brackets are interchangeable in this sense. See https://piazza.com/class/k47gct456or1u6?cid=275
The text was updated successfully, but these errors were encountered: