Skip to content

Commit

Permalink
added mbt vars
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-gavran committed Dec 10, 2024
1 parent 7b968e5 commit c1e2e0d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion quint/src/cliCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ export async function runSimulator(prev: TypecheckedStage): Promise<CLIProcedure
const itfFile: string | undefined = prev.args.outItf
if (itfFile) {
const filename = expandOutputTemplate(itfFile, index, { autoAppend: prev.args.nTraces > 1 })
const trace = toItf(vars, states)
const trace = toItf(vars, states, prev.args.mbt)
if (trace.isRight()) {
const jsonObj = addItfHeader(prev.args.input, status, trace.value)
writeToJson(filename, jsonObj)
Expand Down
3 changes: 2 additions & 1 deletion quint/src/itf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function isUnserializable(v: ItfValue): v is ItfUnserializable {
* @param states an array of expressions that represent the states
* @returns an object that represent the trace in the ITF format
*/
export function toItf(vars: string[], states: QuintEx[]): Either<string, ItfTrace> {
export function toItf(vars: string[], states: QuintEx[], mbtMetadata: boolean = false): Either<string, ItfTrace> {
const exprToItf = (ex: QuintEx): Either<string, ItfValue> => {
switch (ex.kind) {
case 'int':
Expand Down Expand Up @@ -167,6 +167,7 @@ export function toItf(vars: string[], states: QuintEx[]): Either<string, ItfTrac
)
)
).mapRight(s => {
if (mbtMetadata) {vars = [...vars, 'action_taken', 'nondet_picks']}
return {
vars: vars,
states: s,
Expand Down

0 comments on commit c1e2e0d

Please sign in to comment.