Skip to content

BSc thesis "Coloring Data Race Interference Graphs"#2061

Draft
sim642 wants to merge 3 commits into
masterfrom
race-coloring
Draft

BSc thesis "Coloring Data Race Interference Graphs"#2061
sim642 wants to merge 3 commits into
masterfrom
race-coloring

Conversation

@sim642

@sim642 sim642 commented Jun 18, 2026

Copy link
Copy Markdown
Member

This is the implementation for an older BSc thesis in Tartu (in Estonian): https://thesis.cs.ut.ee/353b5994-7442-4681-989f-ea3e62ac21c2?language=en

I haven't reviewed the code myself, so this probably needs some cleanup first. I'm opening the PR such that this isn't completely forgotten.

Comment on lines +394 to +396
else
();
()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be needed.

Comment thread src/domains/access.ml
Comment on lines +650 to +667
let coloring_for accs =
match coloring_mode with
| None -> None
| Some "greedy" ->
let graph = InterferenceGraph.of_accesses accs in
Some (InterferenceGraph.Coloring.color_with (module InterferenceGraph.Coloring.Greedy) graph)
| Some "dsatur" ->
let graph = InterferenceGraph.of_accesses accs in
Some (InterferenceGraph.Coloring.color_with (module InterferenceGraph.Coloring.Dsatur) graph)
| Some "rlf" ->
let graph = InterferenceGraph.of_accesses accs in
Some (InterferenceGraph.Coloring.color_with (module InterferenceGraph.Coloring.Rlf) graph)
| Some "optimal" ->
let graph = InterferenceGraph.of_accesses accs in
Some (InterferenceGraph.Coloring.color_with (module InterferenceGraph.Coloring.Optimal) graph)
| Some _ -> None
in
let msgs ?coloring race_accs =

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be a way to do this once instead of matching for every accs?

Comment on lines +2459 to +2465
"race-coloring": {
"title": "warn.race-coloring",
"description": "Group race warnings by graph coloring (none, greedy, dsatur, rlf, optimal).",
"type": "string",
"enum": ["none", "greedy", "dsatur", "rlf", "optimal"],
"default": "none"
},

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be some explanation of what this would achieve from a user-level perspective.

Comment thread src/domains/access.ml
Comment on lines +489 to +495
module Vertex = struct
type t = A.t

let compare = A.compare
let hash = A.hash
let equal = A.equal
end

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can vertices not be A directly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants