Skip to content

Commit

Permalink
camelCase var names and mbt:: prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-gavran committed Dec 16, 2024
1 parent c1e2e0d commit 879bede
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 4 additions & 1 deletion quint/src/itf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ export type ItfTrace = {
loop?: number
}

export const ACTION_TAKEN = 'mbt::actionTaken'
export const NONDET_PICKS = 'mbt::nondetPicks'

export type ItfState = {
'#meta'?: any
// Mapping of state variables to their values in a state
Expand Down Expand Up @@ -167,7 +170,7 @@ export function toItf(vars: string[], states: QuintEx[], mbtMetadata: boolean =
)
)
).mapRight(s => {
if (mbtMetadata) {vars = [...vars, 'action_taken', 'nondet_picks']}
if (mbtMetadata) {vars = [...vars, ACTION_TAKEN, NONDET_PICKS]}
return {
vars: vars,
states: s,
Expand Down
5 changes: 3 additions & 2 deletions quint/src/runtime/impl/VarStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { QuintError } from '../../quintError'
import { RuntimeValue, rv } from './runtimeValue'
import { Map as ImmutableMap } from 'immutable'
import { CachedValue, Register } from './Context'
import { ACTION_TAKEN, NONDET_PICKS } from '../../itf'

/**
* A named pointer to a value, so we can use the same reference in multiple places, and just update the value.
Expand Down Expand Up @@ -125,8 +126,8 @@ export class VarStorage {
return [name, valueVariant]
})
)
map.push(['nondet_picks', nondetPicksRecord])
map.push(['action_taken', rv.mkStr(this.actionTaken ?? '')])
map.push([NONDET_PICKS, nondetPicksRecord])
map.push([ACTION_TAKEN, rv.mkStr(this.actionTaken ?? '')])
}

return rv.mkRecord(map)
Expand Down

0 comments on commit 879bede

Please sign in to comment.