Skip to content

Separate parsing of language options from languaget #2911

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

Merged

Conversation

peterschrammel
Copy link
Member

The command line should first be converted into optionst and then be used. This principle has been broken in many places, leading to cases where options are parsed several times because they are parsed from cmdline in one place and options is used in another place.

This PR does not fix the general problem, but only removes one instance of double parsing that concerns the object factory parameters. Fixes #2908.

The size of this PR shows how entangled the situation is and it mostly just shifts some ugliness from one part of the code base to another part. Particular complications arise from language_uit, which will hopefully disappear in near future (together with some of the ugliness that is required here to work around it...).

An important next step to improve the situation would be to enforce that cmdlinet is parsed into optionst first and after that only optionst is used.

Copy link
Collaborator

@tautschnig tautschnig left a comment

Choose a reason for hiding this comment

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

This looks like a good starting point to me. There's of course a lot more that needs to happen and some cleanup of the work in this particular PR, but moving in many small steps is better than indefinitely blocking because we can't get a big one done.

@@ -23,18 +26,18 @@ Author: Daniel Kroening, [email protected]
struct object_factory_parameterst final
{
/// Maximum value for the non-deterministically-chosen length of an array.
size_t max_nondet_array_length=MAX_NONDET_ARRAY_LENGTH_DEFAULT;
size_t max_nondet_array_length = MAX_NONDET_ARRAY_LENGTH_DEFAULT;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Whitespace-change allergy kicking in ;-)

@peterschrammel peterschrammel force-pushed the parse-object-factory-params branch from 8008370 to 5b467d1 Compare October 6, 2018 22:09
Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

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

This PR failed Diffblue compatibility checks (cbmc commit: 5b467d1).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/87111661
Status will be re-evaluated on next push.
Please contact @peterschrammel, @thk123, or @allredj for support.

Common spurious failures:

  • the cbmc commit has disappeared in the mean time (e.g. in a force-push)
  • the author is not in the list of contributors (e.g. first-time contributors).

@peterschrammel
Copy link
Member Author

@tautschnig, I've rebased this.

@peterschrammel
Copy link
Member Author

peterschrammel commented Oct 7, 2018

Waiting for TG bump to pass...

@peterschrammel
Copy link
Member Author

TG bump is passing.

@peterschrammel peterschrammel merged commit f1489fd into diffblue:develop Oct 8, 2018
@peterschrammel peterschrammel deleted the parse-object-factory-params branch October 8, 2018 16:53
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.

Pass options to languaget to avoid duplicate parsing of object factory parameters
8 participants