Cit308 Summary From Noungeeks
Cit308 Summary From Noungeeks
Cit308 Summary From Noungeeks
2. high quality software is intuitive and easy to use -- the right things
happen "automatically"
Formal methods are intended to systematize and introduce rigor into all
the phases of software development. This helps us to avoid overlooking
critical issues, provides a standard means to record various assumptions
and decisions, and forms a basis for consistency among many related
activities. By providing precise and unambiguous description
mechanisms, formal methods facilitate the understanding required to
coalesce the various phases of software development into a successful
endeavour.
UML -- used primarily for design, and also for requirements analysis.
Definition
Formal specification
Specification
Verification
Human-directed proof
Automated proof
Software development
For concurrent software and systems, Petri nets, process algebra, and
finite state machines (which are based on automata theory) allow
executable software specification and can be used to build up and
validate application behaviour.
Software verification
• Soundness/Correctness.
This property states that every property that can be obtained using the
formal system/calculus is semantically true in some sense.
– Slogan: “What you can prove is also true.”
Completeness.
Decidability.
2. Maintainability
3. Ease of construction
4. Higher confidence in software product
6. Determine correctness
7.
Basis for testing o Formalize requirements analysis and design
Connectives
and (& or .) ∨ or
(|or +)
¬ not (∼ )
⇒ implies (⊃or→)
⇔ iff
Any two propositions can be combined by the word ‘OR’ to form a third
proposition called the disjunction of the originals.
p implies q.
Introduction to Predicate
1. A variable or a constant
For example:
An ostrich has wing can fly, a eagle has wing can fly
Predicate quantifiers
Because the result of a predict function can be true or false, Truth tables
can also be used with predicates.
For example:
The idea is related to a symbol that will later be replaced with strings or
values. It can also be represented by a wildcard character that stands for
an unspecified symbol. Based on the example, below:
In formal methods, there are many ways to use set theory. One example
will be to categories many types of objects available in a system mostly in
the form of data. Base on the purpose of the particular system or
software the objects are properly grouped and then related to one
another.
Universe (U)
The Universe represents the scope of the system. All elements that is
within the universe is considered necessary and elements not mentioned
in the universe is considered none existence. Thus, it is very important
that we define the universe accurately.
Elements
A is the set whose members are the first four positive integers.
Some elements may be finite (with a starting and ending value) thus it
can be representation as:
Infinite Elements
Cardinality
For example
|{1,3,9,15}|=4
|{1,2,3,...}|=∞
Z Set of all integers (positive/ negative / zero): Z = {..., −2, −1, 0, 1, 2, ...}
Q Set of all rational numbers (that is, the set of all proper and improper
fractions):
Disjoint Sets
If every member of set A has no relation with set B and vice versa then
we say that A disjoint B. There is no special symbol to show this
relationship.
NULL Set ( ∅ )
Family Sets
There are times when a set does not contain individual elements but it
contains many subsets. Conveniently this is called a family set and is it
describes using the curly bracket within a curly bracket.
Remember that a set is a group that may contain none or one (1) or more
elements. A power set means to show how many possible different ways
to group all the elements in a set. In other words, power set is the set of
all subsets of a given set.
A = {1, 2, 3}, A has 3 elements, there is 8 possible ways to arrange
this 23 = 8. P(A) = { ∅ , {1}, {2}, {3}, {1,2}, {1,3}, {2,3}, {1, 2, 3} }
U = {-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
A = {-1, 0, 1, 2, 5, 6, 9, 10}
B = {1, 2, 4, 6, 8, 10}
C={1,3,5,7,9}
Union (∪): Add in all elements that are found in
both sets. A∪B={-1,0,1,2,4,5,6,8,9,10} A∪C={-
1,0,1,2,3,5,6,7,9,10} B∪C={1,2,3,4,5,6,7,8,9,10}
A∪B ∪C=U
Difference (-): Also known as subtract, this show only elements that is
found in this set but NOT found in another sets
Complement (‘): Show only elements that is found NOT found this sets
Equality: Both sets must have exactly the same number of elements with
exactly the same value. Take note that sequence and duplication does not
affect the set.
Compatible: Two sets are compatible if all element in one of the set can
fit nicely inside another set.
Background
Terms (usually represented with a subscript italic letter “n”) refers to the
index for a given sequence starting from 0 to infinite. The sequence
(usually represented with any small letter “a”) refers to the value for a
specific term. For example:
Arithmetic sequence
Geometric sequence
Geometric sequence
Terminology
1) Conjecture/ Hypothesis
2) Axiom/ Postulate
If the statement is taken for granted to be true even though it was never
tested, but base on logic it is assume to be true.
3) Paradox/ Antinomy
6) Lemma
Proofing Methods
1. Direct Proof
2. Contradiction Proof
In proof by contradiction, if that statement is true and we logically
contradict it then it will not be true anymore.
No Rain →I am Dry
Testing Concept
Test Flow
1. Top Down
This is a test flow that starts from a general level down to the specific
detail level. Example for an inventory system will be to start from a main
menu and slowly make the way down to the product module.
2. Bottom Up
This is a test flow that starts from a detail specific level up to the general
level. Example for an inventory system will be to start from the products
and slowly make the way up to the main menu.
Test Size
1. Unit Testing
2. Integration Testing
3. System Testing
This is the final a test where the end user will physically tested out the
system themselves using real life data but still in a control testing
environment. Example for an inventory system will be to ask the POS
staff to test out the POS system and enter 100 products and produce the
correct balance on the receipt.
Software
Engineering
Software Development
Software Developer
Software developers have a less formal role than engineers and can
be closely involved with specific project areas — including writing code.
At the same time, they drive the overall software development lifecycle —
including working across functional teams to transform requirements
into features, managing development teams and processes, and
conducting software testing and maintenance.3
Software Engineering
Definitions
Even after the user has desired software in hand, the advancing
technology and the changing requirements force the software product to
change accordingly. Re-creating software from scratch and to go one-on-
one with requirement is not feasible. The only feasible and economical
solution is to update the existing software so that it matches the latest
requirements.
Lehman has given laws for software evolution. He divided the software
into three different categories:
Software Paradigms
Software paradigms refer to the methods and steps, which are taken
while designing the software. There are many methods proposed and are
in work today, but we need to see where in the software engineering
these paradigms stand. These can be combined into various categories,
though each of them is contained in one another:
Need of Software development
A software product can be judged by what it offers and how well it can
be used. This software must satisfy on the following grounds:
Operational
Transitional
Maintenance
Operational
Budget
Usability
Efficiency
Correctness
Functionality
Dependability
Security
Safety
Transitional
This aspect is important when the software is moved from one platform
to another:
1. Portability
2. Interoperability
3. Reusability
4. Adaptability
Maintenance
This aspect briefs about how well a software has the capabilities to
maintain itself in the ever-changing environment:
Modularity
Maintainability
Flexibility
Scalability
SDLC Activities
Decomposition Technique
Putnam Model
COCOMO
COCOMO stands for COnstructive COst MOdel, developed by Barry W.
Boehm. It divides the software product into three categories of software:
organic, semi-detached and embedded.
Project Scheduling
Calculate total time required for the project from start to finish
Resource management
All elements used to develop a software product may be assumed as
resource for that project. This may include human resource, productive
tools and software libraries. The resources are available in limited
quantity and stay in the organization as a pool of assets. The shortage of
resources hampers the development of project and it can lag behind the
schedule. Allocating extra resources increases development cost in the
end. It is therefore necessary to estimate and allocate adequate
resources for the project. Resource management includes -
Defining proper organization project by creating a project team and
allocating responsibilities to each team member
Clear
Correct
Consistent
Coherent
Comprehensible
Modifiable
Verifiable
Prioritized
Software Requirements
Functional Requirements
Search option given to user to search from various invoices. User should
be able to mail any report to management.
Users can be divided into groups and groups can be given separate
rights. Should comply business rules and administrative functions.
Non-Functional Requirements
Security
Logging
Storage
Configuration
Performance
Cost
Interoperability
Flexibility
easy to operate
quick in response
effectively handling operational errors
providing simple yet consistent user interface
User acceptance majorly depends upon how user can use the software.
UI is the only way for users to perceive the system. A well performing
software system must also be equipped with attractive, clear, consistent
and responsive user interface. Otherwise, the functionalities of software
system cannot be used in convenient way. A system is said be good if it
provides means to use it efficiently. User interface requirements are
briefly mentioned below:
Content presentation
Easy Navigation
Simple interface
Responsive
Consistent UI elements
Feedback mechanism
Default settings
Purposeful layout
Strategical use of colour and texture.
Provide help information
User centric approach
Group based view settings.
Software design is the first step in SDLC (Software Design Life Cycle),
which moves the concentration from problem domain to solution
domain. It tries to specify how to fulfil the requirements mentioned in
SRS.
Modularization
Advantages of modularization:
Example
Design Process
Software design process can be perceived as series of well-defined steps.
Though it varies according to design approach (function oriented or
object oriented, yet it may have the following steps involved:
Top-Down Design
Bottom-up Design
The bottom-up design model starts with most specific and basic
components. It proceeds with composing higher level of components by
using basic or lower-level components. It keeps creating higher level
components until the desired system is not evolved as one single
component. With each higher level, the amount of abstraction is
increased.
Structured Programming
In the process of coding, the lines of code keep multiplying, thus, size of
the software increases. Gradually, it becomes next to impossible to
remember the flow of program. If one forgets how software and its
underlying programs, files, procedures are constructed it then becomes
very difficult to share, debug and modify the program. The solution to
this is structured programming. It encourages the developer to use
subroutines and loops instead of using simple jumps in the code,
thereby bringing clarity in the code and improving its efficiency
Structured programming also helps programmer to reduce coding time
and organize code properly.
Functional Programming
Programming style
Coding Guidelines
Indenting - This is the space left at the beginning of line, usually 2-8
whitespace or single tab.
Software Documentation
Software Validation
Fault - When error exists fault occurs. A fault, also known as a bug, is a
result of an error which can cause system to fail.
Failure - failure is said to be the inability of the system to perform the
desired task. Failure occurs when fault exists in the system.
Black-box testing
2. Boundary values - The input is divided into higher and lower end
values. If these values pass the test, it is assumed that all values in
between may pass too.
White-box testing
It is conducted to test program and its implementation, in order to improve
code efficiency or structure. It is also known as ‘Structural’ testing.
In this testing method, the design and structure of the code are known to
the tester.
Testing Levels
Testing itself may be defined at various levels of SDLC. The testing process
runs parallel to software development. Before jumping on the next stage, a
stage is tested, validated and verified.
Testing separately is done just to make sure that there are no hidden bugs
or issues left in the software. Software is tested on various levels -
Unit Testing
Integration Testing
Even if the units of software are working fine individually, there is a need
to find out if the units if integrated together would also work without errors.
For example, argument passing and data updating, etc.
System Testing
Performance testing - This test proves how efficient the software is. It
tests the effectiveness and average time taken by the software to do desired
task. Performance testing is done by means of load testing and stress
testing where the software is put under high user and data load under
various environment conditions.
Security & Portability - These tests are done when the software is meant
to work on various platforms and accessed by number of persons.
Acceptance Testing
When the software is ready to hand over to the customer it has to go
through last phase of testing where it is tested for user-interaction and
response. This is important because even if the software matches all user
requirements and if user does not like the way it appears or works, it may
be rejected.
Regression Testing
Testing Documentation
Testing documents are prepared at different stages - Before Testing
Testing starts with test cases generation. Following documents are needed
for reference –
Test Policy document - This describes how far testing should take place
before releasing the product.
Test case report - This document contains test case report as a result of
the test. Test logs - This document contains test logs for every test case
report.
Test summary - This test summary is collective analysis of all test reports
and logs. It summarizes and concludes if the software is ready to be
launched. The software is released under version control system if it is
ready to launch.