Questions tagged [alloy]

Alloy from MIT is a declarative specification language for expressing complex structural constraints and behavior in a software system, and a tool for exploring and checking properties of the resulting structures.

Alloy from MIT is a declarative specification language for expressing complex structural constraints and behavior in a software system, and a tool for exploring and checking properties of the resulting structures.

The home page for Alloy is alloy.mit.edu.

Tutorials and documentation

  1. MIT Alloy tutorial page
  2. Official Alloy documentation

Reference books

  1. Software Abstraction by Daniel Jackson
594 questions
0
votes
1 answer

alloy specification problems

Below is a so-so alloy specification I completed recently for cellphone texting. It's just the basic texting requirements and since it's a practice, i don't have strict requirements to uphold. However, I have some awkward problems such why i can't…
mechanicum
  • 699
  • 3
  • 14
  • 25
0
votes
1 answer

alloy relation facts

Below is part of my work so far. I'm getting cycles and both ways connections in between my Lines and single connections from Messages to Lines for some reason. I don't see why there are never more than one message to line connections. My facts are…
mechanicum
  • 699
  • 3
  • 14
  • 25
0
votes
1 answer

Alloy: Int meaning of field

i saw the following Alloy definition: one sig Number { i:Int[3]} //what does Int[3] mean. I mean what is the meaning of the above field 'i'
TimeToCodeTheRoad
  • 7,032
  • 16
  • 57
  • 70
0
votes
1 answer

Why is this symmetry assertion wrong?

I am really confused over why there is always a counter example to my following assertion. //assertions must NEVER by wrong assert Symmetric{ all r: univ -> univ | some ~r iff (some x, y: univ | x not in y and y not in x and …
Qin Zhengquan
  • 467
  • 1
  • 8
  • 20
0
votes
1 answer

Understanding complicated signatures in alloy

in the below sig building{ abv: Man -> Man } { all m:Man | Above(m,m.abv) } What does the below mean? How is it related to the signature definition? Is this a relation for the sig? { all m:Man | Above(m,m.abv) }
Programmer
  • 6,565
  • 25
  • 78
  • 125
0
votes
1 answer

symmetry breaking predicates in Alloy

Say I have a simple model as follows: sig P{r:some P} sig Q{} run {} for 2 P, 2 Q Does anyone here know how alloy generates symmetry breaking predicates to reduce the number of instances for this model?
user1197891
  • 265
  • 1
  • 12
0
votes
1 answer

Multiplicity of set

Given the below definition: sig Name,Addr{} sig Book{ addr : Name -> some Addr} Let Name = { (J),(t), (b)} Addr = {(1), (2)} Book = {(bb0)} I was curious that in the relation addr : Name -> some Addr, what is the multiplicity of the Name in the…
Programmer
  • 6,565
  • 25
  • 78
  • 125
0
votes
2 answers

Understanding signatures in alloy

I read in the alloy website that a signature defines a set. Given this definition, I was trying to understand the below alloy code: enum dooroptype { unlocked, locked, opened} enum enginetype {on,off} enum motortype { ismoving, still} enum…
Programmer
  • 6,565
  • 25
  • 78
  • 125
0
votes
1 answer

alloy beginner's concept

I'm quite new to alloy and currently reading the tutorials at mit. I got a little stuck in the logic of things. A very basic thing i'm trying to do is below. a person can only do at most 1 task a task can be done at most by 1 person a person can…
mechanicum
  • 699
  • 3
  • 14
  • 25
0
votes
1 answer

Using my own API in Alloy

Just wondering about how can I use my own API in alloy? I've developed an API in alloy but i don't know how can I use it? regards Moody
Moody
  • 137
  • 1
  • 9
-1
votes
1 answer

Problem using JPype on Mac OS X: I try to start the JVM but I get a DLL not found, but it is there

My Python code is: import jpype jvm_path = "/Library/Java/JavaVirtualMachines/microsoft-11.jdk/Contents/Home/lib/jli/libjli.dylib" jpype.startJVM( jvm_path, classpath=['~/org.alloytools.alloy.dist.jar'], ) I get the following…
Rodrigo Stv
  • 405
  • 3
  • 11
-1
votes
1 answer

A predicate which holds for at most 2

I want to write a predicate which holds for at most two items. I tried doing one x,y: Object | However this did not give the desired result I then tried one x,y: Object | x != y However this gave no instances I was thinking of something along the…
BOB
  • 47
  • 6
-1
votes
1 answer

How to build the above model

I am a beginner in Alloy. I'm trying to model a math problem. I want to prove the theorem that the plane exists at least four lines, I use the below four axioms to prove the theorems. axiom 1: There exists at least one line; axiom 2: Every line…
YueXu
  • 1
  • 1
-1
votes
1 answer

Unreadable Text when starting Alloy Analyzer on Windows 7

I try to start Alloy Analyzer on Windows 7 Enterprise Service Pack 1 and get the folowing error D:\alloy>where java C:\ProgramData\Oracle\Java\javapath\java.exe C:\Windows\System32\java.exe D:\alloy>java -version java version "1.8.0_60" Java(TM)…
miracle173
  • 1,852
  • 16
  • 33
-1
votes
1 answer

Predefined Set in Alloy

I am trying to learn alloy spec. lang. . I can not find a way out about a question. My question is related with predefined number of elements. theater_seat set should have 4 members. Audience set should have 10 members. There is a theater which is 4…
1 2 3
39
40