1998/12/21NTUST Ailab Li-we Pan1 Fuzzy object-oriented system design W. Pedrycz, Z.A. Sosnowski Fuzzy Sets and System (1998) p121~134 ref : 孫宗瀛、楊英魁, Fuzzy.

Slides:



Advertisements
Similar presentations
Intermediate Code Generation
Advertisements

ICE1341 Programming Languages Spring 2005 Lecture #6 Lecture #6 In-Young Ko iko.AT. icu.ac.kr iko.AT. icu.ac.kr Information and Communications University.
Translator Architecture Code Generator ParserTokenizer string of characters (source code) string of tokens abstract program string of integers (object.
Grammars, Languages and Parse Trees. Language Let V be an alphabet or vocabulary V* is set of all strings over V A language L is a subset of V*, i.e.,
ICE1341 Programming Languages Spring 2005 Lecture #5 Lecture #5 In-Young Ko iko.AT. icu.ac.kr iko.AT. icu.ac.kr Information and Communications University.
CS 330 Programming Languages 09 / 19 / 2006 Instructor: Michael Eckmann.
Inheritance Inheritance Reserved word protected Reserved word super
1999/7/6Li-we Pan1 Semester Report 指導老師 : 何正信教授 學生:潘立偉 學號: M 日期: 88/7/6.
5/12/1999 Li-we Pan1 指導老師 : 何正信教授 學生:潘立偉 學號: M 日期: 5/12/1999 Wolfgang Wilke, Barry Smyth, Pádraig Cunningham “Case-Based Reasoning Technology From.
Chapter 3 Describing Syntax and Semantics Sections 1-3.
1999/3/10Li-we Pan1 Case-Based CBR : Capturing and Reusing Reasoning About Case Adaptation 指導老師 : 何正信教授 學生:潘立偉 學號: M 日期: 88/3/10 David B. Leake,
PZ02A - Language translation
1 Grammars. 2 Grammars express languages Example: the English language.
5/20/1999 Li-we Pan1 指導老師 : 陳錫明教授 學生:潘立偉 學號: M 日期: 5/20/1999 Myung-Kuk Park, Inbom Lee, Key-Mok Shon Expert Systems with Application 15(1998), p69~75.
CS 330 Programming Languages 09 / 18 / 2007 Instructor: Michael Eckmann.
Theory and Applications
NTUST Ailab Li-we Pan The MEDIATOR : Analysis of an Early Case-Based Problem Solver Jenet L. Kolodner & Robert L. Simpson Cognitive Science 13,
CS 330 Programming Languages 09 / 16 / 2008 Instructor: Michael Eckmann.
Dr. Muhammed Al-Mulhem 1ICS ICS 535 Design and Implementation of Programming Languages Part 1 Fundamentals (Chapter 4) Compilers and Syntax.
Chapter 3: Formal Translation Models
Specifying Languages CS 480/680 – Comparative Languages.
COP4020 Programming Languages
Case Adaptation Using an Incomplete Causal Model 指導老師 : 何正信教授 學生:潘立偉 學號: M 日期: 88/7/20 John D.Hastings, L. Karl Branting, and Jeffrey A. Lockwood,
1999/2/10NTUST Ailab Li-we Pan1 Semester Report 指導老師 : 何正信教授 學生:潘立偉 學號: M 日期: 88/2/10.
(2.1) Grammars  Definitions  Grammars  Backus-Naur Form  Derivation – terminology – trees  Grammars and ambiguity  Simple example  Grammar hierarchies.
Language Translation Principles Part 1: Language Specification.
Inheritance using Java
Describing Syntax and Semantics
Introduction Syntax: form of a sentence (is it valid) Semantics: meaning of a sentence Valid: the frog writes neatly Invalid: swims quickly mathematics.
Object-oriented programming: C++ class A { private: …… // can be accessd by A protected: …… // can be accessed by A and // its derived classes public:
Winter 2007SEG2101 Chapter 71 Chapter 7 Introduction to Languages and Compiler.
Syntax Specification and BNF © Allan C. Milne Abertay University v
COP4020 Programming Languages Semantics Prof. Xin Yuan.
Languages, Grammars, and Regular Expressions Chuck Cusack Based partly on Chapter 11 of “Discrete Mathematics and its Applications,” 5 th edition, by Kenneth.
CS Describing Syntax CS 3360 Spring 2012 Sec Adapted from Addison Wesley’s lecture notes (Copyright © 2004 Pearson Addison Wesley)
LANGUAGE DESCRIPTION: SYNTACTIC STRUCTURE
3-1 Chapter 3: Describing Syntax and Semantics Introduction Terminology Formal Methods of Describing Syntax Attribute Grammars – Static Semantics Describing.
ISBN Chapter 3 Describing Syntax and Semantics.
TextBook Concepts of Programming Languages, Robert W. Sebesta, (10th edition), Addison-Wesley Publishing Company CSCI18 - Concepts of Programming languages.
March 5, ICE 1341 – Programming Languages (Lecture #4) In-Young Ko Programming Languages (ICE 1341) Lecture #4 Programming Languages (ICE 1341)
Principles of programming languages 5: An operational semantics of a small subset of C Department of Information Science and Engineering Isao Sasano.
CPS 506 Comparative Programming Languages Syntax Specification.
Chapter 3 Part II Describing Syntax and Semantics.
C HAPTER 3 Describing Syntax and Semantics. T OPICS Introduction The General Problem of Describing Syntax Formal Methods of Describing Syntax Attribute.
Copyright © 2006 Addison-Wesley. All rights reserved. Ambiguity in Grammars A grammar is ambiguous if and only if it generates a sentential form that has.
D Goforth COSC Translating High Level Languages Note error in assignment 1: #4 - refer to Example grammar 3.4, p. 126.
1 Language translation Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Sections
Grammars A grammar is a 4-tuple G = (V, T, P, S) where 1)V is a set of nonterminal symbols (also called variables or syntactic categories) 2)T is a finite.
Introduction Finite Automata accept all regular languages and only regular languages Even very simple languages are non regular (  = {a,b}): - {a n b.
CSC312 Automata Theory Lecture # 26 Chapter # 12 by Cohen Context Free Grammars.
Programming Languages and Design Lecture 2 Syntax Specifications of Programming Languages Instructor: Li Ma Department of Computer Science Texas Southern.
1 Programming Languages (CS 550) Lecture 2 Summary Mini Language Interpreter Jeremy R. Johnson.
Chapter 4: Syntax analysis Syntax analysis is done by the parser. –Detects whether the program is written following the grammar rules and reports syntax.
Copyright © 2006 Addison-Wesley. All rights reserved.1-1 ICS 410: Programming Languages Chapter 3 : Describing Syntax and Semantics Syntax.
Compiler Design Lecture 10 Semantic Analysis. int aintegers int a[2][3]array(2, array(3, integer)) int f(int, float, char) int x float x char  int Int.
Chapter 12: Support for Object- Oriented Programming Lecture # 18.
Chapter 3 – Describing Syntax CSCE 343. Syntax vs. Semantics Syntax: The form or structure of the expressions, statements, and program units. Semantics:
Lecture 17: Theory of Automata:2014 Context Free Grammars.
LECTURE 10 Semantic Analysis. REVIEW So far, we’ve covered the following: Compilation methods: compilation vs. interpretation. The overall compilation.
Chapter 3 – Describing Syntax
System Software Unit-1 (Language Processors) A TOY Compiler
Language translation Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Sections
Mini Language Interpreter Programming Languages (CS 550)
Language translation Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Sections
Language translation Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Sections
Language translation Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Sections
Language translation Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Sections
Language translation Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Sections
Language translation Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Sections
Presentation transcript:

1998/12/21NTUST Ailab Li-we Pan1 Fuzzy object-oriented system design W. Pedrycz, Z.A. Sosnowski Fuzzy Sets and System (1998) p121~134 ref : 孫宗瀛、楊英魁, Fuzzy 控制:理論、實作與應用, 全華(民 83 ) p113 指導老師 : 陳錫明教授 學生:潘立偉 學號: M 日期: 87/12/21

1998/12/21NTUST Ailab Li-we Pan2 index OO approach Linguistic variables as types in objects –Linguistic variables –Linguistic approximation Fuzzy inheritance classification in OO systems –Learning

1998/12/21NTUST Ailab Li-we Pan3 Fundamentals of OO approach Element size : Integer height :Integer Element Size Height (Element) (Element) Class Element { protected:// Attributes int size; int height; public:// Methods Element(int S; int H); int Size(); {return size;} int Height() {return height;) } Class Object

1998/12/21NTUST Ailab Li-we Pan4 Element size : Integer height:Integer Element Size Height Building x : Integer y :Integer Building location x location y Pedestrian Speed : Real accel. : Real Pedestrian speed acceleration Class Building : public Element { protected : int x; //Location int y; public : Building(int S, int H, int X, int Y) : Element(S, h); {x = X; y = Y;} void Location(); } class Pedestrian : public Element { protected : float speed; float acceleration; public : Pedestrian(int S,int H,float S,float A) : Element(S, H); {speed = s; acceleration = A; }; float Speed(); { return speed; } float Acceleration();{return acceleration;} }

1998/12/21NTUST Ailab Li-we Pan5 Static x : Integer y :Integer Static location Element size : Integer height:Integer Element Size Height Tree class Static {// Static scene element protected : int x; int y; public : Static(int X, int Y); {x = X; y = Y;} void Location(); } class Tree : public Element, public Static { public : Tree(int S, int H, int X, int Y) : Element(S, h), Static(X, Y); } Multiple inheritance

1998/12/21NTUST Ailab Li-we Pan6 Linguistic variables as types in objects Element size : Integer height :Integer Element Size Height class Element {// Attributes SIZE size; HEIGHT height; public : … }

1998/12/21NTUST Ailab Li-we Pan7 Linguistic variables T={t 1,t 2,…,t s } linguistic terms. {ex:Small, Medium, Large,...} H={h 1,h 2,…,h r } modifiers(hedges).{ex:more or less, very,...} linguistic variable L : –L =, –N : name of variable, –L(G) : family of labels if fuzzy sets defined in a given universe of discourse (the language generated by grammar G) –U : universe of discourse –G : syntactic rules –Sem : L(G) -> F(U)Semantics if the variable

1998/12/21NTUST Ailab Li-we Pan8 semantics : 3 components Membership function A i : linguistic term t i  T Linguistic modifiers h(A)(x) = A p (x)h(.) : linguistic modifier, p>0 –very A(x) = A²(x), more or less A(x) = A 0.5 (x) h(A)(x) = A(x  ) h(A(x)) = A p (x  ) linguistic expressions e 1 or e 2 or … or e k k = 1,2,…,s (s ≦ card(T)) e i : h i t j (i=1,2,…,r; j = 1,2,…,s) Sem(e 1 ore 2 or…ore k )=sem(e 1 ) ∪ sem(e 2 ) ∪... ∪ sem(e k )

1998/12/21NTUST Ailab Li-we Pan9 Syntax of the linguistic variable Context-free grammar G = V&  : set of terminal & nonterminal symbol P : production rules  : initial symbol –v = {t 1,t 2,…,t s,h 1,h 2,…,h r, or}. –  = { ,, } –P represented in the BNF notation

1998/12/21NTUST Ailab Li-we Pan10 –  ::= – ::= | or – ::= t i | m i t i |, i=1,2,…,r j = 1,2,…,s ex: –T = {small, medium, big} –H = {very, more_or_less} –some valid sentences very small small or more_or_less medium or very big etc.

1998/12/21NTUST Ailab Li-we Pan11 Linguistic approximation 1if A(x i ) ≦ B(x i ) B(x i )/A(x i )otherwise 1if A(x i ) ≦ B(x i ) 1-A(x i )+B(x i )otherwise 1-B(x i )+A(x i ) if A(x i ) ≦ B(x i ) 1-A(x i )+B(x i ) otherwise Method 1 : Method 2 : Method 3 : Method 4 : Poss(A,B)if Nec(b, A) > 0.5, Nec(B,A)/2 *Poss(B,A)Otherwise Selected definitions of similarity indexes ||.|| : similarity index

1998/12/21NTUST Ailab Li-we Pan12 Ex of linguistic approximation Triangular membership function U = [0…100] membership level 1/2 numerical interval (X) of width 2d V={A 1,A 2,A 3,A 4,A 5,very,more_or_less,or} –A i, i=1,2,…,r : generic terms represented as triangular fuzzy numbers –Sem(A i )={  i, m i,  i } –very A(x) = A²(x)more or less A(x) = A 0.5 (X) A1X A2A3 X()-d x() X()+d

1998/12/21NTUST Ailab Li-we Pan13 Fuzzy inheritance fuzzy inheritance cannot be explicitly defined at the object level and should be induced by linguistic approximation. Inheritance : add new attributes and methods or provide more specialized method. Must inheritance of attributes or be more precise. Inheritance hold at the level of classes,not objects. Keep the inheritance of attribute for fuzzy classes.

1998/12/21NTUST Ailab Li-we Pan14 (Cont.) Imposing some restriction on the set of possible values this attribute in the subclass can be assume. –L(G 1 )  L(G 2 ) L(G 1 ), L(G 2 ) the languages in the class & subclass

1998/12/21NTUST Ailab Li-we Pan15 Element size : SIZE[small, medium, large] height : HEIGHT[small, medium, large] Element Size Height Vehicle size : SIZE[medium, large] height : HEIGHT[small, medium] Vehicle Size Height Example derivation of classes - class vehicle & element

1998/12/21NTUST Ailab Li-we Pan16 Classification in OO system One profound applications of the hierarchies of class of object. Lower the level in the hierarchy, the more features become associated. The matching process applies to the corresponding attributes. class1 Object Top-down match similarity

1998/12/21NTUST Ailab Li-we Pan17 Ex of classification Collection if instances Instances LengthHeightSpeedAcceleration 1ShortShortFastHigh Long Low 4MediumMediumMediumMedium Fast ShortSlowLow 7ShortShortMediumMedium m shortv shortv fastv high 10very longm bigm mediumm low m - more or less;v - very

1998/12/21NTUST Ailab Li-we Pan18 M_vehicle length[short, medium, long] Speed[slow, medium, fast] height[small, medium, large] M_vehicle length[short, medium, long] Speed[slow, medium, fast] height[small, medium, large] M_vehicle length[short, medium, long] Speed[slow, medium, fast] height[small, medium, large] Hierarchy m_vehicle, m_car, m_truck