@informalsystems/quint
Version:
Core tool for the Quint specification language
36 lines • 1.34 kB
JavaScript
;
/* ----------------------------------------------------------------------------------
* Copyright 2022-2024 Informal Systems
* Licensed under the Apache License, Version 2.0.
* See LICENSE in the project root for license information.
* --------------------------------------------------------------------------------- */
Object.defineProperty(exports, "__esModule", { value: true });
exports.Context = void 0;
const trace_1 = require("./trace");
class Context {
/**
* Constructs a new evaluation context.
*
* @param recorder - The trace recorder to use.
* @param rand - Function to generate random bigints.
* @param varStorage - The variable storage to use (should be the same as the builder's)
*/
constructor(recorder, rand, varStorage) {
/**
* The trace object for recording variable values at each state in an execution.
*/
this.trace = new trace_1.Trace();
this.recorder = recorder;
this.rand = rand;
this.varStorage = varStorage;
}
/**
* Shifts the variables in storage and extends the trace with the current variable state.
*/
shift() {
this.varStorage.shiftVars();
this.trace.extend(this.varStorage.asRecord());
}
}
exports.Context = Context;
//# sourceMappingURL=Context.js.map