I am still quite new to Alloy.
I wanted to use util/sequence, but I get a type error:
open util/sequence[Elem]
sig Elem {}
results in
A type error occurred:.(see the stacktrace.)
Name cannot be resolved; possible incorrect
function/predicate call; perhaps you used ( ) when you
should have used [ ]
This cannot be a correct call to pred sequence/add.
The parameters are
s: {sequence/Seq}
e: {this/Elem}
added: {sequence/Seq}
so the arguments cannot be
sequence/inds[s] (type = {sequence/SeqIdx})
Int[1] (type = {Int})
This cannot be a correct call to fun integer/add.
The parameters are
n1: {Int}
n2: {Int}
so the arguments cannot be
sequence/inds[s] (type = {sequence/SeqIdx})
Int[1] (type = {Int})
I think to fix it occurrences of expressions in util/sequence
like #s.inds.add[1]
would have to be changed to (#s.inds).add[1]
, but as I said I’m still new to Alloy…