Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Isabelle/Archive-of-Formal-Proofs/thys/Simpl/ex/   (Archive of formal Proofs Version 2026-5©)  Datei vom 29.4.2026 mit Größe 1 kB image not shown  

Quelle  XVcgEx.thy

  Sprache: Isabelle
 

(*
    Author:      Norbert Schirmer
    Maintainer:  Norbert Schirmer, norbert.schirmer at web de

Copyright (C) 2006-2008 Norbert Schirmer
*)


section "Examples for Parallel Assignments"

theory XVcgEx
imports "../XVcg"

begin

record "globals" =
  "G_'"::"nat"
  "H_'"::"nat"

record 'g vars = "'g state" +
  A_' :: nat
  B_' :: nat
  C_' :: nat
  I_' :: nat
  M_' :: nat
  N_' :: nat
  R_' :: nat
  S_' :: nat
  Arr_' :: "nat list"
  Abr_':: string

term "BASIC
         🚫A :== x,
         🚫B :== y
      END"

term "BASIC
         🚫G :== 🚫H,
         🚫H :== 🚫G
      END"

term "BASIC
        LET (x,y) = (🚫A,b);
            z = 🚫B
        IN 🚫A :== x,
           🚫G :== 🚫A + y + z
      END"


lemma  {🚫A = 0}
      {🚫A < 0} BASIC
       LET (a,b,c) = foo 🚫A
       IN
            🚫A :== a,
            🚫B :== b,
            🚫C :== c
      END
      {🚫A = x 🚫B = y 🚫C = c}"
apply vcg
oops

lemma  {🚫A = 0}
      {🚫A < 0} BASIC
       LET (a,b,c) = foo 🚫A
       IN
            🚫A :== a,
            🚫G :== b + 🚫B,
            🚫H :== c
      END
      {🚫A = x 🚫G = y 🚫H = c}"
apply vcg
oops

definition foo:: "nat (nat × nat × nat)"
  where "foo n = (n,n+1,n+2)"

lemma  {🚫A = 0}
      {🚫A < 0} BASIC
       LET (a,b,c) = foo 🚫A
       IN
            🚫A :== a,
            🚫G :== b + 🚫B,
            🚫H :== c
      END
      {🚫A = x 🚫G = y 🚫H = c}"
apply (vcg add: foo_def snd_conv fst_conv)
oops

end

Messung V0.5 in Prozent
C=99 H=-661 G=472

¤ Dauer der Verarbeitung: 0.14 Sekunden  (vorverarbeitet am  2026-07-06) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.