Description
Based on my experience developing the canWrite constraints PR (#391) as a newcomer, I'm starting to think some things in our code are very poorly named. For example, I would expect the term
ConstraintVariable
to refer to what we actually call aVarAtom
. Perhaps what we now call aConstraintVariable
should be renamed to something likeAnnotatableObject
, since it may contain any number ofVarAtom
s and constraining the variables is just a means to the end of applying Checked C annotations to the object. ThenPointerVariableConstraint
(which is neither a variable nor a constraint) would becomeAnnotatablePointerType
, andFunctionVariableConstraint
would becomeAnnotatableFunctionSignature
. (Probably some of the less prominent things should be renamed too; I haven't gone through all of them yet.)
(Addendum: My original proposal was ConstrainableObject
, etc.; AnnotatableObject
was a new idea this morning. Then I realized that one way in which ConstrainableObject
is superior is that there are some things we annotate that don't have their own constraint variables, such as checked regions. There might be a compromise such as SolvableObject
, or maybe that's too unwieldy and we should go with ConstrainableObject
.)
Also, I've been thinking we should split those classes out into separate files.
ConstraintsVariable.cpp
is almost 2k lines which makes it a pain to edit.
I plan to work on this after our upcoming PR to Microsoft. I'm starting this issue thread so we can discuss the new names we want before I start a draft PR; it seems awkward to start the draft PR and then discuss the names there.