alloy

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

Type error has occured : Translation capacity exceeded

和自甴很熟 提交于 2019-12-02 00:35:59
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. 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 n k , where n is the number of atoms in the universe. For

Provide Alloy with a “pool” of custom Strings

久未见 提交于 2019-12-01 22:08:47
I'm interested in using the String type of Alloy, (especially due to the fact it allows the use of special character). I noticed that in order to add a given String to an instance, it is sufficient to include it in an expression. e.g. fact stringInsert{ none!="a"+"b"+"c" } will lead to the creation of atoms "a","b" and "c" in any generated instances. Now my question is, is there a way to declare a pool of strings,defining all possible string atoms that might occur in satisfiable instances, BUT whose number respect the scope given and can be further constrained ? As an example, if we consider

Alloy - Generate .xml instance from .als

末鹿安然 提交于 2019-12-01 21:32:17
问题 I need to generate random .xml instances from an .als in my program. I managed to do that by running alloy in background (invisible JFrame) and calling the doOpen, doExecuteLatest and doShowLatest functions. But having to wait alloy to start every time I run my code is a pain. I think it would be more efficient if I simply used the alloy code section that does this procedure (I imagine that would be kodkod). Does anyone know how to do that? I found alloy's code to be pretty confusing... 回答1:

Alloy - Generate .xml instance from .als

僤鯓⒐⒋嵵緔 提交于 2019-12-01 19:42:57
I need to generate random .xml instances from an .als in my program. I managed to do that by running alloy in background (invisible JFrame) and calling the doOpen, doExecuteLatest and doShowLatest functions. But having to wait alloy to start every time I run my code is a pain. I think it would be more efficient if I simply used the alloy code section that does this procedure (I imagine that would be kodkod). Does anyone know how to do that? I found alloy's code to be pretty confusing... You can use the Alloy API. Generating an instance and writing it as an XML file can be easily done following

Alloy - Can't find unsat core

折月煮酒 提交于 2019-11-29 16:56:39
I have a "No instance found" Alloy file, and would like to debug it. The docs say to go to Options and choose SAT Solver > unsat-core. Yet, I don't see that, only SAT4J. I'm running the latest Alloy 4.2, just downloaded. When I ran it, there was a note about not supporting JNI. If I need to download a different configuration to see unsat core, please tell me how to do it. Otherwise, how do I debug the Alloy file? That was the latest stable. I also just tried the latest experimental and had similar (not identical) results. Note this warning, though: Alloy Analyzer 4.2_2015-02-22 (build date:

going through an A4Solution

こ雲淡風輕ζ 提交于 2019-11-29 08:25:33
I am currently using the Alloy api in my project, and I need to display A4Solutions.I can do that easily with the vizualiser Alloy provides (vizGUI) , but it is a bit too limited for my purpose. So I am willing to generate my own graphs ( using any other graph api ) from an A4Solution objects. I was able to get the Atoms without any problems (that was pretty straight forward ) but I can't really see how to retrieve the relations between those atoms. I looked online for some example about how to parse an A4Solution, but found nothing unfortunately. Relations, or fields, you can retrieve from

Alloy - Can't find unsat core

末鹿安然 提交于 2019-11-28 10:52:33
问题 I have a "No instance found" Alloy file, and would like to debug it. The docs say to go to Options and choose SAT Solver > unsat-core. Yet, I don't see that, only SAT4J. I'm running the latest Alloy 4.2, just downloaded. When I ran it, there was a note about not supporting JNI. If I need to download a different configuration to see unsat core, please tell me how to do it. Otherwise, how do I debug the Alloy file? That was the latest stable. I also just tried the latest experimental and had

Refactoring Alloy models

回眸只為那壹抹淺笑 提交于 2019-11-28 02:10:52
In a model I started to sketch in Alloy the other day, I get the following message when I attempt to find an instance of a particular predicate: Translation capacity exceeded. In this scope, universe contains 34 atoms and relations of arity 12 cannot be represented. Visit http://alloy.mit.edu/ for advice on refactoring. Any suggestions of where on the site alloy.mit.edu to look? I'm not finding anything with an obvious label like "Refactoring models that exceed translation capacity". That's the essential question. [Postscript: the cause of my problem appears to have been a bad initial

going through an A4Solution

自古美人都是妖i 提交于 2019-11-28 01:48:16
问题 I am currently using the Alloy api in my project, and I need to display A4Solutions.I can do that easily with the vizualiser Alloy provides (vizGUI) , but it is a bit too limited for my purpose. So I am willing to generate my own graphs ( using any other graph api ) from an A4Solution objects. I was able to get the Atoms without any problems (that was pretty straight forward ) but I can't really see how to retrieve the relations between those atoms. I looked online for some example about how