April20Lecture_till15

# April20Lecture_till15 - CIS 540 Principles of Embedded...

• Notes
• 24

This preview shows pages 1–7. Sign up to view the full content.

CIS 540 Principles of Embedded Computation Spring 2017 Instructor: Rajeev Alur [email protected]

This preview has intentionally blurred sections. Sign up to view the full version.

Difference Bounds Matrix Data structure for representing constraints, where each constraint expresses a bound on difference of values of two variables Suppose clocks are named x 1 , x 2 , … x m Let us introduce a dummy clock x 0 that is always 0. Then instead of the constraint L <= x i <= U, we have L <= x i – x 0 <= U Lower bound constraint L <= x i – x j can be rewritten as upper bound constraint x j – x i <= -L DBM R is (m+1) x (m+1) matrix representing for 0 <= i <= m, for 0 <= j <= m, x i – x j <= R[i,j] Diagonal entries should be 0: x i – x j <= 0 There is a one-to-one correspondence between DBMs and clock- zones Entries of DBM: Integers plus a special symbol Infty (to represent absence of a bound) CIS 540 Spring 2017; Lecture April 20
Canonical DBMs Every canonicalization step does not change the set of clock- valuations that the DBM represents Canonical DBM represents the “tightest” possible constraints If R is canonical, for every i and j, R[i,j] is the least upper bound on the difference x i – x j for clock-valuations satisfying constraints in R Alternative interpretation Consider a graph with m+1 vertices corresponding to x 0 , x 1 , … x m Entry R[i,j] = Cost labeling the edge from vertex x i to x j Canonicalization: Compute costs of shortest paths in this graph R is canonical if R[i,j] is the cost of shortest path from x i to x j CIS 540 Spring 2017; Lecture April 20

This preview has intentionally blurred sections. Sign up to view the full version.

Graph-based representation Given: 1 <= x 1 <= 3; x 2 >= 0; 0 <= x 3 <= 3; x 2 – x 3 = 1; x 2 – x 1 >= 2 X0 X1 X2 X3 X0 0 -1 0 0 X1 3 0 -2 Infty X2 Infty Infty 0 1 X3 3 Infty -1 0 X0 -1 X1 X2 X3 X0 X1 X2 X3 X0 0 -1 -3 -2 X1 2 0 -2 -1 X2 4 3 0 1 X3 3 2 -1 0 -2 -1 1 3 0 0 3 CIS 540 Spring 2017; Lecture April 20
What if constraints are unsatisfiable ? X0 X1 X2 X0 0 0 0 X1 5 0 10 X2 Infty -6 0 Suppose we know: 0 <= x 1 <= 5; 0 <= x 2 <= Infty; 6 <= x 1 – x 2 <= 10 X0 X1 X2 X0 0 -6 0 X1 5 0 10 X2 Infty -6 0 Canonicalization step 1: Compare R[0,1] to R[0,2] + R[2,1], and change to -6 Canonicalization step 2: Compare R[1,1] to R[1,0] + R[0,1], and change to -1 X0 X1 X2 X0 0 -6 0 X1 5 -1 10 X2 Infty -6 0 R[1,1] entry says x 1 – x 1 <= -1, not possible! Means original constraints unsatisfiable! CIS 540 Spring 2017; Lecture April 20

This preview has intentionally blurred sections. Sign up to view the full version.

Canonicalization Algorithm Problem same as computing shortest paths among all pairs of vertices in a directed graph Need to account for detection of negative cycles (that is, unsatisfiable constraints) Classical algorithm with time complexity cubic in the number of vertices/clocks CIS 540 Spring 2017; Lecture April 20
This is the end of the preview. Sign up to access the rest of the document.
• Fall '09
• ALUR
• Graph Theory, Cardiac pacemaker, Artificial pacemaker, Infty

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern