tiny.pluck.toplevel.incremental
Defined in toplevel.
API (9)
Actions
Public operations.
clearLPSMCCachesdisableIncrementalLPSMCenableIncrementalLPSMCgetIncrementalLPSMCgetLPSMCVarianceStatsgetLpsmcRunStatsinvalidateForRefinementisIncrementalLPSMCEnabledrefinementAffectsPathChoices
Source
Source: lib/pluck/src/toplevel/incremental.zig
zig
const pluck = @import("../root.zig");const evaluator = pluck.evaluator;const lpsmc_module = pluck.lpsmc;const IncrementalLPSMC = evaluator.IncrementalLPSMC;const bdd = pluck.bdd;const context_owner = @import("context.zig");const ToplevelContext = context_owner.ToplevelContext;pub fn enableIncrementalLPSMC(self: *ToplevelContext) !void { if (self.incremental_lpsmc != null) { return error.AlreadyEnabled; } const lpsmc = try self.allocator.create(IncrementalLPSMC); lpsmc.* = lpsmc_module.init(self.allocator); self.incremental_lpsmc = lpsmc;}pub fn disableIncrementalLPSMC(self: *ToplevelContext) void { if (self.incremental_lpsmc) |lpsmc| { lpsmc_module.deinit(lpsmc); self.allocator.destroy(lpsmc); self.incremental_lpsmc = null; }}pub fn isIncrementalLPSMCEnabled(self: *const ToplevelContext) bool { return self.incremental_lpsmc != null;}pub fn getIncrementalLPSMC(self: *ToplevelContext) ?*IncrementalLPSMC { return self.incremental_lpsmc;}pub fn getLPSMCVarianceStats(self: *const ToplevelContext) ?evaluator.LPSMCVarianceStats { if (self.incremental_lpsmc) |lpsmc| { return lpsmc.variance_stats; } return null;}pub fn getLpsmcRunStats(self: *const ToplevelContext) ?evaluator.LpsmcRunStats { if (self.incremental_lpsmc) |lpsmc| { return lpsmc.last_run_stats; } return null;}pub fn refinementAffectsPathChoices(self: *const ToplevelContext, var_label: bdd.VarLabel) bool { if (self.incremental_lpsmc) |lpsmc| { return lpsmc_module.affectsPathChoices(lpsmc, var_label); } return false;}pub fn invalidateForRefinement(self: *ToplevelContext, var_label: bdd.VarLabel) bool { if (self.incremental_lpsmc) |lpsmc| { return lpsmc_module.invalidateForRefinement(lpsmc, var_label); } return false;}pub fn clearLPSMCCaches(self: *ToplevelContext) void { if (self.incremental_lpsmc) |lpsmc| { lpsmc_module.clearCaches(lpsmc); }}Source: lib/pluck/src/toplevel/root.zig:10
zig
pub const incremental = @import("incremental.zig");Audit
| Definitions | 10 |
|---|---|
| Public names | 10 |
| Members | 0 |
| Version | 26.7.0 |
| Revision | daab053ee433 |