Page 346 -
P. 346
342 M. Pesic et al.
(c) hcurse; bless; curse; bless; prayi
(d) hbless; become holyi
For each scenario, create an instance of the Religion model developed in the pre-
vious exercise. Try to execute these four scenarios using DECLARE. Which traces
were possible to execute and which were not? Describe why it was not possible to
execute some of the given scenarios.
Exercise 3. Launch one instance of the Religion model described in the first exer-
cise and monitor how states of the instance and constraints change while executing
tasks hbless; curse; bless; bless; curse; become holy; pray; curse; prayi.
Exercise 4. Launch one instance of the Religion model described in the first exer-
cise and execute tasks hbless, curse, bless, bless, curse, holy, pray, curse, prayi.Now
try to change the model of this instance in a way that:
The constraint specifying that one should pray at least once is removed, and
Task become holy is removed.
Did DECLARE accept this dynamic change? Explain why or why not.
Exercise 5. Launch one instance of the Religion model described in the first exer-
cise and execute tasks hbless, curse, bless, bless, curse, holy, pray, curse, prayi.
Now try to change the model of this instance in a way that a constraint specifying
that task become holy cannot be executed before task pray is added. Did DECLARE
accept this dynamic change? Explain why or why not.
Exercise 6. Develop a ConDec model in DECLARE for the process containing tasks
bless, pray, curse,and become holy, where three rules must be followed:
(a) One should become holy at least once.
(b) Every time one curses, one must eventually pray for forgiveness afterwards.
(c) Tasks become holy and curse cannot be both executed in the same instance.
Verify this model in DECLARE. Does this model have errors? Explain why or why
not.
Exercise 7. Develop a ConDec model in DECLARE for the process containing tasks
bless, pray, curse,and become holy, where four rules must be followed:
(a) One should become holy at least once.
(b) Every time one curses, one must eventually pray for forgiveness afterwards.
(c) Tasks become holy and curse cannot be both executed in the same instance.
(d) One should curse at least once.
Verify this model in DECLARE. Does this model have errors? Explain why or why
not.

