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
Alloy allows function/predicate calls like the following, as long as the type of the parameter and the type of the argument are not disjoint (which is the case here, since univ contains A):
sig A,B {}
pred p[a:A] {
a inuniv
}
run { no A andsome x: univ | p[x] }
The problem is that the resulting instance is inconsistent: it will have a B$0 for which p holds, even marked $x from skolemization (see screenshot). Even more confusing, if you ask the evaluator whether p[B$0] holds, it will gives a type error, even though it was the $x witness that made the run command consistent. However, if you ask p[x$0] it replies true, even though x$0 = B$0, because its type is univ.
This would be solved if calls to predicates tested the type of the argument during solving (in this case, a in A, which would exclude B atoms from passing it).
The text was updated successfully, but these errors were encountered:
Alloy allows function/predicate calls like the following, as long as the type of the parameter and the type of the argument are not disjoint (which is the case here, since
univ
containsA
):The problem is that the resulting instance is inconsistent: it will have a
B$0
for whichp
holds, even marked$x
from skolemization (see screenshot). Even more confusing, if you ask the evaluator whetherp[B$0]
holds, it will gives a type error, even though it was the$x
witness that made the run command consistent. However, if you askp[x$0]
it replies true, even thoughx$0
=B$0
, because its type isuniv
.This would be solved if calls to predicates tested the type of the argument during solving (in this case,
a in A
, which would excludeB
atoms from passing it).The text was updated successfully, but these errors were encountered: