Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Isabelle/HOL/IMP/   (Beweissystem Isabelle Version 2025-1©)  Datei vom 16.11.2025 mit Größe 1 kB image not shown  

Impressum Abs_Int_Tests.thy   Sprache: Isabelle

 
(* Author: Tobias Nipkow *)

subsection "Abstract Interpretation Test Programs"

theory Abs_Int_Tests
imports Com
begin

textFor constant propagation:

textStraight line code:
definition "test1_const =
 ''y'' ::= N 7;;
 ''z'' ::= Plus (V ''y'') (N 2);;
 ''y'' ::= Plus (V ''x'') (N 0)"

textConditional:
definition "test2_const =
 IF Less (N 41) (V ''x''THEN ''x'' ::= N 5 ELSE ''x'' ::= N 5"

textConditional, test is relevant:
definition "test3_const =
 ''x'' ::= N 42;;
 IF Less (N 41) (V ''x''THEN ''x'' ::= N 5 ELSE ''x'' ::= N 6"

textWhile:
definition "test4_const =
 ''x'' ::= N 0;; WHILE Bc True DO ''x'' ::= N 0"

textWhile, test is relevant:
definition "test5_const =
 ''x'' ::= N 0;; WHILE Less (V ''x'') (N 1) DO ''x'' ::= N 1"

textIteration is needed:
definition "test6_const =
  ''x'' ::= N 0;; ''y'' ::= N 0;; ''z'' ::= N 2;;
  WHILE Less (V ''x'') (N 1) DO (''x'' ::= V ''y'';; ''y'' ::= V ''z'')"

textFor intervals:

definition "test1_ivl =
 ''y'' ::= N 7;;
 IF Less (V ''x'') (V ''y'')
 THEN ''y'' ::= Plus (V ''y'') (V ''x'')
 ELSE ''x'' ::= Plus (V ''x'') (V ''y'')"

definition "test2_ivl =
 WHILE Less (V ''x'') (N 100)
 DO ''x'' ::= Plus (V ''x'') (N 1)"

definition "test3_ivl =
 ''x'' ::= N 0;;
 WHILE Less (V ''x'') (N 100)
 DO ''x'' ::= Plus (V ''x'') (N 1)"

definition "test4_ivl =
 ''x'' ::= N 0;; ''y'' ::= N 0;;
 WHILE Less (V ''x'') (N 11)
 DO (''x'' ::= Plus (V ''x'') (N 1);; ''y'' ::= Plus (V ''y'') (N 1))"

definition "test5_ivl =
 ''x'' ::= N 0;; ''y'' ::= N 0;;
 WHILE Less (V ''x'') (N 100)
 DO (''y'' ::= V ''x'';; ''x'' ::= Plus (V ''x'') (N 1))"

definition "test6_ivl =
 ''x'' ::= N 0;;
 WHILE Less (N (- 1)) (V ''x'') DO ''x'' ::= Plus (V ''x'') (N 1)"

end

Messung V0.5
C=98 H=98 G=97

¤ Dauer der Verarbeitung: 0.4 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

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.