pub struct SymbolicIrContext { /* private fields */ }Expand description
Reusable state for generating symbolic IR across many templates that
share one DefineIndex.
The context owns exact parse/helper-analysis caches. Reusing it across templates avoids recomputing helper bodies without changing analysis semantics; a cache miss and cache hit return the same structural facts.
Implementations§
Source§impl SymbolicIrContext
impl SymbolicIrContext
Sourcepub fn new(defines: &DefineIndex) -> Self
pub fn new(defines: &DefineIndex) -> Self
Creates a reusable symbolic-analysis context for indexed chart sources.
Sourcepub fn with_chart_default_strings(
defines: &DefineIndex,
chart_default_strings: BTreeMap<String, String>,
) -> Self
pub fn with_chart_default_strings( defines: &DefineIndex, chart_default_strings: BTreeMap<String, String>, ) -> Self
Build a context that can execute chart-authored string defaults when
a tpl call selects them. The strings are not general inference
evidence; they are consulted only at that explicit execution boundary.
Sourcepub fn with_policy(
defines: &DefineIndex,
chart_default_strings: BTreeMap<String, String>,
kubernetes_version: Option<String>,
) -> Self
pub fn with_policy( defines: &DefineIndex, chart_default_strings: BTreeMap<String, String>, kubernetes_version: Option<String>, ) -> Self
Build a context carrying analysis policy inputs: the chart-authored
string defaults plus the normalized Kubernetes version
(.Capabilities.KubeVersion conditions evaluate against it; None
abstains them).
Sourcepub fn generate_contract_ir(&self, src: &str) -> ContractIr
pub fn generate_contract_ir(&self, src: &str) -> ContractIr
Generate the opaque contract graph without finalizing it.
Callers that need to combine, scope, or otherwise transform chart-local
contracts should use this method and derive schema facts with
ContractIr::finalize. Inspection output can finalize the graph once
and ask the resulting contract for its stable document.
Sourcepub fn generate_contract_ir_for_source(
&self,
src: &str,
source_path: &str,
) -> ContractIr
pub fn generate_contract_ir_for_source( &self, src: &str, source_path: &str, ) -> ContractIr
Builds contract IR while attaching a logical template source path.
Sourcepub fn eval_document_fragment(&self, src: &str) -> EvaluatedDocument
pub fn eval_document_fragment(&self, src: &str) -> EvaluatedDocument
Evaluate a template into the abstract fragment domain, reusing this context’s memoized helper analyses.
Trait Implementations§
Source§impl Clone for SymbolicIrContext
impl Clone for SymbolicIrContext
Source§fn clone(&self) -> SymbolicIrContext
fn clone(&self) -> SymbolicIrContext
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more