Efficient Evaluation of History-based Policies Imperial College London, UK IBM Watson Research, US.

Slides:



Advertisements
Similar presentations
A Randomized Satisfiability Procedure for Arithmetic and Uninterpreted Function Symbols Sumit Gulwani George Necula EECS Department University of California,
Advertisements

Global Value Numbering using Random Interpretation Sumit Gulwani George C. Necula CS Department University of California, Berkeley.
PDAs Accept Context-Free Languages
Precise Interprocedural Analysis using Random Interpretation Sumit Gulwani George Necula UC-Berkeley.
Adders Used to perform addition, subtraction, multiplication, and division (sometimes) Half-adder adds rightmost (least significant) bit Full-adder.
1 Parametric Heap Usage Analysis for Functional Programs Leena Unnikrishnan Scott D. Stoller.
1 Knowledge Representation Introduction KR and Logic.
1 Knowledge and reasoning – second part Knowledge representation Logic and representation Propositional (Boolean) logic Normal forms Inference in propositional.
Advanced SQL Topics Edward Wu.
Logical Model and Specification of Usage Control Xinwen Zhang, Jaehong Park Francesco Parisi-Presicce, Ravi Sandhu George Mason University.
Flexible access control policy specification with constraint logic programming Steve Barker, Peter J. Stuckey Presenter: Vijayant Dhankhar.
Recursive policies Expressive historical conditions with constraints Fine-grained defaults Abstract language for policies at all levels of abstraction.
Annual Conference of ITA ACITA 2009 Efficient Evaluation of History-based Policies Jiefei Ma 1, Jorge Lobo 2, Alessandra Russo 1, Emil Lupu 1, Seraphin.
Jörg Drechsler (Institute for Employment Research, Germany) NTTS 2009 Brussels, 20. February 2009 Disclosure Control in Business Data Experiences with.
0 - 0.
MULT. INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
Addition Facts
Limitations of the relational model 1. 2 Overview application areas for which the relational model is inadequate - reasons drawbacks of relational DBMSs.
1 Term 2, 2004, Lecture 9, Distributed DatabasesMarian Ursu, Department of Computing, Goldsmiths College Distributed databases 3.
Vehicle Routing & Job Shop Scheduling: Whats the Difference? ICAPS03, June 13, 2003 J. Christopher Beck, Patrick Prosser, & Evgeny Selensky Dept. of Computing.
Overview of Lecture Partitioning Evaluating the Null Hypothesis ANOVA
CS4026 Formal Models of Computation Part II The Logic Model Lecture 1 – Programming in Logic.
Dr Alwyn Barry Dr Joanna Bryson
CM20145 Transactions & Serializability
Polygon Scan Conversion – 11b
Modeling Software Systems Lecture 2 Book: Chapter 4.
1 Constraints and Updating Hugh Darwen CS252.HACD: Fundamentals of Relational Databases Section 7: Constraints.
Dr. A.I. Cristea CS 319: Theory of Databases: FDs.
Programming Language Concepts
Evaluating Window Joins over Unbounded Streams Author: Jaewoo Kang, Jeffrey F. Naughton, Stratis D. Viglas University of Wisconsin-Madison CS Dept. Presenter:
1 Outline relationship among topics secrets LP with upper bounds by Simplex method basic feasible solution (BFS) by Simplex method for bounded variables.
Introduction A function is called higher-order if it takes a function as an argument or returns a function as a result. twice :: (a  a)  a  a twice.
Order of Operations Lesson
Week 2 The Object-Oriented Approach to Requirements
CSE 5317/4305 L9: Instruction Selection1 Instruction Selection Leonidas Fegaras.
Software change management
1 Washington, Oct. 2nd 2013 Informal working group: Large Lithium batteries testing RECHARGE & SAFT.
Programming with Alice Computing Institute for K-12 Teachers Summer 2011 Workshop.
Preparing a Decision Table
3 Logic The Study of What’s True or False or Somewhere in Between.
Online Algorithm Huaping Wang Apr.21
A Survey of Web Cache Replacement Strategies Stefan Podlipnig, Laszlo Boszormenyl University Klagenfurt ACM Computing Surveys, December 2003 Presenter:
Proposal by CA Technologies, IBM, SAP, Vnomic
From Handbook of Temporal Reasoning in Artificial Intelligence By Jan Chomicki & David Toman Temporal Databases Presented by Leila Jalali CS224 presentation.
Chapter 2 Section 3.
the Entity-Relationship (ER) Model
Ch. 1: Number Relationships
Optimization 1/33 Radford, A D and Gero J S (1988). Design by Optimization in Architecture, Building, and Construction, Van Nostrand Reinhold, New York.
Lecture plan Outline of DB design process Entity-relationship model
Combine Like Terms. Simplify the Given Expression Below:
Functional Dependencies and Normalization for Relational Databases
Addition 1’s to 20.
Checking  -Calculus Structural Congruence is Graph Isomorphism Complete Victor Khomenko 1 and Roland Meyer 2 1 School of Computing Science, Newcastle.
Copyright © Cengage Learning. All rights reserved.
Chapter 2 Entity-Relationship Data Modeling: Tools and Techniques
Week 1.
February 12, 2007 WALCOM '2007 1/22 DiskTrie: An Efficient Data Structure Using Flash Memory for Mobile Devices N. M. Mosharaf Kabir Chowdhury Md. Mostofa.
1 Chapter 3:Operators and Expressions| SCP1103 Programming Technique C | Jumail, FSKSM, UTM, 2006 | Last Updated: July 2006 Slide 1 Operators and Expressions.
Foundations of Data Structures Practical Session #7 AVL Trees 2.
Lial/Hungerford/Holcomb/Mullins: Mathematics with Applications 11e Finite Mathematics with Applications 11e Copyright ©2015 Pearson Education, Inc. All.
Introduction to Recursion and Recursive Algorithms
1 Functions and Applications
Tree Clustering for Constraint Networks 1 Chris Reeson Advanced Constraint Processing Fall 2009 By Rina Dechter & Judea Pearl Artificial Intelligence,
Techniques for proving programs with pointers A. Tikhomirov.
Chapter 5 The Mathematics of Diversification
Overload Scheduling in Real-Time Systems
Fast Algorithms For Hierarchical Range Histogram Constructions
Ch. 13 Ch. 131 jcmt CSE 3302 Programming Languages CSE3302 Programming Languages (notes?) Dr. Carter Tiernan.
32nd International Conference on Very Large Data Bases September , 2006 Seoul, Korea Efficient Detection of Empty Result Queries Gang Luo IBM T.J.
Onlinedeeneislam.blogspot.com1 Design and Analysis of Algorithms Slide # 1 Download From
Presentation transcript:

Efficient Evaluation of History-based Policies Imperial College London, UK IBM Watson Research, US

History-based Policies 2 Policies are widely used among ITA projects –e.g. Sensor Fabric, Gaian Database Policies frequently use historical conditions depending on past system states –Example 1: A device is permitted to charge its battery if the power level was below 90% anytime in the past 5 minutes. –Example 2: X is not allowed to access radio R1 if X has accessed radio R2, and R1 and R2 were assigned to different missions.

Policies in Abstract Form 3 Such policies can be expressed in an abstract form [Craven et al.]: Example 1: A device is permitted to charge its battery if the power level was below 90% anytime in the past 5 minutes. permitted(X, battery(X), charge, T) holds(power_level(X, L), T1), L < 90%, T – 5 mins T1 T. Example 2: X is not allowed to access radio R1 if X has accessed radio R2 since R1 and R2 were assigned to different missions. denied(X, R1, access, T) do(X, R2, access, T1), T1 < T, holds(mission(R1, M1), T1), holds(mission(R2, M2), T1), M1 M2.

Evaluation of Historical Conditions 4 Evaluation of historical conditions at current time requires past system states, i.e. a system execution history A naïve approach –Stores everything, e.g. all values in the past –Evaluates everything, e.g. temporal constraints...92%91%90%89%88%87%86%85%UAV1s power level …40%39%38% 39%40%41%UAV2s power level … …null m1 Radio1s mission …m1 m2 Radio2s mission …13mins14mins15mins16mins17mins18mins19mins20minstime System states System events …do(uav2,battery(uav2),charge,16mins)do(admin,radio2,assign(m1),18mins)do(soldier1,radio1,access,19mins)…

The Naïve Approach Is Not Acceptable 5 In tactical situations, the policy managed devices often have limited computational power and space, and the permission granting for an action request must be decided fast! Problems of the naïve approach: a full history is often impractical to store temporal reasoning requires extra time Existing policy management systems cant handle history- based policies Policies History request permit action deny action

Our Contributions 6 An approach for fast evaluation of history-based policies by 1.transforming policies to non-history based form, and 2.using the generated monitoring rules to records only what needs to be remember Thus, high level history-based policies can be enforced by systems that have not explicit management of histories, and Evaluation of (History-based Policies + Full History) becomes Evaluation of (Non-history based Policies + Bounded History) Proof sketch for the correctness has been given.

The Ideas 7 Observing that at any time point –a historical state was once a current state –the current state will become a historical state Thus, –the policies tell us what needs to be remember –and the information can be collected at each state Related Work: Chomicki has previously proposed a similar scheme for queries in relational database where temporal constraints are expressed in Past Linear Temporal Logic, e.g. using previously and since –In constrast, out approach is tailored to policy evaluation and can additionally handle explicit time, e.g. T2 – 10 minutes T1 T2

An Example 8 A device is permitted to charge its battery if the power level was below 90% anytime in the past 5 minutes. permitted(X, battery(X), charge, T) holds(power_level(X, L), T1), L < 90%, T – 5 mins T1 T. Steps for handling single historical condition 1. Identify the condition and the temporal constraint 2. Replace them with a current condition (i.e. macro condition): permitted(X, battery(X), charge, T) holds(low_power(X), T). 3. Generate monitoring rules according to the replaced components If power_level(x,l) changes s.t. l < 90%, then records low_power(x) immediately If power_level(x,l) changes s.t. l 90%, then removes low_power(x) in 5 mins 4. Evaluation of the macro condition holds(low_power(X), T) is just a database query for low_power(X) at T.

An Example (cont.) 9 A time line T1T1 T2T2 T 2 +5mins power_level(x,l), l 90% power_level(x,l), l < 90% power_level(x,l), l 90% insert low_power(x) retract low_power(x) ¬ permitted(..., charge) permitted(..., charge)

Notations and Definitions 10 Simplified form of a policy: p(T) h1(T1), …, hn(Tn), C1, …,Cm. –each temporal constraint Ci is of the form Ti # Tj ± c where c is a constant, Ti and Tj are time variables of hi and hj # is one of {=,, } In a policy p(T) …, h(Ti), …, C1, …,Cm. –h is a historical condition w.r.t. p, if C1, …, Cm Ti T –h is a current condition w.r.t. p, otherwise

Basic Cases: Single Condition 11 Case (1): Condition h holds before T – ε p(T) h(T1), T1 T– ε(ε 0) 0 T1 T-ε T Case (2): Condition h holds within T – δ p(T) h(T1), T – δ T1 T (δ 0) 0 T- δ T1 T Case (3): Condition h holds between T – δ and T – ε p(T) h(T1), T –δ T1 T– ε (δ ε 0) 0 T- δ T1 T T- ε NB: when δ = ε = c : Condition h holds exactly at T-c p(T) h(T1), T1 = T – c (c 0)

Basic Cases: Single Condition 12 Case (1): Condition h holds before T – ε p(T) h(T1), T1 T– ε(ε 0) 0 T1 T-ε T Case (2): Condition h holds within T – δ p(T) h(T1), T – δ T1 T (δ 0) 0 T- δ T1 T Case (3): Condition h holds between T – δ and T – ε p(T) h(T1), T –δ T1 T– ε (δ ε 0) 0 T- δ T1 T T- ε NB: when δ = ε = c : Condition h holds exactly at T-c p(T) h(T1), T – c (c 0) Non-history based policy p(T) h(T) Monitoring Rules Case (1): on h changes at T, if h is true, do assert h at T+ε Case (2): on h changes at T, if h is true, do assert h at T on h changes at T, if h is false, do retract h at T+δ Case (3): on h changes at T, if h is true, do assert h at T+ε on h changes at T, if h is false, do retract h at T+δ Monitoring rules can be implemented as Event-Condition-Action rules Negative historical conditions can be handled similarly e.g. negate the condition in the monitoring rules

Simple Cases: Two Conditions 13 Condition h1(T1) is historical to h2(T2) if the time constraints over T1 and T2 matches one of the basic patterns – denoted as T1 « T2. Parallel Composition: p(T) h1(T1), h2(T2), T1 « T, T2 « T. –h1 and h2 can be transformed independently Serial Composition: p(T) h1(T1), h2(T2), T1 « T2, T2 « T. –break it into two p(T) combined_h2(T2), T2 « T. combined_h2(T2) h2(T2), h1(T1), T1 « T2. –can do this recursively if has more than two conditions

Complex Cases: Multiple Conditions 14 Example 3: A rather complex policy rule with multiple historical conditions: p(T) h1(T1), h2(T2), h3(T3), h4(T4), T1 « T, T2 « T, T3 « T2, T4 « T2, T4 « T1, T4 « T3. This can also be handled automatically using the basic and simple cases!

An Automatic Transformation 15 p(T) h1(T1), h2(T2), h3(T3), h4(T4), T1 « T, T2 « T, T3 « T2, T4 « T2, T4 « T1, T4 « T3. 1. Construct and normalise the Directed Connected Graph (DCG) representing the relationships between historical conditions; 2. Topologically sort the DCG: p h2 h3 h1 h4 3. Recursively transform from the DCG (from right to left), e.g. the branch starting from h2 and the branch staring from h1: p(T) combined_h1(T1), T1 « T, combined_h2(T2), T2 « T combined_h1(T1) h1(T1), h4(T4), T4 « T1. combined_h2(T2) h2(T2), h4(T4), T4 « T2, h3(T3), T3 « T2, T4 « T3 4. Each of the final set of rules contains only single historical condition. Transform them and generate the monitoring rules accordingly. Steps:

Special Cases: Durative Conditions 16 Historical condition can also refer to a period that cannot be computed from a single time variable with offsets like Case 3. –define positive/negative durative predicates, e.g. h_Between(T1, T2) h(T3), T1 T3, T3 T2. not_h_Between(T1, T2) not h(T3), T1 T3, T3 T2. Example 4: The server can start data transfer if the client has authenticated itself after the request was made. permitted(X, Y, trans, T) do(Y, X, req, T1), T1 T, doBetween(Y, X, auth, T1, T). –By replacing doBetween/4 with its definition, the policy has two conditions in serial composition: permitted(X, Y, trans, T) do(Y, X, req, T1), do(Y, X, auth, T3, T), T1 T3, T3 T.

Special Cases: Durative Conditions 17 Example 5: The client is allowed to connect to the server if the server has always been in subnet A since start-up. permitted(X, Y, connect, T) do(admin, Y, startup, T1), T1 T, not notHoldsBetween(in(Y, subnetA), T1, T). This forms the 4 th base case and new transformation is required. Thus, we can handle historical conditions expressing always and never temporal operators. Cant flatten the condition Case (4): Condition h2 since condition h1 p(T) h(T1), T1 T, not un_h2_between(T1, T). un_h2_between(T1, T) not h2(T2), T1 T2, T2 T. 0 T1 T2 T Case (4): => p(T) h(T) on h1 changes at T, if both h1 and h2 are true, do assert h at T on h2 changes at T, if both h1 and h2 are true, do assert h at T on h2 changes at T, if h2 is false, do retract all h at T

The Missing Case: T1 – c T2 18 Thus far, we can cover all the temporal constraints of the form T1 {=,, } T2 ± c(c 0) except.. T1 T2 + c Consider the policy p(T) h1(T1), T1 T, h2(T2), T2 T, T1 – c T2. –Problem: none of h1 and h2 is historical to the other Solution – break it into two cases (Case 1 and Case 2): p(T) h1(T1), T1 T, h2(T2), T2 T, T1 T2. p(T) h1(T1), T1 T, h2(T2), T2 T, T1 – c T2 T1. Now we have covered all the cases!

Discussions 19 Syntactic analysis and transformation/monitoring rules generation are simple and automatic Evaluation cost is similar to that for Datalog query Given n history-based policies, each with which has m identified basic historical condition, the maximum space needed for encoding the bounded history is #(Store) = [#(Sub) #(Tar) #(Act) + #(Fluent)] m n –e.g. appr. 100MB for: 100 policies with totally 400 historical conditions, for a domain with 1 million properties, and with objects that can perform 100 different actions. –In practice, the store is much smaller The overall system is efficient in the cases where –Many action requests –Less frequent system changes

Conclusion 20 We have presented a policy transformation framework to allow history-based policies to be enforced: –Historical conditions are identified through syntactic analysis –System monitoring rules are generated to maintain a bounded history pro-actively –Policies are transformed to non-history based and thus the evaluation can be efficient Our framework can deal with conditions expressed with explicit time or in Past Linear Temporal Logic Proof (sketch) of correctness and complexity analysis are given