Formal Specifications Flashcards

1
Q

What is a formal specification?

A

Part of a more general collection of techniques that are known as formal methods.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are formal methods?

A

based on the mathematical representation and analysis of the software.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What do formal methods include?

A

Formal specification, specification analysis and proof, program verification.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Disadvantages of formal methods

A

Other techniques have been successful at increasing system quality. Do not reduce time to market. Not well suited to specifying and analyising user interfaces. Hard to scale up to large systems

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Benefit of formal methods and where they are used?

A

Reducing the number of errors in systems and so main areas of applicability is critical systems : air traffil control, railway systems, spacecraft etc. Cost effective in these areas

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

name two specification techniques

A

algebraic approach- system is specified in terms of its operations and their relationships. However this is cumbersome when the object operations are not independent of the object state.
Model based approach - state model that is constructed using mathematical constructs. Operations are defined by modifications systems state. however it exposes the system state.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the use of formal spec?

A

involves investing more effort in the early phases of software development and this reduces errors as it forces a detailed analysis of requirements. Incompleteness and inconsistencies can be found and resolved so savings are made.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Why are sub system interface specifications important?

A

reduce the chance of misunderstanding between provider and user, The algebraic approach to formal specification is well suited to interface specification.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Structure of an algebraic spec

A

introduction- sort(type name). imports other specifications.
Description-informal descriptions of sort and its operations.
Signature-defines sytax of the interface to the abstract data type. (interface).
Axioms- defines semantics of the operations by defining axiom characterising behaviour.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Name some specification operations

A

constructor operations- create entites of the type being specified.
inspection operations- evaluate entites of the type being specified

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

what is AsmL(Abstract state machine language)

A

language for modelling and behaviour of digital systems. Can capture abstract stricture of discrete systems such as integrated circuits, software components, devices that combine hardware and software.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Why is an asml said to be abstract?

A

encodes only those aspects of the systems structure that affecet the behaviour being modelled. Helps us to reduce complex problems to manageable united.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the goal of asml?

A

use minimum amount of details that accurately reproduces or predicts the behavior

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is a sequence?

A

collection of elements of the same type but is ordered and can contain duplicate elements unlike sets.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

whats quicksort?

A

discovered by tony hoare. Pick a pivot, partitiorn the items around the pivot so elements to left are smaller and bigger on right, Use recursion to sort both partitions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

in shortest path algorithm, how are two nodes that are not adjacent defined?

A

D(n,m)=infinity.