Conflict resolution. Background Input: set of « fireable instances » –Instance = (, substitution) –Substitution = {(c i /?x i )} for all ?x i in Var(rule)

Slides:



Advertisements
Similar presentations
$100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200.
Advertisements

$100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300.
$100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500.
Types of Image Enhancements in spatial domain
Pulleys at an Angle. FBD-S m 1 = 100 kg m 2 = 300 kg 30° vivi 0 t10 s θ30° µ0 m1m1 100 kg m2m2 300 kg No Friction.
$100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300.
Warunki w sieciach liniowych
parallelogramma rettangolo rombo triangolo quadrato.
Hosted by Type your name here Choice1Choice 2Choice 3Choice
$100 $400 $300$200$400 $200$100$100$400 $200$200$500 $500$300 $200$500 $100$300$100$300 $500$300$400$400$500.
$100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200.
Category 1 Category 2 Category 3 Category 4 Category.
Dont Forget... Contestants …Always phrase your answers in the form of a question!
Category Category Category Category Category.
Mr. Smith Cat. 1Cat. 2Cat. 3Cat
$100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300.
£1 Million £500,000 £250,000 £125,000 £64,000 £32,000 £16,000 £8,000 £4,000 £2,000 £1,000 £500 £300 £200 £100 Welcome.
1 Constraints and Updating Hugh Darwen CS252.HACD: Fundamentals of Relational Databases Section 7: Constraints.
Verification of DSMLs Using Graph Transformation: A Case Study with Alloy Zekai Demirezen 1, Marjan Mernik 1,2, Jeff Gray 1, Barrett Bryant 1 1 Department.
Feedback (2) Section
Feedback loop (CV changes input) SP Controller Gc Plant Gp Sensor Gs E MV (Manipulated Variable CV Controlled Variable +-+- S.
Chapter 6.1 Combining Supply and Demand Supply + Demand and balance
Génération de jeux de test pour les programmes de règles 1 er juillet 2009 ILOG Chair of Software Engineering Freiburg Universität Bruno Berstel
Writing Linear Models from Word Problems
Access Control CS461/ECE422 Fall Reading Material Chapter 4 through section 4.5 Chapters 23 and 24 – For the access control aspects of Unix and.
Compressive Data Gathering for Large-Scale Wireless Sensor Networks
Rule-based representation
$100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300.
Category Heading Category Heading Category Heading.
Formal models of design 1/28 Radford, A D and Gero J S (1988). Design by Optimization in Architecture, Building, and Construction, Van Nostrand Reinhold,
Desk Checking. Desk checking is a manual (non computerised) technique for checking the logic of an algorithm. The person performing the desk check effectively.
Blank Jeopardy. Category #1 Category #2 Category #3 Category #4 Category #
CRC Microeconomics1. 10/22/2014CRC Microeconomics2 What did you study last time?  what is meant by an oligopoly?  what is meant by a duopoly?  how.
The "if structure" is used to execute statement(s) only if the given condition is satisfied.
Team 4Team 5 Team 6 Team 1Team 2Team 3 Round 2 Final Jeopardy Round 1.
Prof. Sin-Min Lee Department of Computer Science
Power & Energy in Electric Circuits Series Circuits
Control Structure There are two kind of control structure in GWBASIC one is iteration/loop or repetitive and second make decision/condition. Iteration/Loop.
(define (make-rat n d) (if (and (number? n) (number? d) (not (= d 0))) (cons n d) (error "cannot make a rat with denominator 0"))) (define (numer r) (head.
Repeating Structures Do While Loops. Do While Loop While loops have a test condition before the loop –This means that java will test the condition before.
Summary of the lecture We discussed –variable scope –instance variable declarations –variable lifetime.
A loop is a repetition control structure. it causes a single statement or block to be executed repeatedly What is a loop?
1 Lecture 14 Chapter 6 Looping Dale/Weems/Headington.
Functions Section 4.3. Last week, we were introduced to procedures Procedures are used in support of top- down program design. –They are used to create.
CS 561, Session 25 1 Introduction to CLIPS Overview of CLIPS Facts Rules Rule firing Control techniques Example.
RELATIONS AND FUNCTIONS
Formal Methods in Software Engineering Credit Hours: 3+0 By: Qaisar Javaid Assistant Professor.
Rules of Divisibility 1 - always a factor. 2 - if the last digit is a 0, 2, 4, 6, or if the sum of the digits is divisible by if the last.
Recursive Algorithms &
Formal Semantics for Rule-Based Systems 報告者:黃怡玲 指導教授:丁德榮.
Advanced SQL: Triggers & Assertions
Data Tables for Sensitivity Analysis JCHP Break Even Analysis.
Ch. 13 Ch. 131 jcmt CSE 3302 Programming Languages CSE3302 Programming Languages (notes?) Dr. Carter Tiernan.
Artificial Intelligence Lecture No. 19 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
4) Design the logic to control the motor on a simple remote control car. There are two buttons on the remote control for the motor. If neither button is.
3/14/20161 SOAR CIS 479/579 Bruce R. Maxim UM-Dearborn.
The CLIPS Expert System Shell Dr Nicholas Gibbins
May 5, 2004Slide 2 OmnAuto TMS Solution May 5, 2004Slide 3 OmnAuto TMS Dataflow.
Summary for final exam Agent System..
Debugging and Testing Hussein Suleman March 2007 UCT Department of Computer Science Computer Science 1015F.
Recursive stack-based version of Back-chaining using Propositional Logic
Think What will be the output?
1.6 Represent Functions as Rules and Tables
Algorithms Take a look at the worksheet. What do we already know, and what will we have to learn in this term?
CS 431 – February 28, 2005 Carl Lagoze – Cornell University
Input-Output-Process Demo
An algebraic expression that defines a function is a function rule.
CIS 488/588 Bruce R. Maxim UM-Dearborn
Chapter 9 L9-6 Notes: Functions.
Lesson 3.3 Writing functions.
Presentation transcript:

Conflict resolution

Background Input: set of « fireable instances » –Instance = (, substitution) –Substitution = {(c i /?x i )} for all ?x i in Var(rule) –Firable = instantiated condition is satisfied Output: set of instances to be fired E.g. –Remove according to « no-repeat » –Order according to XYZ –Keep only first

No-repeat Proposal 1 –Remove instance such that rule has already been fired with same instantiated action part and a instance of the rule with that same instantiated action part has always been firable since

Example 1 Rules –R1: IF Alarm(?x) THEN printRed(« Alarm ») Facts –Alarm(D1) –Alarm(D2) Execution –Cycle1: Fireable = {(R1 {(D1/?x)}), (R1 {(D2/?x)}} FireOne: (R1 {(D1/?x)}) Alarm –Cycle2: Fireable = {(R1 {(D1/?x)}), (R1 {(D2/?x)}} No-repeat: Fireable = {} Stop!

Example 1 Rules –R1: IF Alarm(?x) THEN printRed(« Alarm ») Facts –Alarm(D1) –Alarm(D2) Execution –Cycle1: Fireable = {(R1 {(D1/?x)}), (R1 {(D2/?x)}} FireAll: {(R1 {(D1/?x)}), (R1 {(D2/?x)}} Alarm Alarm –Cycle2: Fireable = {(R1 {(D1/?x)}), (R1 {(D2/?x)}} No-repeat: Fireable = {} Stop!

Example 1 Rules –R1: IF Alarm(?x) THEN printRed(« Alarm ») –R2: IF Alarm(?Y) THEN printRed(« Alarm ») Facts –Alarm(D1) –Alarm(D2) Execution –Cycle1: Fireable = {(R1 {(D1/?x)}), (R1 {(D2/?x)}), (R2 {(D1/?y)}), (R2 {(D2/?Y)})} FireOne (R1 {(D1/?x)})Alarm –Cycle2: Fireable = {(R1 {(D1/?x)}), (R1 {(D2/?x)}), (R2 {(D1/?y)}), (R2 {(D2/?Y)})} No-repeat: Fireable = {(R2 {(D1/?y)}), (R2 {(D2/?Y)})} FireOne (R2 {(D1/?x)})Alarm –Cycle3: Fireable = {(R1 {(D1/?x)}), (R1 {(D2/?x)}), (R2 {(D1/?y)}), (R2 {(D2/?Y)})} No-repeat: Fireable = {} Stop

Example 2 Rules –R1: ?s#Sensor IF ?s[reading->?v] & ?v>100 THEN printRed (« Alarm » ?s) Facts –S1[value->200] Execution –Cycle1: Fireable = {(R1 {(S1/?s)})} FireOne (R1 {(S1/?s)}) Alarm S1 –Cycle2: Fireable = {(R1 {(S1/?s)})} No-repeat: Fireable = {} Stop!

Example 3 Rules –R1: ?s#Sensor IF ?s[reading->?v] & ?v>100 THEN printRed (« Alarm » ?s) Facts –S1[value->200] Execution –Cycle1: Facts: S1[value->200] Fireable = {(R1 {(S1/?s)})} FireOne (R1 {(S1/?s)}) Alarm S1 –Cycle2: Facts: S1[value->300] Fireable = {(R1 {(S1/?s)})} No-repeat: Fireable = {} Stop!

Example 4 Rules –R1: ?s#Sensor IF ?s[reading->?v] & ?v>100 THEN printRed (« Alarm » ?s ?v) Facts –S1[value->200] Execution –Cycle1: Facts: S1[value->200] Fireable = {(R1 {(S1/?s), (200/?v)})} FireOne (R1 {(S1/?s), (200/?v)}) Alarm S1 200 –Cycle2: Facts: S1[value->300] No-repeat: Fireable = {(R1 {(S1/?s), (300/?v)})} FireOne (R1 {(S1/?s), (300/?v)}) Alarm S1 300 –…

No-repeat Proposal 2 –Remove instance such that rule has already been fired with same instantiation for listed variables and a instance of the rule with that same instantiation for listed variables has always been firable since.

Example 4 (specify variables) Rules –R1: (no-loop: ?s) ?s#Sensor IF ?s[reading->?v] & ?v>100 THEN printRed (« Alarm » ?s ?v) Facts –S1[value->200] Execution –Cycle1: Facts: S1[value->200] Fireable = {(R1 {(S1/?s), (200/?v)})} FireOne (R1 {(S1/?s), (200/?v)}) Alarm S1 200 –Cycle2: Facts: S1[value->300] No-repeat: Fireable = {} Stop!

No-repeat Proposal 2 –Remove instance such that rule has already been fired with same instantiation for listed variables and a instance of the rule with that same instantiation for listed variables has always been firable since. –Keys only?

Example 5 Rules –R1: ?e#employee IF ?e[salary->?s] & ?s>100 THEN Retract(?e[salary->?s]), Assert(?e[salary->?s*1.1]) Execution –Cycle1: Facts: John[salary->50] Fireable = {(R1 {(S1John/?e), (50/?s)})} FireOne (R1 {(S1John/?e), (50/?s)}) Facts: John[salary->55] –Cycle2: Facts: John[salary->55] Fireable = {(R1 {(S1John/?e), (55/?s)})} FireOne (R1 {(S1John/?e), (55/?s)}) Facts: John[salary->60.5] –…

No-repeat Proposal 3 –Remove instance such that rule has already been fired with same [instantiated action part| instantiation for listed variables] and a instance of the rule with that same [instantiated action part | instantiation for listed variables] has always been firable since, where the new values of MODIFYed variables are carried on.

Example 5 (modified) Rules –R1: ?e#employee IF ?e[salary->?s] & ?s>100 THEN Retract(?e[salary->?s]), Assert(?e[salary->?s*1.1]) Execution –Cycle1: Facts: John[salary->50] Fireable = {(R1 {(S1John/?e), (50/?s)})} FireOne (R1 {(S1John/?e), (50/?s)}) Facts: John[salary->55] Fired = {(R1 {(S1John/?e), (55/?s)})} –Cycle2: Facts: John[salary->55] No-repeat: Fireable = {} Stop!

Problems with import No-repeat on single rules No-repeat on variables