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

Quelle  Code_Timing.thy   Sprache: Isabelle

 
(*  Title: HOL/ex/Code_Timing.thy
    Author: Florian Haftmann, TU Muenchen, 2016
*)


section Examples for code generation timing measures

theory Code_Timing
imports "HOL-Number_Theory.Eratosthenes"
begin

declare [[code_timing]]

definition primes_upto :: "nat \ int list"
where
  "primes_upto = map int \ Eratosthenes.primes_upto"

definition "required_symbols _ = (primes_upto, 0 :: nat, Suc, 1 :: nat,
  numeral :: num ==> nat, Num.One, Num.Bit0, Num.Bit1,
  Code_Evaluation.TERM_OF_EQUAL :: int list itself)"

ML 
local
  val ctxt = 🍋;
  val consts = [🍋required_symbols];
in
  val simp = Code_Simp.static_conv
    { ctxt = ctxt, consts = consts, simpset = NONE };
  val nbe = Nbe.static_conv
    { ctxt = ctxt, consts = consts };
end;


ML_val 
  simp 🍋 🍋primes_upto 100


ML_val 
  simp 🍋 🍋primes_upto 200


ML_val 
  nbe 🍋 🍋primes_upto 200


ML_val 
  nbe 🍋 🍋primes_upto 400


ML_val 
  nbe 🍋 🍋primes_upto 600


end

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

¤ Dauer der Verarbeitung: 0.14 Sekunden  (vorverarbeitet)  ¤

*© 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.