Require Import List.
Require Import String.
Require Import ZArith.

Open Scope list_scope.
Open Scope string_scope.
Open Scope Z_scope.

Require Import StructTactics.
Require Import ImpSyntax.
Require Import ImpCommon.
Require Import ImpEval.
Require Import ImpInterp.
Require Import ImpInterpNock.
Require Import ImpInterpProof.
Require Import ImpInterpNockProof.
Require Import ImpVerif.
Require Import ImpSemanticsFacts.

Import ListNotations.

Definition swap_body :=
  (Sseq (Sset "t" (Evar "a"))
  (Sseq (Sset "a" (Evar "b"))
        (Sset "b" (Evar "t")))).

Lemma sum_total_spec :
  forall env s h a_val b_val,
    lkup s "a" = Some a_val ->
    lkup s "b" = Some b_val ->
    after env s h swap_body
      (fun _ => False)
      (fun s' h' =>
        h' = h /\
        lkup s' "a" = lkup s "b" /\
        lkup s' "b" = lkup s "a").
Proof.
  intros.
  unfold swap_body.

  apply after_seq.
  eapply after_set; eauto.

  apply after_seq.
  eapply after_set; eauto.

  eapply after_set; eauto.

  intuition.
Qed.

This page has been generated by coqdoc