I have a piece of code in ALLOY I am trying to do a restaurant reservation system and I have this sig and relation between them.
abstract sig Table{
breakfast: one breakFast,
lunch: one Lunch,
dinner: one Dinner
}
sig Free{
}
sig Reserved{
}
sig breakFast {
breakfastfree:one Free,
breakfastReserved:one Reserved
}
sig Lunch {
Lunchfree:one Free,
LunchReserved:one Reserved
}
sig Dinner {
Dinnerfree:one Free,
DinnertReserved:one Reserved
}
fact{
all t1,t2 : Table | t1 != t2 => t1.breakfast != t2.breakfast
all t1,t2 : Table | t1 != t2 => t1.lunch != t2.lunch
all t1,t2 : Table | t1 != t2 => t1.dinner != t2.dinner
}
pred RealismConstraints []{
#Table = 4
}
run RealismConstraints for 20
I want to put a fact that for breakfast it can be reserved or free NOT BOTH and in lunch and dinner the same thing any ideas?