0% found this document useful (0 votes)
18 views

Analyzing Problem Behaviour

Analyzing problem behaviour

Uploaded by

AhmAd GhAzi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Analyzing Problem Behaviour

Analyzing problem behaviour

Uploaded by

AhmAd GhAzi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Problem 1 (20 pts): Analyzing program behavior

The behavior of a program is expressed by the following temporal formula:


2 3
1. start ! ¬a _ ¬b
6 7
6 7
6 7
6 7
6 7
6 2. start ! c 7
6 7
6 7
6 7
6 7
6 2 7
6 3. b ^ c ! (d e) 7
6 7
6 7
6 7
6 7
6 7
6 4. a _ c ! (k R g) 7
6 7
6 7
6 7
6 7
6 7
6 5. (d _ e) ! 2 k 7
6 7
6 7
6 7
6 7
6 7
6 6. c ! (h U (e ^ g)) 7
6 7
6 7
26 7
6 7
6 3 7
6 7. (d ^ g ^ h) ! m 7
6 7
6 7
6 7
6 7
6 7
6 8. (m R h) 7
6 7
6 7
6 7
6 7
6 7
69. e ^ 2 (k ^ g) ! 2 m 7
6 7
6 7
6 7
6 7
6 7
6 10. (e ^ g) ! 3
c 7
6 7
6 7
6 7
6 7
6 7
6 11. k ^ m ! h 7
6 7
6 7
6 7
4 5
2 3
12. (e ^ k) ! b

3
1. (10 pts) Visualize all models of behavior.

2. (3 pts) Specify conditions (model of behavior), if any exist, under which the program
can terminate.

3. (7 pts) For the expressions below, indicate (true/false) whether there exists a model
where the expression holds. When true, cross reference your particular model:

4
PROPERTY TRUE/FALSE
(a ^ c) ! 32(g ^ h)

h U m

h U (k ^ g)

(b ^ c) ! 23(b ^ c)

(k ^ (k ^ g)) ! m

h S c

2
((g ^ h) ^ d) ! (g ^ h)

e Rh

The program has the following stability property:


32(b ^ c ^ h)

The program has the following recurrence property:


23(b ^ c ^ h)

(g ^ h) is an invariant property of the program.

There is a guarantee that (g ^ k ^ h)

The program has the following property:


(b ^ c ^ h) ! 3(b ^ c ^ h).

The program has the following precedence property:


(b ^ c ^ h) ! ((g ^ h) U b ^ c ^ h))

5
Problem 2 (20 pts) : Visualizing temporal expressions
2
1. 2( ! )

2. 2 !

3. ! 32

2
4. ( ^ )! 32!

2
5. 2(( ^ )! 32!)

6. ( ^ )!⌧ R

7. ( ^ )! (⌧ R )

8. ( ^ )! (x U ⌧ )

2
9. ( ^ 2 ) ! 3!

2
10. ( ^ )! 2!

6
4 What to submit
You must use LATEX to produce a pdf file named after the id of the person to submit, e.g.
123456.pdf.

Section S

Please submit on Moodle. Your instructor will provide you with more details.

Section U

Please submit your pdf file at the Electronic Assignment Submission portal
(https://fis.encs.concordia.ca/eas)
under Theory Assignment 3.

END OF ASSIGNMENT.

You might also like