Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 11. Certification Certification – algorithms/methods to verify that a program is safe. Used when restriction does not work because we use a combination.

Similar presentations


Presentation on theme: "1 11. Certification Certification – algorithms/methods to verify that a program is safe. Used when restriction does not work because we use a combination."— Presentation transcript:

1 1 11. Certification Certification – algorithms/methods to verify that a program is safe. Used when restriction does not work because we use a combination of queries and constraint types that are not always safe. Advantage: more powerful queries than with restriction Disadvantage: harder to use than restriction

2 2 Certification methods: Constant propagation – some attributes of input relations are known to be always constants and this information is recursively propagated to other relations/rules in the query. Example: Textbook example 4.1.4 has Go2(x,y,c) where c is a constant. Therefore in the second rule the constraint t ≥ t2 + c is a half-addition constraint. Since Datalog with half-addition constraints is safe by restriction the Travel query is also safe. Note the reduction to restriction in the above.

3 3 Variable independence – knowing the value of a variable does not improve our knowledge of the value of another variable. Example: x1 and x2 are independent variables in: x1 ≥ 30, x2 ≤ 50 they are dependent variables in: x1 + x2 > 0 If a constraint tuple contains only equality, inequality, lower and upper bound constraints, then the variables in it are independent.

4 4 Example: Not_Fastest(x, y, t 2 ) :–Travel(x, y, t 1 ), Travel(x, y, t 2 ), t 1 < t 2. Fastest(x, y, t) :– Travel(x, y, t), not Not_Fastest(x, y, t). Suppose we know that the variables are independent in each constraint tuple of Travel because it contains only equality, inequality, lower and upper bound constraints. Then they are also independent in Not_Fastest, which also only contains those types of constraints. Hence by restriction its negation has a closed-form, and Fastest can be evaluated.

5 5 Monotonicity – an attribute value is monotone increasing Example: Apply monotonicity to the Subsetsum query in the Textbook. Acyclicity – evaluation follows the edges in a directed acyclic graph. Example: Apply acyclicity to the polluted river example in the Textbook.

6 6 Tightened bounds – the bound of a negative constraint increases in each rule application, while the variables remain bounded from below by some constant. Tightened coefficients – coefficients in a negative linear constraint growing faster than the bound.

7 7 Vector addition system – a constraint automaton where each transition only adds constants to each state variable, which are always non-negative. Example: Tourist constraint automaton. Positive stochastic matrix multiplication – a constraint automaton where each transition only multiplies by a positive matrix the state variables to get the new state. Example: The water cycle constraint automaton.


Download ppt "1 11. Certification Certification – algorithms/methods to verify that a program is safe. Used when restriction does not work because we use a combination."

Similar presentations


Ads by Google