As part of migration add NullLiteral as init field to all
expand macro parameters so that the generation runs smoothly.
The user is then expected to remove init fields for required params.
Expand macro prototype: "virtual macro".
Expand macro template: "override".
Override macro displays parameters declared in the prototype as R/O.
Introduce "usages" of prototype parameters to serve as local anchors;
this avoids problems with generation.
The existing code is going to work as before, but marked as erroneous
until migrated.
Instead of the hack that that uses session parameters to pass
parameters to expandMacro, use directly `withParams` method
on macro token. All parameters are mapped to corresponding fields.
Introduce CustomSessionParameter to access parameters in
TemplateApplicationSession.
Fix rule basetag generation to coincide with templateName
Needed for PrincipalStore (occurrence cache) which uses
info about occurrence source rule template name.
Also process expand macro input for rule hash,
so that changed query rules (like one in testlang) get into
RulesDiff and could be updated with Preamble processing.
During template application memo can be used to store results
of a computation in the session. The memo will be automatically
cleared on an event that invalidates the caches.
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.
Operations such as 'error' and 'warning' are available on input
node in templates and serve to report issues found during
template application, in contrast with those found during evaluation.