use of fuzzy logic in software engineering a.p.c. sudeera jayasekara

13
USE OF FUZZY LOGIC IN SOFTWARE ENGINEERING A.P.C. Sudeera Jayasekara

Upload: brianna-ritchie

Post on 26-Mar-2015

221 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: USE OF FUZZY LOGIC IN SOFTWARE ENGINEERING A.P.C. Sudeera Jayasekara

USE OF FUZZY LOGIC IN SOFTWARE ENGINEERING

A.P.C. Sudeera Jayasekara

Page 2: 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.

boolean sunny; boolean warm; // 70 F °get the sunny;get the warm;if (sunny AND warm) {

// speed is fast : 80mph} else {

// speed is slow: 25 mph}

Traditional approach Fuzzy logic representation

NL: If it is sunny and warm today, drive fast

65 F° → Cool = 0.4, Warm= 0.7

25% Cover → Sunny = 0.8, Cloudy = 0.2

Speed is 20% Slow and 70% Fast

Speed = 63.8 mph (weighted mean)

Rules

Fuzzification DefuzzificationFuzzy sets

Page 3: USE OF FUZZY LOGIC IN SOFTWARE ENGINEERING A.P.C. Sudeera Jayasekara

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

Page 4: USE OF FUZZY LOGIC IN SOFTWARE ENGINEERING A.P.C. Sudeera Jayasekara

WHY FUZZY LOGIC & SOFTWARE ENGINEERING?

Qualitative: good, bad, best,

worseQuantitative:

around 20, nearly 5, below 7

linguistic variables linguistic variables

analysts, developers,

testers,business

stakeholders, and end users

human resources

human resources

50% Software engineering is

communication

50%50%

Converted to Non linguistic

variablesclassical two valued logic

logical stateslogical states

Fuzzy logic could address the above problem because it canincorporate linguistic variables such that uncertainties can be modeled

Topic is an area of current research

most software projects fail

failurefailure

Page 5: USE OF FUZZY LOGIC IN SOFTWARE ENGINEERING A.P.C. Sudeera Jayasekara

FL IN REQUIREMENT ENGINEERING & DESIGNUsing 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 identificationIF an entity in a requirement speciation is relevant AND can exist autonomously in the application domain THEN select it as a candidate class

Classical OOA rules adopts only

two quantization levels0 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.

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

Classical Formulation

Page 6: USE OF FUZZY LOGIC IN SOFTWARE ENGINEERING A.P.C. Sudeera Jayasekara

FL IN REQUIREMENT ENGINEERING & DESIGN (cont.)Fuzzy Logic Formulation

Relevance - relevance valueAutonomy - autonomy valueCandidate Class – candidate class relevance value

Define linguistic variables

Autonomy Dependent Partiallydependent

Fully

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

Page 7: USE OF FUZZY LOGIC IN SOFTWARE ENGINEERING A.P.C. Sudeera Jayasekara

FUZZY LOGIC IN PROJECT MANAGEMENTProblem faced in project management is the elicitation of numerical inputsObtaining these with any degree of confidence early in a project is not always feasibleRelated 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 uncertaintiesBenefit 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.

Page 8: USE OF FUZZY LOGIC IN SOFTWARE ENGINEERING A.P.C. Sudeera Jayasekara

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 programs2. Divide the historical product size data into size ranges3. Compare the planned product with these prior products4. Based on this comparison, select the size that seems most appropriate for the new

product

A file utility of 1,844 LOC log(1844) =3.266A file management program of 5,834 LOC log(5834) =3.766A personnel record keeping program of 6,845 LOC log(6845) =3.835A report generating package of 18,386 LOC log(18386) =4.2645An inventory management program of 25,943 LOC log(25943) =4.414

3.266 3.553 3.840 4.127 4.4143.122 3.409 3.696 3.983 4.270 4.557

The new program is substantially more complex application than either the file management or personnel programs. It is not as complex as the inventory management program and appears to have significantly more function than the report package.

11

22

33

44 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• Not useful for new program types• Not useful for programs much larger or smaller than the historical data

Limitations

Page 9: USE OF FUZZY LOGIC IN SOFTWARE ENGINEERING A.P.C. Sudeera Jayasekara

FUZZY LOGIC IN IMPLEMENTATIONFuzzy 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 applicationTo estimate reusability of Components, a relationship of the factors with reusability needs to be considered, the following are such factors

CustomizabilityInterface ComplexityUnderstandabilityCommonalityPortability

These combined factors can be used to measure the reusability by using fuzzy logic

Page 10: USE OF FUZZY LOGIC IN SOFTWARE ENGINEERING A.P.C. Sudeera Jayasekara

CONCLUSION

Uncertainty is inherent and inevitable in software development processesSo, 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

Page 11: USE OF FUZZY LOGIC IN SOFTWARE ENGINEERING A.P.C. Sudeera Jayasekara

REFERENCES

Shradhanand, Amarjeet Kaur, Dr. Satbir JainUse of Fuzzy Logic In Software DevelopmentIn Issues in Information Systems (Volume VIII, No. 2, 2007) pages 239-2442007

Francesco Marcelloni, Mehmet AksitFuzzy logic-based object-oriented methods to reduce quantization error and contextual bias problems in software developmentIn Fuzzy Sets and Systems (2004) pages 57–802004

Vidhu Bhardwaj, Dr. Rajesh KumarEstimating Reusability of Software Components Using Fuzzy LogicMSc. Thesis2010

Page 12: USE OF FUZZY LOGIC IN SOFTWARE ENGINEERING A.P.C. Sudeera Jayasekara

QUESTIONS

Page 13: USE OF FUZZY LOGIC IN SOFTWARE ENGINEERING A.P.C. Sudeera Jayasekara

THANK YOU