2

I made a program which allows to build instances conforming to a certain model and allowing to save those in an xml file following the Alloy standards.

To get the A4Solution objects corresponding to those instances, I then read those xml files using the A4SolutionReader.read method. This worked great, until I stumbled upon a rather big instances, which, when read, causes the following Exception:

Caused by: kodkod.engine.CapacityExceededException: Arity too large (4) for a universe of size 880

I would understand that the analyser would complain when performing an analysis with a huge scope, but here the instance is already provided, so what justifies this exception? and is there another way to get an A4Solution object from my xml file without having this issue ?

C. M. Sperberg-McQueen
  • 24,596
  • 5
  • 38
  • 65
Loïc Gammaitoni
  • 4,173
  • 16
  • 39
  • 1
    Not an answer, alas, but just a comment. The message 'arity too large' sometimes arises in cases where I don't think of myself as having defined any relation, let alone one of high arity. [Sometimes](http://stackoverflow.com/questions/22886819/refactoring-alloy-models) reformulating the quantifiers helps; I wish I understood better why, how, and when. – C. M. Sperberg-McQueen Feb 29 '16 at 18:05
  • Thanks for the fast comment, in my case I can't make such refactoring, as this arity comes from a field of the from f: A -> B -> C . I unfortunately can't do without it :/ – Loïc Gammaitoni Mar 01 '16 at 08:50
  • Can you reduce the code to a small test case that exhibits this error? – ivcha Apr 05 '16 at 19:10
  • not really, as the problem come from the excessive size of the A4Solution I try to parse using the Alloy API – Loïc Gammaitoni Apr 06 '16 at 13:08

0 Answers0