Skip to content

Commit 1d7eabc

Browse files
committed
nr: fix unit() definition
Signed-off-by: Reto Achermann <achreto@gmail.com>
1 parent a206264 commit 1d7eabc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

concurrency/node-replication/InfiniteLog.i.dfy

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -663,13 +663,13 @@ function map_union<K,V>(m1: map<K,V>, m2: map<K,V>) : map<K,V> {
663663
// log: map<nat, LogEntry>
664664
map[],
665665
// global_tail: Option<nat>,
666-
Some(0), // NOTE(travis): should be None
666+
None, // NOTE(travis): should be None
667667
// replicas: map<NodeId, nrifc.NRState>,
668668
map[], // Question: initialize for all nodes?
669669
// localTails: map<NodeId, nat>
670670
map[], // Question: initialize for all nodes?
671671
// ctail: Option<nat>, // ctail (atomic int)
672-
Some(0),
672+
None,
673673
// localReads: map<RequestId, ReadonlyState>,
674674
map[],
675675
// localUpdates: map<RequestId, UpdateState>,
@@ -928,6 +928,8 @@ function map_union<K,V>(m1: map<K,V>, m2: map<K,V>) : map<K,V> {
928928
lemma dot_unit(x: M)
929929
ensures dot(x, unit()) == x
930930
{
931+
assert unit().M?;
932+
assert dot(unit(), unit()).M?;
931933
assert dot(unit(), unit()) == unit();
932934
assert dot(x, unit()) == x;
933935
}

0 commit comments

Comments
 (0)