Skip to content

Conversation

@jerhard
Copy link
Member

@jerhard jerhard commented Jul 11, 2023

The implementation of MapTop.join uses a short-circuit optimization that relies on the fact that join x x = x

let join_with_fct f m1 m2 =
if m1 == m2 then m1 else map2 f m1 m2
let join = join_with_fct Range.join

Issue #1091 was caused by the join operation for unions in ValueDomain not satisfying the join x x = x property.
In the from-scratch run, when physical equality was given, the join of two abstract unions of the form $(field: \bot, value: \bot)$ yielded $(field: \bot, value: \bot)$. In the incremental run, the physical equality of the maps containing the Union abstraction was no longer given, and the result of the join is $(field: \bot, value: \top)$.

Therefore, this PR changes the behavior of the join and widen operations for the UnionDomain, such that join x x = x and widen x x = x is ensured.

Fixes #1091.

Issue #1091 was caused by the join/widen (and corresponding smart operations)
for unions in ValueDomain not return the same element.
The optimization in PMap that returns the unchanged map when two
physically identical maps were joined was thus yielding a different value in the
from-scratch run compared to the incremental run.
@sim642 sim642 self-requested a review July 11, 2023 14:48
@sim642 sim642 added the bug label Jul 11, 2023
@sim642 sim642 added this to the v2.2.0 milestone Jul 18, 2023
@michael-schwarz michael-schwarz merged commit f938a8e into master Jul 18, 2023
@michael-schwarz michael-schwarz deleted the issue_1091 branch July 18, 2023 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fixpoint not reached in some incremental runs on chrony

4 participants