Skip to content

Commit

Permalink
Rename module to match filename
Browse files Browse the repository at this point in the history
  • Loading branch information
p-offtermatt committed Nov 28, 2023
1 parent 2b9873a commit dd2cd7c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/difference/core/quint_model/ccv_boundeddrift.qnt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module ccv_happy {
module ccv_boundeddrift {
import ccv_model.* from "ccv_model"
import ccv_types as Ccvt from "ccv"
import ccv from "ccv"
Expand All @@ -22,7 +22,7 @@ module ccv_happy {
val otherChainsLastTimes = otherChains.map(c => c.lastTimestamp)
// start with advancingChain.RunningTime - if this is the minimal element, we can advance by maxDrift anyways
val otherChainsMinLastTime = otherChainsLastTimes.fold(advancingChain.runningTimestamp, (acc, t) => if (acc < t) acc else t)
val maxTime = advancingChain.runningTimestamp - otherChainsMinLastTime + maximalDrift
val maxTime = otherChainsMinLastTime - advancingChain.runningTimestamp + maximalDrift
maxTime

// Given the name of a chain, gets a set with the chain states of all other chains.
Expand All @@ -42,7 +42,7 @@ module ccv_happy {
currentState.consumerStates.get(advancingChain).chainState
}

def GetChainStates(): Set[Ccvt::ChainState] =
def GetRunningChainStates(): Set[Ccvt::ChainState] =
val runCons = ccv::getRunningConsumers(currentState.providerState)
val consumerChainStates = runCons.map(c => currentState.consumerStates.get(c).chainState)
consumerChainStates.union(Set(currentState.providerState.chainState))
Expand Down Expand Up @@ -75,9 +75,9 @@ module ccv_happy {
// The maxDrift between chains is never exceeded.
// This *should* be ensured by the step function.
val BoundedDriftInv =
GetChainStates.forall(
chain1 => GetChainStates.forall(
chain2 => chain1.runningTimestamp - chain2.lastTimestamp <= maxDrift
GetRunningChainStates.forall(
chain1 => GetRunningChainStates.forall(
chain2 => abs(chain1.runningTimestamp - chain2.lastTimestamp) <= maxDrift
)
)
}

0 comments on commit dd2cd7c

Please sign in to comment.