Skip to content

Removing global state#635

Merged
marcoeilers merged 8 commits into
masterfrom
meilers_noglobalstate
Sep 1, 2022
Merged

Removing global state#635
marcoeilers merged 8 commits into
masterfrom
meilers_noglobalstate

Conversation

@marcoeilers

@marcoeilers marcoeilers commented Aug 22, 2022

Copy link
Copy Markdown
Contributor

Removing global state in order to be able to run multiple instances of Silicon in parallel (which several frontends would like to do). Depends on Silver PR viperproject/silver#600

We're making the following changes:

  • Adapting to Silver changes, in particular, the fact that FastParser is no longer a global object
  • Moving Verifier.program, Verifier.functionData, and Verifier.predicateData to the State class, and passing them from there through the code where needed.
  • Verifier.inputFile is removed completely. We're explicitly setting it in the MultiRunRecorder and passing it to the runVerifier method; it's not used anywhere else.

Note that Verifier.config remains global, since I'm assuming that we don't want to run Silicon with different settings at the same time, and it's referenced all over the place

@mschwerhoff mschwerhoff left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for removing the global state! Looks all good to me, modulo the few (and exciting) comments I left.

Comment thread src/main/scala/reporting/MultiRunRecorder.scala
Comment thread src/main/scala/verifier/DefaultMasterVerifier.scala Outdated
Comment thread src/main/scala/verifier/DefaultMasterVerifier.scala Outdated
Comment thread src/main/scala/verifier/DefaultMasterVerifier.scala Outdated
@marcoeilers marcoeilers merged commit edcf130 into master Sep 1, 2022
@marcoeilers marcoeilers deleted the meilers_noglobalstate branch February 18, 2023 11:12
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.

2 participants