ANR-07-SESUR-003 Using Constraints to Verify Properties of Rule Programs Bruno Berstel, University of Freiburg & IBM Michel Leconte, IBM CSTVA10 – April.

Slides:



Advertisements
Similar presentations
Model Checking Base on Interoplation
Advertisements

Symantec 2010 Windows 7 Migration Global Results.
System of linear Equation
Requirements Engineering Processes – 2
Mathematical Preliminaries
3.6 Support Vector Machines
11.1 An Introduction to Sequences & Series p. 651.
ALAK ROY. Assistant Professor Dept. of CSE NIT Agartala
Applications Computational LogicLecture 11 Michael Genesereth Spring 2004.
Fill in missing numbers or operations
Constraint Satisfaction Problems
Slides of the Invited Talk at the CAEPIA Workshop on Planning, Scheduling and Temporal Reasoning (Held on November 11, 2003 by Alexander Nareyek) Note.
BPS - 5th Ed. Chapter 131 Binomial Distributions.
Flexible access control policy specification with constraint logic programming Steve Barker, Peter J. Stuckey Presenter: Vijayant Dhankhar.
Cognitive Radio Communications and Networks: Principles and Practice By A. M. Wyglinski, M. Nekovee, Y. T. Hou (Elsevier, December 2009) 1 Chapter 12 Cross-Layer.
1 Superior Safety in Noninferiority Trials David R. Bristol To appear in Biometrical Journal, 2005.
Introduction to Algorithms 6.046J/18.401J/SMA5503
Tuesday, May 7 Integer Programming Formulations Handouts: Lecture Notes.
Decimals 10ths and 100ths.
I can interpret intervals on partially numbered scales and record readings accurately ? 15 ? 45 ? 25 ? 37 ? 53 ? 64 Each little mark.
Welcome to the Webinar “Live” Review for Final Exam (MAC 1105)
On Sequential Experimental Design for Empirical Model-Building under Interval Error Sergei Zhilin, Altai State University, Barnaul, Russia.
1 Outline relationship among topics secrets LP with upper bounds by Simplex method basic feasible solution (BFS) by Simplex method for bounded variables.
Factoring Quadratics — ax² + bx + c Topic
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
EXAMPLE 4 Solve a multi-step problem SHOPPING
Using Graphs and Tables to Solve Linear Systems 3-1
Rudraksha Ratna Reward Points
The use of Metric Calipers
Graphic Communication
Speaker Name: Robert Stawicki Speaker Title: Assistant Professor Ramapo College of NJ.
Abbas Edalat Imperial College London Contains joint work with Andre Lieutier (AL) and joint work with Marko Krznaric (MK) Data Types.
Geometric Sequences Teacher Notes
4. Inequalities. 4.1 Solving Linear Inequalities Problem Basic fee: $20 Basic fee: $20 Per minute: 5¢ Per minute: 5¢ Budget: $40 Budget: $40 How many.
Complexity Classes: P and NP
1 Integration of Artificial Intelligence and Operations Research Techniques for Combinatorial Problems Carla P. Gomes Cornell University
Is it Mathematics? Linking to Content Standards. Some questions to ask when looking at student performance Is it academic? – Content referenced: reading,
1 Let’s Recapitulate. 2 Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
Continuing Abstract Interpretation We have seen: 1.How to compile abstract syntax trees into control-flow graphs 2.Lattices, as structures that describe.
Lial/Hungerford/Holcomb/Mullins: Mathematics with Applications 11e Finite Mathematics with Applications 11e Copyright ©2015 Pearson Education, Inc. All.
“Reading Measurement Scales”. MNI = marked number interval AMI = adjacent number interval.
Mani Srivastava UCLA - EE Department Room: 6731-H Boelter Hall Tel: WWW: Copyright 2003.
Linear Function A Linear Function Is a function of the form where m and b are real numbers and m is the slope and b is the y - intercept. The x – intercept.
1 Functions and Applications
Claus Brabrand, UFPE, Brazil Aug 11, 2010DATA-FLOW ANALYSIS Claus Brabrand ((( ))) Associate Professor, Ph.D. ((( Programming, Logic, and.
9. Two Functions of Two Random Variables
1 Programming Languages (CS 550) Mini Language Interpreter Jeremy R. Johnson.
Quiz Number 2 Group 1 – North of Newark Thamer AbuDiak Reynald Benoit Jose Lopez Rosele Lynn Dave Neal Deyanira Pena Professor Kenneth D. Lawerence New.
Basic I/O Relationship Knowledge-based: "Tell me what fits based on my needs"
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
1 MODULE name (parameters) “Ontology” “Program” “Properties” The NuSMV language A module can contain modules Top level: parameters less module Lower level.
The Theory of NP-Completeness
1 Abstraction Refinement for Bounded Model Checking Anubhav Gupta, CMU Ofer Strichman, Technion Highly Jet Lagged.
Application of Formal Verification Methods to the analysis of Bearings-only Ballistic Missile Interception Algorithms Eli Bendersky Michael Butvinnik Supervisor:
1 Constraint Programming: An Introduction Adapted by Cristian OLIVA from Peter Stuckey (1998) Ho Chi Minh City.
CH. 1 CH. 2CH. 3CH. 4 CH. 5 Q $100 Q $200 Q $300 Q $400 Q $500 Q $100 Q $200 Q $300 Q $400 Q $500 Final Jeopardy Jeopardy.
MBSat Satisfiability Program and Heuristics Brief Overview VLSI Testing B Marc Boulé April 2001 McGill University Electrical and Computer Engineering.
Jeopardy Category 1 Category 1 Category 2 Category 3 Category 4 Category
Planning as Satisfiability (SAT-Plan). SAT-Plan Translate the planning problem into a satisfiability problem for length n of Plan garb 0 (proposition)present.
For the sequence, describe the pattern and write the next term. 1.) 1, 6, 11, 16 2.) -4, 8, -12, 16 3.) 1.2, 4.2, 9.2, 16.2.
Abstraction and Abstract Interpretation. Abstraction (a simplified view) Abstraction is an effective tool in verification Given a transition system, we.
Chapter 3 Linear Equations and Inequalities
Learning Invariants using Decision Trees and Implication Counterexamples Pranav Garg Amazon India.
Standard Representations of Regular Languages
Instructor: Rajeev Alur
Arithmetic Constraints and Automata
Elementary Questions about Regular Languages
1.5 Linear Inequalities.
Lecture 10, Computer Networks (198:552)
Presentation transcript:

ANR-07-SESUR-003 Using Constraints to Verify Properties of Rule Programs Bruno Berstel, University of Freiburg & IBM Michel Leconte, IBM CSTVA10 – April 10 th, 2010 ANR-07-SESUR-003

What are Business Rules?

ANR-07-SESUR-003 What are business rules? Rule upgrade-to-platinum if the category of the customer is Gold and the value of the shopping cart is more than $1500 then change the category of the customer to Platinum

ANR-07-SESUR-003 Agenda What are Business Rules? Verification –rules as transition constraints –properties as constraint problems Impact on CP Solver –slow propagation –how to cope with it Conclusion

ANR-07-SESUR-003 Example rules Rule gold-discount when category = Gold & value 2000 then discount := discount + 10 Rule platinum-discount when category = Platinum & value 1000 then discount := discount + 15 Rule upgrade when category = Gold & age 60 then category := Platinum Verification

ANR-07-SESUR-003 Conflict (example) Verification cat = Gold age = 65 value = 2500 discount = 0 cat = Gold age = 65 value = 2500 discount = 10 cat = Platinum age = 65 value = 2500 discount = 25 cat = Platinum age = 65 value = 2500 discount = 0 cat = Platinum age = 65 value = 2500 discount = 15 gold-discount upgrade upgrade + platinum- discount platinum-discount cat = Gold age 60 cat := Plat cat = Gold value 2000 disc += 10 cat = Plat value 1000 disc += 15 cat = Gold age 60 value 1000 cat := Plat disc += 15

ANR-07-SESUR-003 Conflict (general principle) Verification initial state final state #1 final state #2 execution #1 = ? execution #2

ANR-07-SESUR-003 Compute the transition constraints for all executions –e.g. ρ(upgrade platinum-discount) is c =Gold a 60 v 1000 c =Plat d = d +15 a =a v =v –interested in maximal executions only –bound length of traces to cope with infinite executions –many unfeasible executions: ρ Look for conflicting executions –s s 1 s s 2 s 1 s 2 –init ρ 1 ρ 2 ξ 1 ξ 2 Is one of these constraint problems satisfiable? –Yes: we found a witness! –No: there is no conflict in the rule program. –Dont know Conflict (general principle) Verification ξ Var

ANR-07-SESUR-003 Conflict (example with constraints) Verification category c age a value v discount d category c 2 age a 2 value v 2 discount d 2 category c 1 age a 1 value v 1 discount d 1 =? gold-discount upgrade platinum-discount upgrade platinum-discount c =Gold a 60 v 1000 c 1 =Plat d 1 = d +15 a 1 =a v 1 =v c =Gold a 60 v 2000 c 2 =Plat d 2 = d +25 a 2 =a v 2 =v v 1000 v 2000 d 1 = d + 15 d 2 = d + 25 d 1 d 2

ANR-07-SESUR-003 Challenging the CP Solver with the conjunction of Large Domains –variables are ranging over machine-representable values –typically 2 32 or 2 64 values for integers Slow Propagation –when the time of domain reduction is proportional to the size of the domain –e.g. d = d + 15 d = d + 25

ANR-07-SESUR-003 Slow convergence of propagation d = d + 15 d = d + 25 d, d [-2 31, ] d = d + 15 d [ , ] d = d + 25 d [-2 31, ] d = d + 15 d [ , ] d = d + 25 d [-2 31, ] d = d + 15 d [ , ] etc. It takes approx steps to reduce the domains to the empty set.

ANR-07-SESUR-003 Slow propagation unsatisfiability x > ux x [-2 31, ] u {0, 1} x y + 1 y = ux x, y [-2 31, ] u {0, 1} x y + 1 y = ux 2 31 steps of interval reduction u = steps of interval reduction to empty domains x [1, ] y [0, ] u {0, 1}

ANR-07-SESUR-003 Slow propagation unsatisfiability x > ux x [-2 31, ] u {0, 1} x y + 1 y = ux x, y [-2 31, ] u {0, 1} x y + 1 y = ux 2 31 steps of interval reduction u = 0 x 1 solution found in steps (best case) x [1, ] y [0, ] u {0, 1}

ANR-07-SESUR-003 Fighting against slow propagation From specialized procedures –linear normalization (x = x +1 ) –cycle detection (x < y y < x) –congruence domains ( 2x+2y = 1) –… To pragmatic techniques –Let the user specify domains (age in [0, 100] ) –Stop the propagation before fix point

ANR-07-SESUR-003 Conclusion Using constraints for rule program verification –to translate rules into transition constraints –to express properties –to find answers using a CP Solver It scales because –problems are small in practice –techniques are put in place to fight against slow propagation