150 likes | 368 Views
USE OF FUZZY LOGIC IN SOFTWARE ENGINEERING. A.P.C. Sudeera Jayasekara. 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. WHAT IS FUZZY LOGIC?.
E N D
USE OF FUZZY LOGIC IN SOFTWARE ENGINEERING A.P.C. Sudeera Jayasekara
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. WHAT IS FUZZY LOGIC? NL: If it is sunnyand warm today, drive fast Traditional approach Fuzzy logic representation Fuzzification Defuzzification Fuzzy sets boolean sunny; booleanwarm; // 70 F ° get the sunny; get the warm; if (sunny AND warm) { // speed is fast : 80mph } else { // speed is slow: 25 mph } Fuzzy - “not clear, blurred” 65 F° → Cool = 0.4, Warm= 0.7 Speed is 20% Slow and 70% Fast • Speed = 63.8 mph • (weighted mean) Rules 25% Cover → Sunny = 0.8, Cloudy = 0.2
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 WHAT IS SOFTWARE ENGINEERING? Software engineering is an engineering is concerned with all aspects of software production
Topic is an area of current research WHY FUZZY LOGIC & SOFTWARE ENGINEERING? 50% linguistic variables human resources logical states failure 50% Software engineering is communication Qualitative: good, bad, best, worse Quantitative: around 20, nearly 5, below 7 analysts, developers, testers, business stakeholders, and end users Converted to Non linguistic variables classical two valued logic most software projects fail Fuzzy logic could address the above problem because it can incorporate linguistic variables such that uncertainties can be modeled
Rule of Candidate Class identification Classical OOA rules adopts only two quantization levels 0 or 1 FL IN REQUIREMENT ENGINEERING & DESIGN IF an entity in a requirement speciation is relevant ANDcan exist autonomously in the application domain THENselect it as a candidate class “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. Using FL in Object Oriented Analysis – OOA is composed of a population of interacting objects. Classes, attributes, operations are some object-oriented artifacts 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
Define linguistic variables Relevance - relevance value Autonomy - autonomy value Candidate Class – candidate class relevance value FL IN REQUIREMENT ENGINEERING & DESIGN (cont.) Fuzzy Logic Formulation 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 interms 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.
Concept of fuzzy logic in size estimation Gather size data on previously developed programs Divide the historical product size data into size ranges Compare the planned product with these prior products Based on this comparison, select the size that seems most appropriate for the new product FUZZY LOGIC IN PROJECT MANAGEMENT (cont.) 3 A file utility of 1,844 LOC log(1844) =3.266 A file management program of 5,834 LOC log(5834) =3.766 A personnel record keeping program of 6,845 LOC log(6845) =3.835 A report generating package of 18,386 LOC log(18386) =4.2645 An inventory management program of 25,943 LOC log(25943) =4.414 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. Fuzzy Logic could be used in size estimation which can be done in advance to make better plans, and assist in tracking progress 1 2 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 • Not useful for new program types • Not useful for programs much larger or smaller than the historical data Limitations
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 FUZZY LOGIC IN IMPLEMENTATION Customizability Interface Complexity Understandability Commonality Portability Fuzzy Logic could be used to evaluate reusability of Components 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