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

Quelle  Time_Commands.thy

  Sprache: Isabelle
 

(*
Author: Jonas Stahl

Automatic definition of step-counting running-time functions from HOL functions
following the translation described in Section 1.5, Running Time, of the book
Functional Data Structures and Algorithms. A Proof Assistant Approach. https://fdsa-book.net
*)


theory Time_Commands
  imports Main
  keywords "time_fun" :: thy_decl
    and    "time_function" :: thy_decl
    and    "time_definition" :: thy_decl
    and    "time_partial_function" :: thy_decl
    and    "equations"
    and    "time_fun_0" :: thy_decl
begin

ML_file Time_Commands_0.ML
ML_file Time_Commands.ML

declare [[time_prefix = "T_"]]

text 
  theory provides commands for the automatic definition of step-counting running-time functions
  HOL functions following the translation described in Section 1.5, Running Time, of the book
 Functional Data Structures and Algorithms. A Proof Assistant Approach."
  @{url "https://functional-algorithms-verified.org"}

  time_fun f retrieves the definition of f and defines a corresponding step-counting
 -time function T_f. For all auxiliary functions used by f (excluding constructors),
  time functions must already have been defined.
  the definition of the function requires a manual termination proof,
  time_function accompanied by a termination command.

  pre-defined functions below are assumed to have constant running time.
  fact, we make that constant 0.
  does not change the asymptotic running time of user-defined functions using the
 -defined functions because 1 is added for every user-defined function call.

  of the functions below are polymorphic and reside in type classes.
  constant-time assumption is justified only for those types where the hardware offers
  support, e.g. numeric types. The argument size is implicitly bounded, too.

  constant-time assumption for (=) is justified for recursive data types such as lists and trees
  long as the comparison is of the form t = c where c is a constant term, for example xs = [].

  of this running time framework need to ensure that 0-time functions are used only
  the above restrictions.


time_fun_0 "min"
time_fun_0 "max"
time_fun_0 "(+)"
time_fun_0 "(-)"
time_fun_0 "(*)"
time_fun_0 "(/)"
time_fun_0 "(div)"
time_fun_0 "(<)"
time_fun_0 "()"
time_fun_0 "Not"
time_fun_0 "()"
time_fun_0 "()"
time_fun_0 "Num.numeral_class.numeral"
time_fun_0 "(=)"

end

Messung V0.5 in Prozent
C=93 H=93 G=92

¤ 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.