Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Replay + cargo fmt. #35

Merged
merged 3 commits into from
Jul 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/replay.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ jobs:
- name: Replay
run: |
eval $(opam env)
WHY3CONFIG= why3 replay -Lprelude --obsolete-only mlcfgs/CreuSAT
WHY3CONFIG= why3 replay -Lprelude --merging-only mlcfgs/CreuSAT

2 changes: 1 addition & 1 deletion CreuSAT/src/decision.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ impl Decisions {
#[ensures((@(^self).linked_list).len() == (@self.linked_list).len())]
fn rescore(&mut self, _f: &Formula) {
let INVALID: usize = usize::MAX;
let old_self : Ghost<&mut Decisions>= ghost! { self };
let old_self: Ghost<&mut Decisions> = ghost! { self };
let mut curr_score = self.linked_list.len();
let mut i: usize = 0;
let mut curr = self.start;
Expand Down
2 changes: 1 addition & 1 deletion CreuSAT/src/formula.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ impl Formula {
#[ensures((@(^self).clauses)[@result] == clause)]
#[ensures((@self.clauses).len() + 1 == (@(^self).clauses).len())]
pub fn add_unwatched_clause(&mut self, clause: Clause, watches: &mut Watches, _t: &Trail) -> usize {
let old_self: Ghost<&mut Formula>= ghost! { self };
let old_self: Ghost<&mut Formula> = ghost! { self };
let cref = self.clauses.len();
self.clauses.push(clause);
proof_assert!(old_self.equisat_compatible(*self));
Expand Down
2 changes: 1 addition & 1 deletion CreuSAT/src/trail.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ impl Trail {
#[invariant(inv, self.invariant_no_decision(*f))]
#[invariant(proph, ^old_t.inner() == ^self)]
while self.decisions.len() > 0 && self.decisions[self.decisions.len() - 1] > self.trail.len() {
let old_t3: Ghost<& mut Trail> = ghost! { self };
let old_t3: Ghost<&mut Trail> = ghost! { self };
proof_assert!(sorted(@self.decisions));
proof_assert!((@self.decisions).len() > 0);
proof_assert!(lemma_pop_maintains_sorted(@self.decisions); true);
Expand Down
2 changes: 1 addition & 1 deletion CreuSAT/src/unit_prop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use creusot_contracts::logic::Ghost;
use creusot_contracts::std::*;
use creusot_contracts::*;

use crate::{formula::*, lit::*, trail::*, util, watches::*, clause::*};
use crate::{clause::*, formula::*, lit::*, trail::*, util, watches::*};

use crate::logic::{
logic::*,
Expand Down
2 changes: 1 addition & 1 deletion Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ dependencies = [
[tasks.creusot-CreuSAT]
workspace = false
command = "cargo"
args = ["creusot", "--", "-p", "CreuSAT", "--features=contracts", "--features", "${@}"]
args = ["creusot", "--span-mode=relative", "--", "-p", "CreuSAT", "--features=contracts", "--features", "${@}"]

[tasks.move-CreuSAT]
workspace = false
Expand Down
4 changes: 2 additions & 2 deletions mlcfgs/CreuSAT.mlcfg
Original file line number Diff line number Diff line change
Expand Up @@ -12490,7 +12490,7 @@ module CreuSat_Formula_Impl2_AddUnwatchedClause
}
BB4 {
_6 <- ();
old_self_5 <- ghost ([#"../CreuSAT/src/formula.rs" 159 43 159 58] self_1);
old_self_5 <- ghost ([#"../CreuSAT/src/formula.rs" 159 44 159 59] self_1);
goto BB5
}
BB5 {
Expand Down Expand Up @@ -17580,7 +17580,7 @@ module CreuSat_Trail_Impl0_BacktrackTo
}
BB35 {
_88 <- ();
old_t3_87 <- ghost ([#"../CreuSAT/src/trail.rs" 175 45 175 60] self_1);
old_t3_87 <- ghost ([#"../CreuSAT/src/trail.rs" 175 44 175 59] self_1);
goto BB36
}
BB36 {
Expand Down
5,005 changes: 1,232 additions & 3,773 deletions mlcfgs/CreuSAT/why3session.xml

Large diffs are not rendered by default.

Binary file modified mlcfgs/CreuSAT/why3shapes.gz
Binary file not shown.