Question: Consider the following partial Alloy model, then answer the following questions. abstract sig Person { } father: set Person, mother: set Person, children: set

Consider the following partial Alloy model, then answer the following questions. abstract 

Consider the following partial Alloy model, then answer the following questions. abstract sig Person { } father: set Person, mother: set Person, children: set Person sig Man extends Person { } wife: set Person sig Woman extends Person { } husband: set Person a) Write a constraint for the assertion "the father and children of a person are different" as an assert. b) Write a constraint for the assertion "a person doesn't have more than one father" as an assert. c) Write a constraint for the assertion "the father of a person is a man" as an assert. d) Write a constraint for the assertion "a person isn't his/her own descendant" as an assert. e) Write a constraint for the assertion "the mother of a person is his/her father's wife" as an assert.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!