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

Problem with engine heuristic #921

Open
felixridoux opened this issue Jan 3, 2025 · 2 comments · May be fixed by #923
Open

Problem with engine heuristic #921

felixridoux opened this issue Jan 3, 2025 · 2 comments · May be fixed by #923

Comments

@felixridoux
Copy link

The new basic engine heuristic seems to introduce a bug when it is applied to designs containing assumptions not supported by the k-induction engine (temporal property in my case). The assumption seems to be transformed into an assertion.

As an example, if you take regression/ebmc/k-induction/ring_buffer.sv, and you slightly modify the first assumption in order to add a temporal operator as follows, the engine will output REFUTED instead of ASSUMED or FAILURE: property unsupported by k-induction for the first assumption:

module ring_buffer(input clk, input read, input write);

  reg [4:0] count=0;
  reg [3:0] readptr=0, writeptr=0;

  always @(posedge clk) begin
    if(read) begin
      readptr++;
      count--;
    end

    if(write) begin
      writeptr++;
      count++;
    end

  end

  wire full=count==16;
  wire empty=count==0;

  assume property (empty |=> !read);
  assume property (full |-> !write);

  p0: assert property (((writeptr-readptr)&'b1111)==count[3:0]);
  p1: assert property (count <= 16);
  p2: assert property (count != 17);

endmodule
kroening added a commit that referenced this issue Jan 6, 2025
kroening added a commit that referenced this issue Jan 6, 2025
kroening added a commit that referenced this issue Jan 6, 2025
The k-induction engine now correctly reports unsupported assumptions, and is
then skipped by the engine selection heuristic.

Fixes #921.
kroening added a commit that referenced this issue Jan 7, 2025
The k-induction engine now correctly reports unsupported assumptions, and is
then skipped by the engine selection heuristic.

Fixes #921.
@kroening
Copy link
Member

kroening commented Jan 7, 2025

May I ask you to try #923 ?

@felixridoux
Copy link
Author

Yep! It's working on my side. Thanks a lot. To be sure, I just want to point out that before this modification, in case of an unsupported assumption, the k-induction engine would attempt to prove the property without the assumption. However, now it seems the engine always returns "UNKNOWN" in such cases. This convention can make sense. Is it the intended behavior?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants