Avoid or generalize global counters used in `TmpLabel` and `Block`
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start by reading the global counter usage for TmpLabel and Block, then inspect CfgGenerator#methodToCfg and the toCfg calls. Review pull request 408 and the linked data-race issue for existing context. Done means selecting and implementing a consistent thread-safe or method-local counter approach for both Silicon and Carbon, with the relevant tests passing.
Written by the indexing model from the issue text.
Description
Created by @fpoli on 2019-01-15 15:09
Last updated on 2019-01-15 15:15
The data races reported in https://github.com/viperproject/silver/issues/256 have been quickly fixed in pull request https://github.com/viperproject/silver/pull/408 by using AtomicIntegers.
The fix works, but several improvements are possible:
- Malte suggested to develop some kind of generic thread-safe counter or symbol generator, usable by both Silicon and Carbon.
- Fábio suggested to use, if it exists, the Scala equivalent of Java's
AtomicInteger. - In my opinion, for the conversion of methods to CFG the global counters can be avoided entirely, by using method-local counters for
TmpLabelandBlock(allocating a symbol generator inCfgGenerator#methodToCfg, and passing it as an additional parameter intoCfgmethod calls). This should avoid the overhead of thread-safe counters.
- Dominant language
- Scala
- Stars
- 100
- Forks
- 53
- Avg merge
- 8h 10m
- Merged PRs (30d)
- 2
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from viperproject/silver
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
viperproject/silver#928 ·
-
bug termination plugin
Difficulty 4/5 3-5 days Newbie friendliness 48/100
viperproject/silver#925 · 1 comment ·
-
Anonymous methods Openenhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
viperproject/silver#922 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
viperproject/silver#918 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
viperproject/silver#913 ·
All issues in viperproject/silver
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
requires-triage
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
apache/datafusion-comet#6060 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
lichess-org/lila#21756 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
salesforce/evalon#10 ·