Ask Computer Engineering Expert

The learning outcomes that are assessed by this coursework are:

1 Reason with a document written in a formal specification language

2 Use a formal notation to develop, analyse and critically review a (small-scale) system specification

3 Animate a specification using an appropriate practical tool and discuss the results

Exercise - Assessment Indicators:
- Clear English
- Correctness
- Conciseness
Give an English description of the interval that corresponds to each of the following Tempura formulae
a)
define test1() = {
exists I : {
len (7) and I = -2 and
chopstar (skip and I := I + 4) and always output (I)

}
}:

b)

define test2() = {
exists A; I; S : {
list (A; 6) and stable (struct (A)) and A = [2; 1; 4; 3; 6; 5] and stable (A) and I = 3 and I gets (I + 1) mod |A| and

always {output I} and len (|A|) and fin output S and
S = 1 and S gets S ∗ A[I]
}
}:

Exercise 2 Assessment Indicators:
- Correctness
- Elegance (clarity and conciseness)
Give for each of the following intervals the corresponding Tempura formula. Provide output from your formula to evidence its correctness.
a) - - - -
A = 0 A = 1 A = 1 A = 0
B = 1 B = 1 B = 0 B = 0
C = 1 C = 0 C = 1 C = 0

b) The Lucas numbers are similar to Fibonacci numbers, each Lucas number is defined to be the sum of its two immediate previous terms.
However, the first two Lucas numbers are lucas(0) = 2 and lucas(1) = 1 instead of 0 and 1. Give a Tempura specification that generates the first 8 Lucas numbers, i.e., generates the following interval:
- - - - - - - -
L = 2 L = 1 L = 3 L = 4 L = 7 L = 11 L = 18 L = 29
(7 marks)
c) Give a Tempura specification that generates the first n Lucas numbers squared. The specification should ask the user to input n (n > 0) in the first state.
- - : : : -
D = luc (0) ∗ luc (0) D = luc (1) ∗ luc (1) : : : D = luc (n) ∗ luc (n)
where luc (n) denotes the nth Lucas number.

Exercise 3. Assessment Indicators:

Ability to translate informal textual system description into formal description.

- Ability to justify system design decisions.
- Ability to analyse a formal system specification.
The following is an informal description for a traffic-light controller:

1. There are two sets of lights: one is positioned over the main road (MAIN) entering the cross-junction, and the other is over the secondary road (SEC).
2. During the daytime the controller operates according to one of two possible programs (option externally determined):

Program A gives two minutes for the vehicles on MAIN, and half a minute for the vehicles on SEC, alternating.
Program B gives half a minute for the vehicles in SEC once a signal SEC_FULL goes on (the SEC_FULL signal coming from an external sensor).

3. During the night the controller gives precedence to the cars in MAIN
until one of the following two possibilities occurs:

Two minutes have passed since MAIN became green and a new car appears on SEC;
- Three cars have appeared on SEC.
When one of these conditions occurs, vehicles on SEC are given half a minute.

4. Any transition from day to night and vice-versa, must start with 5 seconds of flashing amber lights after which the MAIN receives the green light.

First identify the external input events and conditions. The outputs of the controller are the Boolean signals:
MRED, MAMB, MGRN SRED, SAMB, SGRN
(MRED means: the RED light for the MAIN road).

a) Give a Tempura specification of the traffic-light controller. Log decisions on how you resolve any ambiguity.
Use the following scenarios to illustrate your answer with output from your program:
i) A behaviour of the controller in which program A is used during daytime (only the daytime portion of the behaviour should be given).
ii) A behaviour of the controller in which program B is used during daytime (only the daytime portion of the behaviour should be given).
iii) A behaviour of the controller in which the controller switches from daytime mode to nighttime mode (only the portion of the behaviour where the switch occurs should be given).

The following marking scheme will be used

Environment: Cars/Sensor

Actions + Process + Tempura + 2-3scenarios

:

15-18

Actions + Process + Tempura + 1scenario

:

10-14

Actions + Tempura

:

05-09

Actions + English

:

00-04

Controller

Actions + Process + Tempura + Generic

:

15-18

Actions + Process + Tempura + Non-Generic

:

10-14

Actions + Tempura

:

05-09

Actions + English

:

00-04

Integration

Executable and Communicating

Non-Executable or Non-Communicating

:

:

05-09

00-04

b) The system that you have specified needs to satisfy certain safety conditions. Note, a safety condition specifies that something bad will never happen.

Give two examples of safety conditions that your system should satisfy and formulate them in ITL/Tempura.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M93075502
  • Price:- $60

Guranteed 36 Hours Delivery, In Price:- $60

Have any Question?


Related Questions in Computer Engineering

Does bmw have a guided missile corporate culture and

Does BMW have a guided missile corporate culture, and incubator corporate culture, a family corporate culture, or an Eiffel tower corporate culture?

Rebecca borrows 10000 at 18 compounded annually she pays

Rebecca borrows $10,000 at 18% compounded annually. She pays off the loan over a 5-year period with annual payments, starting at year 1. Each successive payment is $700 greater than the previous payment. (a) How much was ...

Jeff decides to start saving some money from this upcoming

Jeff decides to start saving some money from this upcoming month onwards. He decides to save only $500 at first, but each month he will increase the amount invested by $100. He will do it for 60 months (including the fir ...

Suppose you make 30 annual investments in a fund that pays

Suppose you make 30 annual investments in a fund that pays 6% compounded annually. If your first deposit is $7,500 and each successive deposit is 6% greater than the preceding deposit, how much will be in the fund immedi ...

Question -under what circumstances is it ethical if ever to

Question :- Under what circumstances is it ethical, if ever, to use consumer information in marketing research? Explain why you consider it ethical or unethical.

What are the differences between four types of economics

What are the differences between four types of economics evaluations and their differences with other two (budget impact analysis (BIA) and cost of illness (COI) studies)?

What type of economic system does norway have explain some

What type of economic system does Norway have? Explain some of the benefits of this system to the country and some of the drawbacks,

Among the who imf and wto which of these governmental

Among the WHO, IMF, and WTO, which of these governmental institutions do you feel has most profoundly shaped healthcare outcomes in low-income countries and why? Please support your reasons with examples and research/doc ...

A real estate developer will build two different types of

A real estate developer will build two different types of apartments in a residential area: one- bedroom apartments and two-bedroom apartments. In addition, the developer will build either a swimming pool or a tennis cou ...

Question what some of the reasons that evolutionary models

Question : What some of the reasons that evolutionary models are considered by many to be the best approach to software development. The response must be typed, single spaced, must be in times new roman font (size 12) an ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As