Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Isabelle/HOL/ex/   (Isabelle Prover 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 ‹
 
 val ctxt = context;
 val consts = [const_name‹required_symbols›];
 
 val simp = Code_Simp.static_conv
 { ctxt = ctxt, consts = consts, simpset = NONE };
 val nbe = Nbe.static_conv
 { ctxt = ctxt, consts = consts };
 ;
 
›

ML_val ‹
 simp context 🚫‹primes_upto 100›
 
›

ML_val ‹
 simp context 🚫‹primes_upto 200›
 
›

ML_val ‹
 nbe context 🚫‹primes_upto 200›
 
›

ML_val ‹
 nbe context 🚫‹primes_upto 400›
 
›

ML_val ‹
 nbe context 🚫‹primes_upto 600›
 
›

end

Messung V0.5 in Prozent
C=38 H=-122 G=90

¤ Dauer der Verarbeitung: 0.10 Sekunden  (vorverarbeitet am  2026-09-29) ¤

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