Skip to content

Commit

Permalink
Comment unused implementation of type invariants
Browse files Browse the repository at this point in the history
  • Loading branch information
fpoli committed Sep 30, 2020
1 parent 1e54799 commit d7811b8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
12 changes: 0 additions & 12 deletions prusti-viper/src/encoder/spec_encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,6 @@ pub fn encode_spec_assertion<'p, 'v: 'p, 'tcx: 'v>(
spec_encoder.encode_assertion(assertion)
}

pub fn encode_simple_spec_assertion<'p, 'v: 'p, 'tcx: 'v>(
encoder: &'p Encoder<'v, 'tcx>,
target_args: &'p [vir::Expr],
assertion: &typed::Assertion<'tcx>,
) -> vir::Expr {
let spec_encoder = SpecEncoder::new_simple(
encoder,
target_args,
);
spec_encoder.encode_assertion(assertion)
}

struct SpecEncoder<'p, 'v: 'p, 'tcx: 'v> {
encoder: &'p Encoder<'v, 'tcx>,
// FIXME: this should be the MIR of the `__spec` function
Expand Down
12 changes: 8 additions & 4 deletions prusti-viper/src/encoder/type_encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -558,10 +558,14 @@ impl<'p, 'v, 'r: 'v, 'tcx: 'v> TypeEncoder<'p, 'v, 'tcx> {
match spec {
typed::SpecificationSet::Struct(items) => {
for item in items {
let enc = encode_simple_spec_assertion(
self.encoder,
&[],
&item.assertion
// let enc = encode_simple_spec_assertion(
// self.encoder,
// &[],
// &item.assertion
// );
let enc = unimplemented!(
"TODO: type invariants need to be upgraded \
to the new compiler version"
);
// OPEN TODO: hacky fix here to convert the closure var to "self"...
let enc = hacky_folder.fold(enc);
Expand Down

0 comments on commit d7811b8

Please sign in to comment.