Skip to content

rename is_lvalue -> is_assignable #6378

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
merged 1 commit into from
Oct 7, 2021
Merged

rename is_lvalue -> is_assignable #6378

merged 1 commit into from
Oct 7, 2021

Conversation

kroening
Copy link
Member

@kroening kroening commented Oct 2, 2021

The term 'lvalue' is nomenclature that is specific to C/C++. The function
is_lvalue is meant to be used in the context of goto-programs, and thus, a
name that suggests a relationship to C programs may be confusing.

  • Each commit message has a non-empty body, explaining why the change was made.
  • n/a Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • n/a The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • White-space or formatting changes outside the feature-related changed lines are in commits of their own.

The term 'lvalue' is nomenclature that is specific to C/C++.  The function
is_lvalue is meant to be used in the context of goto-programs, and thus, a
name that suggests a relationship to C programs may be confusing.
@codecov
Copy link

codecov bot commented Oct 2, 2021

Codecov Report

Merging #6378 (b29a6db) into develop (54a50e9) will decrease coverage by 0.00%.
The diff coverage is 90.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #6378      +/-   ##
===========================================
- Coverage    75.91%   75.91%   -0.01%     
===========================================
  Files         1517     1517              
  Lines       164024   164022       -2     
===========================================
- Hits        124515   124513       -2     
  Misses       39509    39509              
Impacted Files Coverage Δ
src/util/cmdline.h 66.66% <ø> (ø)
src/util/expr_util.h 100.00% <ø> (ø)
src/util/expr_util.cpp 88.15% <66.66%> (ø)
src/goto-programs/builtin_functions.cpp 55.32% <75.00%> (ø)
...yses/variable-sensitivity/abstract_environment.cpp 95.02% <100.00%> (ø)
src/util/cmdline.cpp 95.32% <100.00%> (-0.06%) ⬇️
src/util/replace_symbol.cpp 87.57% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 18760ca...b29a6db. Read the comment docs.

@kroening kroening marked this pull request as ready for review October 2, 2021 11:52
@@ -18,19 +18,20 @@ Author: Daniel Kroening, [email protected]
#include "pointer_expr.h"
#include "std_expr.h"

bool is_lvalue(const exprt &expr)
bool is_assignable(const exprt &expr)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this perhaps be moved to goto-programs? The use in replace_symbol obviously conflicts with that, but some follow-up cleanup may be necessary.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes; there may well be a need to make copies of this function for particular uses. I'd see this as an orthogonal question to the renaming done here.

@kroening kroening merged commit b95e229 into develop Oct 7, 2021
@kroening kroening deleted the is_lvalue branch October 7, 2021 11:10
kroening added a commit that referenced this pull request Oct 7, 2021
kroening added a commit that referenced this pull request Oct 7, 2021
kroening added a commit that referenced this pull request Oct 7, 2021
@danielsn danielsn mentioned this pull request Oct 21, 2021
4 tasks
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.

4 participants