Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Roqc/test-suite/complexity/   (NIST Cobol Test-Suite ©)  Datei vom 15.8.2025 mit Größe 502 B image not shown  

Quelle  guard.v

  Sprache: Coq
 

(* Examples to check that the guard condition does not evaluate
   irrelevant subterms *)

(* Expected time < 1.00s *)

Fixpoint slow n :=
 match n with
 | 0 => true
 | S k => andb (slow k) (slow k)
 end.

Timeout 5 Time Fixpoint F n :=
  match n with
  | 0 => 0
  | S k =>
    if slow 100 then F k else 0
  end.

Fixpoint slow2 n :=
 match n with
 | 0 => 0
 | S k => slow2 k + slow2 k
 end.

Timeout 5 Time Fixpoint F' n :=
  match n with
  | 0 => 0
  | S k =>
    if slow2 100 then F' k else 0
  end.

Messung V0.5 in Prozent
C=91 H=99 G=94

¤ Dauer der Verarbeitung: 0.10 Sekunden  (vorverarbeitet am  2026-06-04) ¤

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