You are on page 1of 2

Q1 – What are formal methods in software engineering. Why is it essential.

Give example
which exemplifies its importance in the software development life cycle.
DEF:
“Mathematically based techniques for the specification, development and verification of
software and hardware systems.”

“Formal Methods are software development approaches based on mathematical representation


and analysis of software.”
WHY IS IT ESSENTIAL:
It is essential because formal methods are intended systematize and introduce rigor into all the
phases of software development.
This help us to:
1. Avoid overlooking critical issues.
2. Provide a standard mean to record a various assumption and decision.
3. Forms a basis for consistency among many related activities
Example of formal methods:
B Method:
B is an example of formal method that Covers the whole Software development Lifecycle. It
divides Software onto separate components that further represent Abstract Machines.
B methods represent system model's the form of mathematical expressions as an Abstract
Notation Machine (AMN). These are further subject to Stepwise refinement and proof
obligation. evaluation. This Consists of verification of in variant Preservation and refinement
Correctness.
e.g. AUTOMATED RAILWAY STATION

Q2: Solve the Propositional Logic (PL) sentences and provide the truth-table. Is any of the PL
sentence a tautology or a contradiction?
1. ¬(P ^ ¬Q)
P Q ¬Q (P ^ ¬Q) ¬(P ^ ¬Q)
0 0 1 0 1
0 1 0 0 1
1 0 1 1 0
1 1 0 0 1
It is not tautology nor contradiction but contingency.
2. (P → Q) ^ (Q → P)
P Q P→Q Q→P (P → Q) ^ (Q → P)
0 0 1 1 1
0 1 1 0 0
1 0 0 1 0
1 1 1 1 1
It is not tautology nor contradiction but contingency.

3. (P ^ Q) → R
P Q R (P ^ Q) (P ^ Q) → R
0 0 0 0 1
0 0 1 0 1
0 1 0 0 1
0 1 1 0 1
1 0 0 0 1
1 0 1 0 1
1 1 0 1 0
1 1 1 1 1
It is not tautology nor contradiction but contingency.

4. P → (Q → R)
P Q R (Q → R) P → (Q → R)
0 0 0 1 1
0 0 1 1 1
0 1 0 0 1
0 1 1 1 1
1 0 0 1 1
1 0 1 1 1
1 1 0 0 0
1 1 1 1 1
It is not tautology nor contradiction but contingency.

There is no any PL sentence a tautology or contradiction. But almost all of them are contegency.

You might also like