Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 13

USE OF FUZZY LOGIC IN SOFTWARE

ENGINEERING

A.P.C. Sudeera Jayasekara


WHAT IS FUZZY LOGIC?
Fuzzy - “not clear, blurred”
Fuzzy Logic is a form of approximate reasoning,
that can be used to represent variation or imprecision in logic,
by making use of natural language (NL) in logic.
NL: If it is sunny and warm today, drive fast

Traditional approach Fuzzy logic representation


Fuzzification Fuzzy sets Defuzzification
boolean sunny;
boolean warm; // 70 F °
get the sunny;
get the warm;
if (sunny AND warm) {
// speed is fast : 65 F° → Cool = 0.4, Warm= 0.7
80mph
}
else { Speed is 20% Slow and 70% Fast
// speed is slow: Speed = 63.8 mph
25 mph (weighted mean)
}

25% Cover → Sunny = 0.8, Cloudy = 0.2 Rules


WHAT IS SOFTWARE ENGINEERING?
Software engineering is an engineering is concerned with all aspects of
software production

Sub disciplines in software engineering are,


Project Management – the knowledge, techniques, and tools necessary to manage the
development of software products

Requirements Engineering – discovery , analysis, specification, and validation of


requirements of software products

Design – partitions the software into conceptual components and specifies their behavior

Development – construction of software products through the use of programming


languages

Testing– checking that the software is defect free and according to requirement
specification

Deployment, Maintenance & Evolution – running the software and perform changes and
enhancements
WHY FUZZY LOGIC & SOFTWARE ENGINEERING?
Topic is an area of current research

linguistic human logical


50% variables resources states failure

Qualitative: analysts, Converted to


good, bad, best, developers, Non linguistic
50% Software most software
worse testers, variables
engineering is projects fail
Quantitative: business classical two
communication
around 20, nearly stakeholders, and valued logic
5, below 7 end users

Fuzzy logic could address the above problem because it can


incorporate linguistic variables such that uncertainties can be modeled
FL IN REQUIREMENT ENGINEERING & DESIGN
Using FL in Object Oriented Analysis – OOA is composed of a population of
interacting objects. Classes, attributes, operations are some object-oriented artifacts
Rule of Candidate Class identification
Classical OOA rules
IF an entity in a requirement speciation is relevant adopts only
AND can exist autonomously in the application domain two quantization levels
THEN select it as a candidate class 0 or 1

“Software engineer needs to decide whether an entity in a requirement speciation is relevant or not ”
However it can be perceived that an entity partially fulfills the relevance criterion, and conclude that
the entity is substantially relevant, which cannot be represented by classical logic.

Classical Formulation
A quantization error occurs which is the difference between the perception of the software engineer
and the quantization levels imposed by the two-valued logic-based rules.

quantization error when N=2 V=1


FL IN REQUIREMENT ENGINEERING & DESIGN (cont.)
Fuzzy Logic Formulation
Define linguistic variables
Relevance - relevance value
Autonomy - autonomy value
Candidate Class – candidate class relevance value
Autonomy Dependent Partially Fully
dependent
Relevance

Weakly Weakly Weakly Weakly


Slightly Weakly Slightly Slightly
Fairly Weakly Slightly Fairly
Substantially Weakly Fairly Substantially
Strongly Slightly Fairly Strongly
Each element of the table represents the output value
of a sub-rule, which is the relevance value of the
candidate class being considered.

As the quantization levels increases the


quantization error decreases
FUZZY LOGIC IN PROJECT MANAGEMENT
Problem faced in project management is the elicitation of numerical inputs
Obtaining these with any degree of confidence early in a project is not always
feasible
Related to this difficulty is the risk of precisely specified outputs from models
leading to over promise.
These problems can be seen as the collective failure of software
measurements to represent the inherent uncertainties
Benefit of fuzzy logic is the flexibility available in terms of the types of input
and output variables
Input variables can be expressed as
simple fuzzy labels - a large number of entities in the data model,
fuzzy numbers - about 250 entities,
or using precise values - 265 entities.

Similarly, the output variables can be expressed in the same way,


as a label - a short development time,
fuzzy number - about 400 developer-hours,
or precise values - 378 developer hours.
FUZZY LOGIC IN PROJECT MANAGEMENT (cont.)
Fuzzy Logic could be used in size estimation which can be done in advance to
make better plans, and assist in tracking progress
Concept of fuzzy logic in size estimation
1. Gather size data on previously developed programs
2. Divide the historical product size data into size ranges
3. Compare the planned product with these prior products
4. Based on this comparison, select the size that seems most appropriate for the new
product
3
A file utility of 1,844 LOC log(1844) =3.266 The new program is substantially more
A file management program of 5,834 LOC log(5834) =3.766 complex application than either the file
A personnel record keeping program of 6,845 LOC log(6845) =3.835 management or personnel programs. It is
1 A report generating package of 18,386 LOC log(18386) =4.2645 not as complex as the inventory
An inventory management program of 25,943 LOC log(25943) =4.414 management program and appears to
have significantly more function than the
2 report package.
3.122 3.266 3.409 3.553 3.696 3.840 3.983 4.127 4.270 4.414 4.557

4 conclude that the new program is in the lower end of very large or from 18 to 25 KLOC
• Requires a lot of data
• The estimators must be familiar with the historically developed programs
Limitations • Not useful for new program types
• Not useful for programs much larger or smaller than the historical data
FUZZY LOGIC IN IMPLEMENTATION
Fuzzy Logic could be used to evaluate reusability of Components
A component is a reusable, self contained piece of software with well
specified interface that is independent of any application
To estimate reusability of Components, a relationship of the factors with reusability
needs to be considered, the following are such factors

Customizability
Interface Complexity
Understandability
Commonality
Portability

These combined factors


can be used to measure
the reusability by using
fuzzy logic
CONCLUSION

Uncertainty is inherent and inevitable in software development processes


So, software uncertainties should be modeled and managed explicitly

Fuzzy logic is well suited to a life-cycle approach to software development process with
its ability to represent differing levels of uncertainty for inputs and outputs

The ensuing consistency, effective communication, and economy make this an


attractive modeling technique for such applications as effort estimation, requirement
engineering and testing
REFERENCES
Shradhanand, Amarjeet Kaur, Dr. Satbir Jain
Use of Fuzzy Logic In Software Development
In Issues in Information Systems (Volume VIII, No. 2, 2007) pages 239-244
2007

Francesco Marcelloni, Mehmet Aksit


Fuzzy logic-based object-oriented methods to reduce quantization error and
contextual bias problems in software development
In Fuzzy Sets and Systems (2004) pages 57–80
2004

Vidhu Bhardwaj, Dr. Rajesh Kumar


Estimating Reusability of Software Components Using Fuzzy Logic
MSc. Thesis
2010
QUESTIONS
THANK YOU

You might also like