Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring to support control sync rework #387

Merged
merged 27 commits into from
Jun 11, 2024
Merged

Conversation

danmatichuk
Copy link
Collaborator

@danmatichuk danmatichuk commented May 14, 2024

This adds more robust support for a number of edge cases that occur when attempting to resolve control flow synchronization between programs. The major changes are:

  1. Generalizes the work queue to contain a set of work items, which may contain directives to merge or split the analysis. This simplifies the needed processing when a control flow split/merge is encountered, since the relevant actions are simply queued rather than handled immediately. When a sync/cut address is encountered, all possible merge combinations are added to the queue and then handled one by one through normal queue processing.

  2. Generalizes synchronization points to either be at the start of a node, or at a subset of the exits to the node. This preserves the functionality where the semantics of the final transition from the single-sided to two-sided analysis are used when generating the initial equivalence domain, but also supports cases where that can't be represented. This can happen for two reasons:
    a) One of the sides of the analysis takes zero steps between the desync and sync points.
    b) One (or both) sides of the analysis return directly to the synchronization point following a function call.
    When queuing a merge operation in either of these cases, the already-synchronized exit point (each starting at exactly one of the provided sync addresses) for both programs is considered to be the first node in the merged two-sided analysis.

fixes issue where GUI would hang when trying to
navigate to display a choice tree (i.e. prompt)
this is a forward-looking change to support more
expressive control flow synchronization
this is an intermediate step in adding additional ways that a node
can be queued to be processed - in particular, handling node merge
logic via the scheduler
This clears up some of the ambiguity in the SyncPoint data which otherwise
had lots of implicit assumptions about the run-time contents of the NodeEntry
for each sync point

A SingleNodeEntry is functionally equivalent to a NodeEntry that's
annotated with the fact that it's single-sided
…r patched

this is essentially the same as Const, but useful for cases where
we want to establish OrdF or TestEquality
this now builds, and changes the control flow synchronization
to occur as a first-class operation that is explicitly scheduled

this provides some flexibility for handling additional cases
for mismatched control flow, but this is still work in progress
@thebendavis thebendavis linked an issue May 29, 2024 that may be closed by this pull request
@thebendavis thebendavis mentioned this pull request May 31, 2024
@danmatichuk danmatichuk marked this pull request as ready for review June 7, 2024 17:47
@danmatichuk danmatichuk merged commit aaf7726 into master Jun 11, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generalize and stabilize control flow alignment
1 participant