Module FinitizeStringLocation
A module that provides a way to concretize a string location, typically for performance reasons.
The hasLocationInfo predicate may perform redundant string splitting operations due to it being
an infinite type. Assuming the query has reached a finite set of string locations, this module
allows you to create a set of finite and immutable concrete string locations, which can be
used to improve performance.
Example:
StringLocation getLocations() {
// Predicate where string locations are highly convenient.
}
// Selects "file.cpp:1:2:3:4" and efficiently extracts the hasLocationInfo predicate.
from FinitizeStringLocation<getLocations()>::Location loc
select loc.toString(), loc
Import path
import qtil.locations.StringLocationClasses
| Location | The finite class. |
Parameters
| locations | pred |