Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Isabelle/Archive-of-Formal-Proofs/thys/UTP/utp/examples/     Datei vom 29.4.2026 mit Größe 811 B image not shown  

Quelle  gcd.thy

  Sprache: Isabelle
 

theory gcd
  imports "../utp_easy_parser"
begin

alphabet gcd_ss =
  x :: int
  y :: int

abbreviation gcd_prog :: "int ==> int ==> gcd_ss hrel" where
  "gcd_prog X Y
   x := «X¬ ;;
   y := «Y¬ ;;
   while ¬ (x = y)
   invr x > 0 y > 0 gcd(x,y) = gcd(«X¬, «Y¬)
   do
      if x > y
         then x := x - y
         else y := y - x
      fi
   od"

lemma "TRY(id gcd_prog 6 21)"
  apply (sym_eval)
  oops

lemma gcd_verify:
  "{{«X¬ > 0 «Y > 0¬}} gcd_prog X Y {{x = gcd(«X¬, «Y¬)}}"
  oops

end

Messung V0.5 in Prozent
C=100 H=100 G=100

¤ Dauer der Verarbeitung: 0.7 Sekunden  (vorverarbeitet am  2026-06-13) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen



NIST Cobol Testsuite



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.