Skip to content

Conversation

@romainbrenguier
Copy link
Contributor

src/util is a more appropriate place for the string_exprt class, so it was moved there.

We changed the constructor with one type argument to be similar to
other exprt constructors.
This constructor was used to generate a struct with
fresh symbols but this is no longer the case, so we use a function
fresh string instead.

Dependencies in the solver that were not needed have been removed.

For some functions this requires us to now pass the string type as
argument, so the appropriate changes have been made.

@tautschnig
Copy link
Collaborator

The linter warnings appear to be genuine, would you mind addressing them?

Copy link
Collaborator

Choose a reason for hiding this comment

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

It's safe to get rid of "explicit" now that this constructor takes 2 arguments.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not entirely sure, but I think this would actually reset the counter. Place the initialisation with the declaration.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Would you mind elaborating a bit more to enable others to pick up this TODO? Specifically, I don't know who "we" refers to, and what type that would be - it seems it's using index_type - is that not correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sorry this shouldn't be there, the call the index_type has been added but the TODO wasn't removed

Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit picking: one blank line will do

Copy link
Collaborator

Choose a reason for hiding this comment

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

You might want to use if(sum.is_nil())

Copy link
Collaborator

Choose a reason for hiding this comment

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

You could use if(sum.is_not_nil())

@romainbrenguier
Copy link
Contributor Author

@tautschnig yes, sorry for these, this is now done

@tautschnig
Copy link
Collaborator

Thanks a lot for the immediate cleanup - please see my comments for a few more changes to consider.

Copy link
Member

Choose a reason for hiding this comment

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

const &

Copy link
Member

Choose a reason for hiding this comment

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

const & (and all other instances like this)

Copy link
Member

Choose a reason for hiding this comment

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

const &

Copy link
Member

Choose a reason for hiding this comment

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

const & (twice, and use copy_to_operands)

Copy link
Member

Choose a reason for hiding this comment

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

.is_nil() (several instances)

@romainbrenguier
Copy link
Contributor Author

@tautschnig @peterschrammel thanks for the comment, I've now done the corresponding corrections

@romainbrenguier romainbrenguier force-pushed the string-refinement-dependencies branch from 0174939 to 6096c5f Compare February 15, 2017 16:05
@romainbrenguier romainbrenguier force-pushed the string-refinement-dependencies branch from 6096c5f to 0628812 Compare February 16, 2017 12:43
Copy link
Member

Choose a reason for hiding this comment

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

no space before :

Copy link
Member

Choose a reason for hiding this comment

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

The initialisation should be in the cpp file.

Copy link
Member

Choose a reason for hiding this comment

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

remove one blank line

@romainbrenguier romainbrenguier force-pushed the string-refinement-dependencies branch from 4aefd87 to a04f840 Compare February 18, 2017 13:18
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.

I would suggest to move the initialisation as indicated in the comment - otherwise this looks ok to me.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is this initialization not done right in the class declaration? I'd rather drop this one instead of the in-class one as you've done in one of your commits.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Personally I don't have a preference, but Peter suggested that the initialisation should be in the cpp file.

Copy link
Member

Choose a reason for hiding this comment

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

You can't initialise a non-const static member in the class definition.

Copy link
Member

Choose a reason for hiding this comment

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

const & (twice)

Copy link
Member

Choose a reason for hiding this comment

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

const & (twice)

Copy link
Member

Choose a reason for hiding this comment

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

const & (twice)

Copy link
Member

Choose a reason for hiding this comment

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

remove one blank line

@tautschnig
Copy link
Collaborator

@peterschrammel It seems all concerns have been addressed. I note that the linter is failing with an internal error rather than reporting any problems in the source files...

@forejtv
Copy link
Contributor

forejtv commented Feb 21, 2017

@romainbrenguier can you please rebase, to have a fixed linter output?

@romainbrenguier romainbrenguier force-pushed the string-refinement-dependencies branch from d9b5714 to c29eed4 Compare February 21, 2017 18:03
@romainbrenguier
Copy link
Contributor Author

@forejtv done

Copy link
Member

Choose a reason for hiding this comment

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

const typet &type (several occurrences)

@romainbrenguier romainbrenguier force-pushed the string-refinement-dependencies branch from f971285 to 0ad726d Compare February 22, 2017 10:06
@romainbrenguier
Copy link
Contributor Author

@peterschrammel it's now done, should I squash the commits?

@peterschrammel
Copy link
Member

Yes, the cleanup commits should be squashed

`src/util` is a more appropriate place for the `string_exprt` class

We changed the constructor with one type argument to be similar to
other `exprt` constructors.
This constructor was used to generate a struct with
fresh symbols but this is no longer the case, so we use a function
fresh string instead.

Dependencies in the solver that were not needed have been removed.

For some functions this requieres us to now pass the string type as
argument.
@romainbrenguier romainbrenguier force-pushed the string-refinement-dependencies branch from 0ad726d to 3cb7bca Compare February 22, 2017 14:37
@romainbrenguier
Copy link
Contributor Author

@peterschrammel commits have been squashed: 3cb7bca

Copy link
Member

@peterschrammel peterschrammel left a comment

Choose a reason for hiding this comment

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

@kroening, this looks ready to go

@kroening kroening merged commit 37163d8 into diffblue:master Mar 1, 2017
NathanJPhillips pushed a commit to NathanJPhillips/cbmc that referenced this pull request Aug 22, 2018
…ween_DO_and_EVSes

SEC-633: Bugfix: added alias-computation between a DO and EVSes in the domain.
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.

5 participants