@@ -28,31 +28,32 @@ Our goal is to find **a new family of relational abstract domains that are cheap
28
28
For this, a central question is ** can we compute the expensive transitive closure much more cheaply?** The answer is yes, if we assume that the relation obtained on each path between
29
29
two variables is always the same. This allows eliminating the vast majority of relations, ** we only need to
30
30
store a spanning tree** and can still recover any arbitrary relation in amortized almost-constant time, using a variation
31
- of the efficient [ union-find] ( https://en.wikipedia.org/wiki/Disjoint-set_data_structure ) data structure, that we call the ** labeled union-find** .
31
+ of the efficient [ union-find] ( https://en.wikipedia.org/wiki/Disjoint-set_data_structure ) data structure, that we call the ** labeled union-find** .
32
32
33
33
## The labeled union-find data structure
34
34
35
35
<img src="/assets/publications/imgs/2025-pldi-labeled-uf-simple.svg"
36
36
style="width:400px; display: block ; margin-left: auto ; margin-right: auto ">
37
37
38
38
Similarly to the classical union-find, the labeled union-find
39
- represent a rooted tree (where each node points to its parents). The
40
- extension consists in adding labels $$ \mathbb L $$ to the parent edges,
39
+ is a rooted forest, i.e. a set of trees where each node points to its parent.
40
+ The
41
+ extension adds labels $$ \mathbb L $$ to the parent edges,
41
42
representing relations. In the figure above, these relations are
42
43
affine constraints between two variables (of the form $$y = a* x +
43
44
b$$). From this labeled union-find, it is easy to infer the relation
44
- between any two variables (if there is one) by composing or reversing
45
+ between any two variables (if there is one, i.e. when they are in the same tree ) by composing or reversing
45
46
relations. For instance, from $$ z = y - 1 $$ and $$ y = 2 * r $$ , we can
46
47
deduce that $$ z = 2*r - 1 $$ . While computing this, we can shrink the
47
- distance between the element and the root of the tree, doing the
48
+ distance between the element $$ z $$ and the root of the tree $$ r $$ , doing the
48
49
analog of path compression in the union-find structure.
49
50
50
51
Computing the relation between some variables may also require
51
- inversing relations; for instance, the relation between $$ y $$ and $$ x $$ is
52
+ inverting relations; for instance, the relation between $$ y $$ and $$ x $$ is
52
53
the composition of $$ y = 2*r $$ and the inverse of $$ x = 3*r+2 $$ ,
53
- i.e. $$ r = x/ 3 - 2/ 3 $$ , yielding $$ y = 2/ 3 x - 4/ 3 $$ . In general, the
54
- labels thus have an assocative composition operation, and an inverse
55
- operation, i.e., must have a a [ ** group
54
+ i.e. $$ \displaystyle r = \frac x 3 - \frac 2 3$$ , yielding $$ \displaystyle y = \frac 2 3 x - \frac 4 3$$ . In general, the
55
+ labels thus have an associative composition operation, and an inverse
56
+ operation. Formally, labels must have a [ ** group
56
57
structure** ] ( https://en.wikipedia.org/wiki/Group_(mathematics) ) . This
57
58
requirement also derives fairly naturally from our previous assumption
58
59
(same relation on each path).
@@ -64,7 +65,7 @@ When using labeled union-find to represent abstract relations between
64
65
variables, the soundness of operations places strong requirements on
65
66
the relations that can be used. We show that these relations ** must
66
67
correspond to injective functions** between equivalence classes. This
67
- allows to discover many suitable example of relations, such as:
68
+ allows to discover many suitable examples of relations, such as:
68
69
69
70
- Constant offset: relations of the form $$ y = x + b $$ for some constant $$ b $$
70
71
- Two Value per Equality (TVPE): $$ ax + by + c = 0 $$ , with $$ a,b,c \in \mathbb Z^3 $$ , $$ \mathbb Q^3 $$ or $$ \mathbb R^3 $$
@@ -93,10 +94,10 @@ The abstraction has also been implemented in the [Colibri2](https://colibri.fram
93
94
94
95
## Combining with other abstractions
95
96
96
- Labeled union-find groups variables into related class , which each
97
- point to the same representative. This can be used both to provide new
98
- information to other parts of the analysis, or to simplify other
99
- abstractions: instead of computing relations between individual
97
+ Labeled union-find groups variables into related classes , which each
98
+ point to the same representative. This can not only be used to provide new
99
+ information to other parts of the analysis, but also simplify other
100
+ abstractions. Instead of computing relations between individual
100
101
variables, we can just compute relations between groups of variables
101
102
related by labeled union-find.
102
103
@@ -109,7 +110,7 @@ updated at once any time new information is learned.
109
110
<img src="/assets/publications/imgs/2025-pldi-factorization.svg"
110
111
style="width:700px; display:block; margin-left:auto; margin-right:auto">
111
112
<center>
112
- Fig. Using labeled union-find to factorize a non-relational abstraction. On the left, we associate an interval
113
+ Fig. Using labeled union-find to factorize a non-relational abstraction. On the left, we associate an interval
113
114
to every node in the graph. On the right, we can group related nodes and only store an interval value
114
115
on the representative. The values of other nodes are recomputed as needed without precision loss.
115
116
</center>
0 commit comments