Initial commit
Test (in pplus-core) / in-core (push) Failing after 28m44s

This commit is contained in:
alexm committed 2026-11-12 22:23:48 -05:00
commit 568474d52f
1591 files changed
+528213

No files matched your search

@@ -0,0 +1,29 @@
method AffineGapPenalty(length: int, open: int, extend: int) returns (result: int)
requires length >= 1
ensures result == open + (length - 1) * extend
{
result := open + (length - 1) * extend;
}
// Position by position: the first position opens the gap, every later one extends it.
method AffineByPositions(length: int, open: int, extend: int) returns (score: int)
requires length >= 1
ensures score == open + (length - 1) * extend
{
score := open;
var i := 1;
while i < length
invariant 1 <= i <= length
invariant score == open + (i - 1) * extend
{
score := score + extend;
i := i + 1;
}
}
// With the same score for opening and extending, the affine model is the linear one.
lemma AffineIsLinearWhenEqual(length: int, gap: int)
requires length >= 1
ensures gap + (length - 1) * gap == length * gap
{
}