Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  isint.v   Sprache: Coq

 
(* This file tests the check that arithmetic operations use to know if their
arguments are ground. The various test cases correspond to possible
optimizations of these tests made by the compiler. *)

Require Import PrimInt63.

Set Implicit Arguments.

Open Scope uint63_scope.

Section test.

Variable m n : int.

Check (eq_refl : (fun x => add x 3) m = add m 3).
Check (eq_refl (add m 3) <: (fun x => add x 3) m = add m 3).
Check (eq_refl (add m 3) <<: (fun x => add x 3) m = add m 3).
Definition compute1 := Eval compute in (fun x => add x 3) m.
Check (eq_refl compute1 : add m 3 = add m 3).

Check (eq_refl : (fun x => add 3 x) m = add 3 m).
Check (eq_refl (add 3 m) <: (fun x => add 3 x) m = add 3 m).
Check (eq_refl (add 3 m) <<: (fun x => add 3 x) m = add 3 m).
Definition compute2 := Eval compute in (fun x => add 3 x) m.
Check (eq_refl compute2 : add 3 m = add 3 m).

Check (eq_refl : (fun x y => add x y) m n = add m n).
Check (eq_refl (add m n) <: (fun x y => add x y) m n = add m n).
Check (eq_refl (add m n) <<: (fun x y => add x y) m n = add m n).
Definition compute3 := Eval compute in (fun x y => add x y) m n.
Check (eq_refl compute3 : add m n = add m n).

Check (eq_refl : (fun x y => add x y) 2 3 = 5).
Check (eq_refl 5 <: (fun x y => add x y) 2 3 = 5).
Check (eq_refl 5 <<: (fun x y => add x y) 2 3 = 5).
Definition compute4 := Eval compute in (fun x y => add x y) 2 3.
Check (eq_refl compute4 : 5 = 5).

Check (eq_refl : (fun x => add x x) m = add m m).
Check (eq_refl (add m m) <: (fun x => add x x) m = add m m).
Check (eq_refl (add m m) <<: (fun x => add x x) m = add m m).
Definition compute5 := Eval compute in (fun x => add x x) m.
Check (eq_refl compute5 : add m m = add m m).

Check (eq_refl : (fun x => add x x) 2 = 4).
Check (eq_refl 4 <: (fun x => add x x) 2 = 4).
Check (eq_refl 4 <<: (fun x => add x x) 2 = 4).
Definition compute6 := Eval compute in (fun x => add x x) 2.
Check (eq_refl compute6 : 4 = 4).

End test.

Messung V0.5
C=95 H=89 G=91

¤ Dauer der Verarbeitung: 0.0 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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge