-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Description
There should be a way to ask for multiple extra_bpl files to be used.
When a module has more than one extra_bpl attribute, only the last of them is effective.
For example here:
#[spec_only(extra_bpl=b"a.bpl", extra_bpl=b"b.bpl")]
module two_extra::two_extra;
native fun a(x: u8): u8;
native fun b(x: u8): u8;
#[spec(prove)]
fun test() {
prover::prover::ensures(a(0) == b(1));
}
where
a.bpl says
procedure {:inline 1} $0_two_extra_a(x: int) returns (r: int) { r := 0; }
and b.bpl says
procedure {:inline 1} $0_two_extra_b(x: int) returns (r: int) { r := 0; }
The prover gives
boogie exited with compilation errors:
output/two_extra::test_Check.bpl(4380,4): Error: call to undeclared procedure: $0_two_extra_a
In this specific case, the workaround is to place
#[spec(prove, extra_bpl=b"a.bpl")]
before the function, but that fails if there are three or more files to include.
If the line before function test is changed to
#[spec(prove, extra_bpl=b"a.bpl", extra_bpl=b"a.bpl")]
giving
#[spec_only]
module two_extra::two_extra;
native fun a(x: u8): u8;
native fun b(x: u8): u8;
#[spec(prove, extra_bpl=b"a.bpl", extra_bpl=b"a.bpl")]
fun test() {
prover::prover::ensures(a(0) == b(1));
}
we get
error: invalid attribute
┌─ ./sources/two_extra.move:10:3
│
10 │ #[spec(prove, extra_bpl=b"a.bpl", extra_bpl=b"a.bpl")]
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Duplicate spec parameter 'extra_bpl'
I tried separating pathnames with spaces or commas, (e.g., extra_bpl=b"a.bpl,b.bpl") but that did not work either.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels