Translate informal textual system

Assignment Help Basic Computer Science
Reference no: EM132088031

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.

Reference no: EM132088031

Questions Cloud

What are the elements of tortious interference with contract : What must a plaintiff prove to win on this theory? What are the elements of tortious interference with contract?
One market share point represent in this? industry : How much revenue does one market share point represent in this? industry? what sales must Resource attain to be among the top 10 selling? brands?
What is wyatt basis for the new van : Wyatt, Inc. owns a delivery van which he purchased for $50,000. After depreciation of $30,000 had been deducted, the van was traded-in for a new van.
Possibilities in a simple economic system : Kindly help me with this assignment. What are the assumptions necessary to represent the production Possibilities in a simple economic system?
Translate informal textual system : CTEC3902 - Rigorous Systems - De montfort university - develop, analyse and critically review a (small-scale) system specification
Describing the effect of each transaction on liabilities : Write a minimum 150-word response to each of the following scenarios in Financial Accounting (p. 132) describing the effect of each transaction on assets.
Design a research in the area of organizational behavior : Write a report under Organizational Behavior context by answering the below questions: Design a research in the area of Organizational Behavior such as Group.
Entrepreneur or manager include within business plan : What components should an entrepreneur or manager include within a business plan? Explain each component.
Identify the stakeholders involved in this project : What were your selection criteria, given what you have learned so far about the nature of projects?

Reviews

len2088031

8/17/2018 12:26:00 AM

Academic Offences and Bad Academic Practices: These include plagiarism, cheating, collusion, copying work and reuse of your own work, poor referencing or the passing off of somebody else’s ideas as your own. If you are in any doubt about what constitutes an academic offence or bad academic practice you must check with your tutor. Further information and details of how DSU can support you, if needed, is available at academic offences link and bad academic practice link.

len2088031

8/17/2018 12:25:51 AM

Late submissions will be processed in accordance with current University regulations which state: “the time period during which a student may submit a piece of work late without authorisation and have the work capped at 40% [50% at PG level] if passed is 14 calendar days. Work submitted unauthorised more than 14 calendar days after the original submission date will receive a mark of 0%. These regulations apply to a student’s first attempt at coursework. Work submitted late without authorisation which constitutes reassessment of a previously failed piece of coursework will always receive a mark

len2088031

8/17/2018 12:25:29 AM

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 This coursework is: Individual If other or mixed then explain here:

Write a Review

Basic Computer Science Questions & Answers

  Call methods with parameters and return values

Call methods with parameters and return values.

  What time complexity does it have

Use in-order traversal to create a sort routine. What time complexity does it have? Under what conditions might it behave poorly? How does its performance compare to our quicksort and a library version?

  Concept of software as a service

Explain the concept of software as a service (SaaS), and describe at least one application area in which SaaS is becoming important. Do you think the use of SaaS will expand and why or why not?

  Explain boolean formula is minimal

Boolean formula is minimal if there is no shorter Boolean formula which is equivalent to . Let MIN-FORMULA = { | is a minimal formula }. (a) Show that MIN-FORMULA (b) PSPACE.

  How much do you owe at the end of the year

A credit card offers you a rate of 18.5% compounded monthly. If you owe $1,500 today and do not make any payments for an entire year

  Result of the calculation to be truncated

Assuming that variables value1 and value2 are both declared as ints, which of the following statements causes the result of the calculation to be truncated?

  Mitigate or exploit impacts

OFS operations have a huge strategic impact on other aspects of the bank - what are some of these impacts and how may the use of the BSC help mitigate.

  Client-server computing from file server

Discuss the evolution of client-server computing from file server to multilayer applications to Web-based applications. What has been the driving force causing this evolution? Where do you think network computing will be in the next five years? Ten y..

  Divergence in gdp and growth rates

The past 500 years have seen divergence in GDP and growth rates between developed and undeveloped countries.

  Speed up the process of server administration

Templates often speed up the process of Server administration, explain how would you make sure you get as much benefit of your GP templates as possible.

  Find the error in the following pseudocode

Find the error in the following pseudocode

  Display the values of the player''s and computer''s cards

compare their values, and determine the winner. When all the cards in the deck are exhausted, display a count of the number of times the player wins, the number of times the computer wins, and the number of ties

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd