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
UnsupportedOperationException is thrown when executing the following Alloy specification: sig A { id: Int } pred P1 [p : set A] { one a: p | a.id = 1 } pred P2[p : set A] { P1[ { x : p | x.id > 0 } ] } run { some a : set A | P2[a] }
If one is replaced by lone then the exception is also thrown.
If one is replaced by no/some/all then no exception is thrown.
To Reproduce
Expected behavior
Screenshots
Desktop (please complete the following information):
Smartphone (please complete the following information):
The Java exception is fixed in master. However there is still a problem with this alloy model. There is a comprehension expression in predicate P2 with one free variable p. This forces the translator to universally quantify over sets of uninterpreted infinite type. CVC4 does not have strong support for quantification over sets of infinite type. It returns unknown answer for the following:
For the given alloy model, the comprehension in P2 can be avoided in several ways. One way is to introduce an auxiliary field to signature A as follows:
sig A { id: Int, g: Int }
fact
{
-- g is the same as id except non positive values
all x: A, y: Int |
(x-> y in id and y > 0) <=> (x->y in g)
}
pred P1 [p : set A]
{
all a: p | a.id = 1
}
pred P2[p : set A] {
P1[ p &(g.Int) ]
}
run {
some a : set A | #a >= 2 and P2[a]
}
Describe the bug
UnsupportedOperationException
is thrown when executing the following Alloy specification:sig A { id: Int }
pred P1 [p : set A]
{
one a: p | a.id = 1
}
pred P2[p : set A] {
P1[ { x : p | x.id > 0 } ]
}
run {
some a : set A | P2[a]
}
If
one
is replaced bylone
then the exception is also thrown.If
one
is replaced byno
/some
/all
then no exception is thrown.To Reproduce
Expected behavior
Screenshots
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Issue copied from philippemerle#5
The text was updated successfully, but these errors were encountered: