Rfuzzy: An expressive simple fuzzy compiler

Similar documents
Knowledge Representation. Propositional logic.

Fuzzy Answer Set semantics for Residuated Logic programs

Where are we? Operations on fuzzy sets (cont.) Fuzzy Logic. Motivation. Crisp and fuzzy sets. Examples

AI Programming CS S-09 Knowledge Representation

How to determine if a statement is true or false. Fuzzy logic deal with statements that are somewhat vague, such as: this paint is grey.

Knowledge Representation. Propositional logic

Predicting Neighbor Goodness in Collaborative Filtering

A Crisp Representation for Fuzzy SHOIN with Fuzzy Nominals and General Concept Inclusions

Fuzzy Propositional Formulas under the Stable Model Semantics

CS 2740 Knowledge Representation. Lecture 4. Propositional logic. CS 2740 Knowledge Representation. Administration

Knowledge Representation and Reasoning (Logic) George Konidaris

Brief Introduction to Prolog

COMP2411 Lecture 10: Propositional Logic Programming. Note: This material is not covered in the book. Resolution Applied to Horn Clauses

Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system):

Knowledge-Based Systems and Deductive Databases

Uncertainty and Rules

Probabilistic Logic CNF for Reasoning

Propositional Logic: Review

Logic. Stephen G. Ware CSCI 4525 / 5525

A Zadeh-Norm Fuzzy Description Logic for Handling Uncertainty: Reasoning Algorithms and the Reasoning System

Realizing Default Logic over Description Logic Knowledge Bases. Minh Dao-Tran, Thomas Eiter, Thomas Krennwallner

Computational Logic Fundamentals (of Definite Programs): Syntax and Semantics

Designing and Evaluating Generic Ontologies

Logic. (Propositional Logic)

COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning

Discrete Mathematics

15414/614 Optional Lecture 1: Propositional Logic

Two-Valued Logic Programs

Gödel Negation Makes Unwitnessed Consistency Crisp

CS1021. Why logic? Logic about inference or argument. Start from assumptions or axioms. Make deductions according to rules of reasoning.

Logical Inference. Artificial Intelligence. Topic 12. Reading: Russell and Norvig, Chapter 7, Section 5

VARIABLE-STRENGTH CONDITIONAL PREFERENCES FOR RANKING OBJECTS IN ONTOLOGIES

Semantics and Inference for Probabilistic Ontologies

On Axiomatic Rejection for the Description Logic ALC

Semantic Web SPARQL. Gerd Gröner, Matthias Thimm. July 16,

Methods of Partial Logic for Knowledge Representation and Deductive Reasoning in Incompletely Specified Domains

Propositional and First-Order Logic

Expert Systems! Knowledge Based Systems!

Chapter 2: Basic Notions of Predicate Logic

Advanced Topics in LP and FP

Expert Systems! Knowledge Based Systems!

Artificial Intelligence

Well-Supported Semantics for Description Logic Programs

Compiling Fuzzy Answer Set Programs to Fuzzy Propositional Theories

KU Leuven Department of Computer Science

Definite Logic Programs

OUTLINE. Introduction History and basic concepts. Fuzzy sets and fuzzy logic. Fuzzy clustering. Fuzzy inference. Fuzzy systems. Application examples

CS 4110 Programming Languages & Logics. Lecture 16 Programming in the λ-calculus

QSQL: Incorporating Logic-based Retrieval Conditions into SQL

Propositional Logic Part 1

Insights from Web 3.0: Is it Time for a New Scientific Publishing Methodology?

Franz J. Kurfess Computer Science Department California Polytechnic State University San Luis Obispo, CA, U.S.A.

Deciding Equivalence between Extended Datalog Programs. A Brief Survey.

Chapter 16. Logic Programming. Topics. Logic Programming. Logic Programming Paradigm

Logic. Introduction to Artificial Intelligence CS/ECE 348 Lecture 11 September 27, 2001

Propositional Logic: Logical Agents (Part I)

Introduction to Metalogic

Hybrid Rules with Well-Founded Semantics

7 RC Simulates RA. Lemma: For every RA expression E(A 1... A k ) there exists a DRC formula F with F V (F ) = {A 1,..., A k } and

Reasoning under Uncertainty: Intro to Probability

It rains now. (true) The followings are not propositions.

On flexible database querying via extensions to fuzzy sets

3. The Logic of Quantified Statements Summary. Aaron Tan August 2017

Fuzzy Propositional Logic for the Knowledge Representation

A Framework for Representing Ontology Mappings under Probabilities and Inconsistency

TECHNISCHE UNIVERSITEIT EINDHOVEN Faculteit Wiskunde en Informatica. Final exam Logic & Set Theory (2IT61) (correction model)

SPARQL Extensions and Outlook

Markov Logic Networks. November 24, 2009 CS 486/686 University of Waterloo

HANDLING UNCERTAINTY IN INFORMATION EXTRACTION

The non-logical symbols determine a specific F OL language and consists of the following sets. Σ = {Σ n } n<ω

Predicate Logic: Introduction and Translations

Infinitary Equilibrium Logic and Strong Equivalence

Inducing syntactic cut-elimination for indexed nested sequents

A CLASSIFICATION METHOD BASED ON INDISTINGUISHABILITIES

Proving Security Protocols Correct. Lawrence C. Paulson Computer Laboratory

DESCRIPTION LOGICS. Paula Severi. October 12, University of Leicester

CS560 Knowledge Discovery and Management. CS560 - Lecture 3 1

Logic Programming Techniques for Reasoning with Probabilistic Ontologies

UML. Design Principles.

Weighted Abstract Dialectical Frameworks

Propositional Definite Clause Logic: Syntax, Semantics and Bottom-up Proofs

REASONING UNDER UNCERTAINTY: CERTAINTY THEORY

CS206 Lecture 21. Modal Logic. Plan for Lecture 21. Possible World Semantics

CS 380: ARTIFICIAL INTELLIGENCE

Intermediate Logic. Natural Deduction for TFL

Aggregation and Non-Contradiction

Fuzzy Description Logic Programs under the Answer Set Semantics for the Semantic Web

A Logic Primer. Stavros Tripakis University of California, Berkeley. Stavros Tripakis (UC Berkeley) EE 144/244, Fall 2014 A Logic Primer 1 / 35

4CitySemantics. GIS-Semantic Tool for Urban Intervention Areas

LTCS Report. Decidability and Complexity of Threshold Description Logics Induced by Concept Similarity Measures. LTCS-Report 16-07

The PITA System for Logical-Probabilistic Inference

The underlying structure in Atanassov s IFS

Interval Neutrosophic Sets and Logic: Theory and Applications in Computing

Motivation. From Propositions To Fuzzy Logic and Rules. Propositional Logic What is a proposition anyway? Outline

Lecture 1: Geospatial Data Models

Rule-Based Classifiers

Normal Description Logic Programs as Default Theories

Chapter 1: The Logic of Compound Statements. January 7, 2008

Description Logics. Foundations of Propositional Logic. franconi. Enrico Franconi

Propositional Logic Logical Implication (4A) Young W. Lim 4/11/17

Transcription:

Rfuzzy: An expressive simple fuzzy compiler Víctor Pablos Ceruelo, Susana Muñoz-Hernandez and Hannes Straß Babel Group, Facultad de Informática Universidad Politécnica de Madrid (T.U. of Madrid), Spain http://babel.ls.fi.upm.es IWANN 2009, Salamanca, Spain VPC, SMH, HS (Babel Group, UPM, Spain) Rfuzzy Framework IWANN 09, Salamanca 1 / 13

Motivation (I): What can we model by using Rfuzzy? We are able to model Credibility and Fuzziness. Example of rule: IF cloudy THEN i t m a y r a i n Credibility: Consider that it is cloudy. How much do we trust the rule that says that it may rain? Fuzziness: How much cloudy is it? Can we see the sun? We have different degrees. VPC, SMH, HS (Babel Group, UPM, Spain) Rfuzzy Framework IWANN 09, Salamanca 2 / 13

Motivation (II): Rfuzzy vs Fuzzy Prolog How Rfuzzy reduces Fuzzy Prolog complexity Uses real numbers instead of intervals between real numbers to represent truth values. Answers queries with direct values instead of constraints. Programmer does not have to code variables to manage truth values. How Rfuzzy increases Fuzzy Prolog expressiveness Defines a types extension to limit the set of valid individuals. Allows to define default truth values for subsets of individuals. We do not compare Rfuzzy with other approaches that substitute the SLD-resolution with a fuzzy variant that is able to handle partial truth. The main advantage of our proposal over them is that we can reuse thousands of existing lines of prolog code, and mix fuzzy with crisp resolution. VPC, SMH, HS (Babel Group, UPM, Spain) Rfuzzy Framework IWANN 09, Salamanca 3 / 13

Rfuzzy syntax example I % t y p e d e f o f 1 s t argument o f p r e d i c a t e young : s e t p r o p young/1 person /1. person ( john ). person ( mike ). person ( marcus ). person ( hannes ). person ( susana ). person ( v i c t o r ). % d e f a u l t and c o n c r e t e t r u t h v a l u e s d e c l : d e f a u l t ( young /1, 0). % d e f a u l t : Nobody % i s young young ( john ) value 0. 9. % He i s 11 y e a r s old. young ( mike ) value 0. 8. % He i s 15 y e a r s old. VPC, SMH, HS (Babel Group, UPM, Spain) Rfuzzy Framework IWANN 09, Salamanca 4 / 13

Rfuzzy syntax example II teenager 1 0 9 10 19 20 age : d e f a u l t ( teenager /1, 0). % f u n c t i o n t r u t h v a l u e d e c l a r a t i o n teenager :# ([ (9, 0), (10, 1), (19, 1), (20, 0) ]). VPC, SMH, HS (Babel Group, UPM, Spain) Rfuzzy Framework IWANN 09, Salamanca 5 / 13

Rfuzzy syntax example III : d e f a u l t ( teenager /1, 0). teenager :# ([ (9, 0), (10, 1), (19, 1), (20, 0) ]). : d e f a u l t ( c h i l d /1, 0). c h i l d :# ([ (0, 1), (10, 1), (12, 0) ]). : d e f a u l t ( young /1, 0). young (P) cred (min, 0.3) : max c h i l d (P), teenager (P). % Every one i s young with a t v o f 0.3 Available aggregation operators: minimum, maximum, (inverse) product, (inverse) Lukasiewicz operator. VPC, SMH, HS (Babel Group, UPM, Spain) Rfuzzy Framework IWANN 09, Salamanca 6 / 13

Rfuzzy syntax example IV % Susana s a y s t h a t she i s s t i l l young... young ( susana ) value 0. 7. % But the f a c t i s t h a t a l l the authors are s t i l l % young. ( the p r e v i o u s d e c l a r a t i o n i s removed ) % C o n d i t i o n a l t r u t h v a l u e d e c l a r a t i o n : d e f a u l t ( young /1, 0.7) paper author /1. paper author ( susana ). paper author ( hannes ). paper author ( v i c t o r ). % P r e v i o u s d e f and d e c l o f young : d e f a u l t ( young /1, 0). young (P) cred (min, 0.3) : max c h i l d (P), teenager (P). VPC, SMH, HS (Babel Group, UPM, Spain) Rfuzzy Framework IWANN 09, Salamanca 7 / 13

Queries, Answers and Constructivity On compilation we add a new argument ( V is the truth value arg) % non c o n s t r u c t i v e % c o n s t r u c t i v e? young ( hannes, V).? young (X, V), V 0. 8. V = 0.7? ; V = 0.9, X = john? ; no V = 0.8, X = mike? ; no We say that it is constructive because it does not return a constraint X susana, hannes, victor, marcus. Instead of that it returns the valid values in a Prolog way (i.e. one by one). When looking for the truth value of an individual Rfuzzy returns only one truth value, and it is always the most concrete truth value declared in the program. VPC, SMH, HS (Babel Group, UPM, Spain) Rfuzzy Framework IWANN 09, Salamanca 8 / 13

Rfuzzy Implementation The global compilation process has two preprocessor steps: 1 the Rfuzzy program is translated into CLP(R) constraints by means of the Rfuzzy package and 2 those constraints are translated into ISO Prolog by using the CLP(R) package. RFuzzy program RFuzzy package preprocessing CLP(R) program CLP(R) package preprocessing ISO Prolog program Y We do not create a new SLD-resolution. Instead of that we use prolog SLD resolution. This allows us to mix prolog code with fuzzy prolog code, and reuse a lot of prolog existing code. VPC, SMH, HS (Babel Group, UPM, Spain) Rfuzzy Framework IWANN 09, Salamanca 9 / 13

Example: MYCIN can be modelled by using Rfuzzy IF The s t a i n of the organism i s Gram negative, AND The morphology o f the organism i s rod, AND The a e r o b i c i t y of the organism i s a e r o b i c THEN There i s s t r o n g l y s u g g e s t i v e evidence ( 0. 8 ) t h a t the c l a s s of the organism i s E n t e r o b a c t e r i a c e a e Rules have credibility and facts have a truth value. CF( s t a i n = gram negative ) = 0. 4. CF( morphology = rod ) = 0. 6. CF( a e r o b i c i t y = a e r o b i c ) = 0.4. VPC, SMH, HS (Babel Group, UPM, Spain) Rfuzzy Framework IWANN 09, Salamanca 10 / 13

Conclusions Rfuzzy offers to the users a new framework to represent fuzzy problems over real numbers. Main Rfuzzy advantages over Fuzzy Prolog are a simpler syntax and the elimination of answers with constraints. Its fuzzy values are simple real numbers instead of intervals between real numbers, it hides the management of truth value variables and as it does not answer queries with constraints, answers are always ground terms. This is a more human-readable way of answering questions and it can be used in web forms (constraints can not be used there). Applications: Search Engines, Knowledge Extraction (from databases, ontologies, etc.), Semantic Web, Business Rules, Coding Rules (where the violation of one rule can be given a truth value), etc. VPC, SMH, HS (Babel Group, UPM, Spain) Rfuzzy Framework IWANN 09, Salamanca 11 / 13

Current work? young (X, V). Apply constructive negation to the engine, but first we have to find the correct semantics. What do we want to obtain when we make a query like this one? Have fuzzy relations in the Semantic Web, allowing the user to represent not only who is young or not but the fact that the authors of this paper belong to the young set with a truth value of 0.7.... VPC, SMH, HS (Babel Group, UPM, Spain) Rfuzzy Framework IWANN 09, Salamanca 12 / 13

Questions VPC, SMH, HS (Babel Group, UPM, Spain) Rfuzzy Framework IWANN 09, Salamanca 13 / 13