Fix rule basetag generation to coincide with templateName
Needed for PrincipalStore (occurrence cache) which uses
info about occurrence source rule template name.
Absence of "principal" flag on "main" contstaint causes invalid
processing of added rules that are triggered by this constraint.
Introduce protective copying of arguments in IncrProgramSpecBuilder.
The builder implementation must not reuse the collection passed in as argument.
Program Preamble consists of 2 parts: rules & Journal.
Preamble rules are no-input rules with rules for their required nodes.
Preamble journal is journal part with results of executing these rules.
Preamble is defined per-Query, because Journal differs for Queries.
Repository CacheHolder is used for storing them b/w sessions.
Rules are stored and retrievied with Memoizer.
Journal is stored as SessionToken in PreambleSet (map Query->SessionToken).
Add option to IncrementalSpec -- incrementality level (Preamble or Full).
IncrProgramSpec influencing program eval is built from two sources:
internal analysis results & typechecking options.
Providing spec builder instead of spec allows to combine these
sources later at program pipeline creation in TypecheckingService.
Commit accomodates to addition of IncrementalSpec.Enabled.Unsafe
Commit also simplifies ProgramAnalysis -related classes.
Renames BasicProgramAnalysis to PrincipalsAnalysis.
basetag() returns name of ConstraintRule without node id.
Check on whether Rule is principal are now done through basetag(), it's sufficient.
Add part of future analysis: CallerTableBuilder.