Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
josef-widder committed Jun 21, 2024
1 parent 828da72 commit 0fb55fe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion specs/quint/specs/proofs-in-blocs/proofs.qnt
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ pure def emptySuffix (s: List[Block]) : Set[Height] =
pure def newBlockProof (s: List[Block], H: Height, K: int) : BlockProof =
if (H < K) None
else
// the latest block, i.e., the one with the highest height, in the strand that includes a proof.
val proofStart = s.foldl(head(s).height, (s, x) => if (x.height > s and x.proof != None) x.height
else s)
// collect all empty blocks in the strand with height > proofStart height
val empty = s .select(x => x.height > proofStart)
.foldl(Set(), (s, x) => s.union(Set(x.height)))
Proof({provenBlock: proofStart, emptyBlocks: empty})
Expand Down Expand Up @@ -108,8 +110,8 @@ def NotTooManyEmptyBlocksInChainInv =
sb.forall(h => followersProven(h, sb))
)

// unproven blocks can only exist at the head of a strand.

// Unproven blocks can only exist at the head of a strand.
def OnlyHeadUnprovenInv =
0.to(numStrands - 1).forall(st =>
val sb = chain.strandBlocks(st, numStrands)
Expand Down

0 comments on commit 0fb55fe

Please sign in to comment.