diffblue / cbmc

C Bounded Model Checker
https://diffblue.github.io/cbmc
Other
821 stars 259 forks source link

Factor out java-specifics from language-agnostic code #1869

Closed peterschrammel closed 2 years ago

peterschrammel commented 6 years ago

I have created a JBMC repository where all the Java stuff will eventually go: https://github.com/diffblue/jbmc

(I'll populate below as my investigations progress)

Step 1a: Move jbmc and java_bytecode/library into new repo (in progress, see master branch of jbmc repo)

Step 1b: Separate out java-diff from goto-diff

Step 1c: Separate out java-analyzer from goto-analyzer

Step 2: Introduce required extension mechanisms into language-agnostic framework.

The following java_bytecode dependencies have been fixed:

The following java_bytecode dependencies must be removed:

There are non-java_bytecode Java dependencies in (exhaustive list):

Step 3: Move java specifics into jbmc repo and update submodules in dependent repos

martin-cs commented 6 years ago

I see value in modularising language dependent things out as much as possible but does it make sense to put this in a separate repository? My experience so far is that keeping things in sync is a pain unless there are some clear, well defined, boundaries / APIs between them.

martin-cs commented 6 years ago

As owner of a non-trivial number of out-of-tree branches, perhaps @tautschnig could say more...

tautschnig commented 6 years ago

I think the track record of software kept in different repositories is poor, but maybe DiffBlue now has the resources to have dedicated teams assigned to each project who then take and keep ownership of those systems. Thus I trust that only @peterschrammel will know what's appropriate.

tautschnig commented 6 years ago

Since I do have an interest in keeping JBMC alive, could that internal strategy that I postulated above be made public? As far as I can tell, the current graveyard of tools-outside-the-repo enlists Deltacheck, FShell, Impara, Musketeer, Satabs, Symex. I think EBMC and 2LS are the ones that are alive.

tautschnig commented 6 years ago

Maybe @kroening can also comment?

peterschrammel commented 6 years ago

cons:

pros:

tautschnig commented 6 years ago

I believe the situation, also with regard to the graveyard of tools, would be very different if there were a set-up that triggered an automatic build (and notifications back to the originator) of all dependencies. If this were the case, I'd be all up for such a refactoring. In absence of such a set-up any project that is factored out is doomed.

With a private CI such as a Jenkins host it's easy to track those dependencies and do automated builds as needed. Maybe there are solutions to make this work with Travis. If so, go for separate repositories. If it isn't possible: you have been warned.

Other people have discussed the pros and cons as well: https://gist.github.com/arschles/5d7ba90495eb50fa04fc https://gist.github.com/technosophos/9c706b1ef10f42014a06

martin-cs commented 6 years ago

I think at least one of the pros (improvement of core APIs) could be done without splitting repos.

@tautschnig : I'm not sure of the health of hw-cbmc, LoopFrog (and FunFrog?) and I might be able to add a few more to the roll of the lost (Wolverine, Scoot, TAN, https://svn.cprover.org/wiki/doku.php?id=software , cdfpl).

peterschrammel commented 6 years ago

I don't think that it makes sense to keep 20 unused tools alive by placing a burden on everyone who wants to make a PR to the central (i.e. cbmc) repository. If these tools had a relevant user base then there would be someone who took responsibility to maintain them. It's hard to say whether they would get more users by carrying them as zombies around, but sometimes it makes sense to leave things buried in the cemetery until they get resurrected by someone who is really interested. It's important to put tombstones to document where they can be dug up - if all these tools were properly set up with cbmc submodules and CI, the situation would be significantly better already because then we would always know the last configuration (CBMC pointer, compiler, etc) that produced a successful build, even if the CBMC pointer has not been advanced for a couple of years.

martin-cs commented 6 years ago

@peterschrammel I wasn't suggesting any kind of resurrection (and yes, keeping the pointer would be the right suggestion; that is what we should have done). I guess I was just OCD attempting to complete @tautschnig 's list.

The key point is that without active maintainance, keeping even branches alive and in sync is a real pain. I think we (in the general sense) are getting better at it but even then I'm not sure I'd recommend it if it can be avoided.

smowton commented 6 years ago

Some of the Java-specific stuff mentioned above is a positive thing that we would want to reproduce somehow even if the codebase is split up. For example, goto-check knowing that Java pointers are always guaranteed to be either null or pointing to the head of a valid object is useful.

thomasspriggs commented 2 years ago

The link to the proposed jbmc repository is dead when I try and access it. Therefore I am going to assume the plan is just to keep jbmc in a separate directory within the cbmc repository and close out this issue. Please feel free to re-open this issue if there are alternative plans afoot.