checker-framework icon indicating copy to clipboard operation
checker-framework copied to clipboard

Refactor rlc

Open skehrli opened this issue 1 year ago • 1 comments

Currently, the RLC subclasses the CalledMethods checker, which does not allow any checker to run after the CalledMethods checker and use its annotations within the RLC. This refactor strips the RLC from most of its logic and places it into another subclass of the CalledMethodsChecker called RLCCalledMethodsChecker, which virtually takes the function of the RLC.

The RLC now subclasses CompositeChecker, an abstract checker inserted into the hierarchy between the BaseTypeChecker (which it superclasses) and the SourceChecker (which it subclasses). It is basically the BaseTypeChecker, but without demanding a qualifier hierarchy, visitor or type factory.

The consistency analyzer is now called in the postAnalzye(CFG) method of the checker running last, i.e. the RLCCalledMethodsChecker.

skehrli avatar Jul 24 '24 12:07 skehrli

@smillst Could you please review at least the BaseTypeChecker and CompositeChecker changes? And, if you want that part of this PR moved into a separate PR, we can do that.

mernst avatar Jul 30 '24 11:07 mernst