Giter VIP home page Giter VIP logo

Comments (2)

RasmusHoldsbjergCSAU avatar RasmusHoldsbjergCSAU commented on June 25, 2024

Silly me, test_call is supposed to be

Definition test_call : bedrock_func :=
    let x := "x" in
    let p := "p" in
    let q := "q" in
    let test := "test" in
    ("call", ([x], [] : list string, bedrock_func_body:(
        unpack! p, q  = test();
        store(x, q)
    ))).

I got the example working; sorry for the inconvenience.

from bedrock2.

andres-erbsen avatar andres-erbsen commented on June 25, 2024

I'm glad you figured out a solution that works for you. I think the following (untested) code should also work:

Definition test_call : bedrock_func := 
    ("test_call", (["x"], ["x"], bedrock_func_body:(
        unpack! p, q  = test();
        x = q
    ))).

    Instance spec_of_call : spec_of "call" := fnspec! "test_call" _x_input_unused ~> x,
    { requires t m := True;
      ensures t' m' := t=t' /\ m=m' /\
        word.unsigned x = 2 }.

Lemma call_correct : program_logic_goal_for_function! test_call.
Proof.
    repeat straightline. straightline_call; auto. repeat straightline; subst; eauto.
Qed.

(The variable-name boilerplate is no longer required and we have dropped it e.g. here.)

from bedrock2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.