Type error has occured : Translation capacity exceeded

一笑奈何 提交于 2019-12-02 02:21:57

问题


When I run my example i have the following type error :

Translation capacity exceeded.
In this scope, universe contains 21 atoms
and relations of arity 8 cannot be represented.
Visit http://alloy.mit.edu/ for advice on refactoring.

Is there any documentation how to solve it, I didn't found anything in the book.

Thanks.


回答1:


You can find the explanation in Section 5 in this paper

http://people.csail.mit.edu/aleks/website/papers/icse11-squander.pdf

Here is a quote from it

To represent a relation r of arity k, Kodkod allocates a matrix of size nk, where n is the number of atoms in the universe. For performance reasons, Kodkod uses a single sequential array indexed by a Java integer, and so the size of the matrix is limited to the largest integer values in Java (Integer.MAX_VALUE).

In your case, 218 (37822859361) is greater than Integer.MAX_VALUE (231-1 = 2147483647).



来源:https://stackoverflow.com/questions/21387155/type-error-has-occured-translation-capacity-exceeded

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!