You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The location object encapsulates two distinct, unrelated concepts:
The concept that a location has both physical and logical aspects.
The concept that a tool might detect a result in a file other than the one it was instructed to scan.
Not only are these two different concepts, they actually apply to two different entities. The first says something about locations; the second says something about results.
There are several problems with the current design:
It is the reason that, when we introduced a physicalLocation object into stackFrame, we stopped short of introducing a location object to capture the “logical” aspects of the location; we left those as loose properties. The problem was that a “location” included two physicalLocation-valued properties, analysisTarget and resultFile, and that didn’t make sense for a stack frame.
As defined, the location object contains two region objects (one in analysisTarget and one in resultFile), but only one or the other of them is ever used.
This is such a bad design flaw, IMO, that we have to fix it in CSD.1. I propose:
In the location object, remove the physicalLocation-valued analysisTarget and resultFile properties, and define a single physicalLocation-valued property named physicalLocation.
In the result object, retain the locations property (whose type is location[]). But now, the physicalLocation property of every location object in that array specifies the “result file”, that is, the file in which the result was detected.
In the result object, add a new fileLocation-valued property named analysisTargetLocation. This is the file the tool was instructed to scan. It is required if the analysis target does not appear anywhere in the result.locations array; otherwise it is optional.
In the new design, a location object contains only one region object (location.physicalLocation.region). The new result.analysisTargetLocation property, since its type is fileLocation rather than physicalLocation, does not contain a region object.
The
locationobject encapsulates two distinct, unrelated concepts:Not only are these two different concepts, they actually apply to two different entities. The first says something about locations; the second says something about results.
There are several problems with the current design:
physicalLocationobject intostackFrame, we stopped short of introducing a location object to capture the “logical” aspects of the location; we left those as loose properties. The problem was that a “location” included twophysicalLocation-valued properties,analysisTargetandresultFile, and that didn’t make sense for a stack frame.locationobject contains tworegionobjects (one inanalysisTargetand one inresultFile), but only one or the other of them is ever used.This is such a bad design flaw, IMO, that we have to fix it in CSD.1. I propose:
locationobject, remove thephysicalLocation-valuedanalysisTargetandresultFileproperties, and define a singlephysicalLocation-valued property namedphysicalLocation.resultobject, retain thelocationsproperty (whose type islocation[]). But now, thephysicalLocationproperty of everylocationobject in that array specifies the “result file”, that is, the file in which the result was detected.resultobject, add a newfileLocation-valued property namedanalysisTargetLocation. This is the file the tool was instructed to scan. It is required if the analysis target does not appear anywhere in theresult.locationsarray; otherwise it is optional.In the new design, a
locationobject contains only one region object (location.physicalLocation.region). The newresult.analysisTargetLocationproperty, since its type isfileLocationrather thanphysicalLocation, does not contain a region object.