Eine aufbereitete Darstellung der Quelle

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

Benutzer

Quelle  Export.thy   Sprache: Isabelle

 

section ‹Export›

theory Export
  imports Prover
begin

text ‹In this theory, we make the prover executable using the code interpretation of the abstract
  framework and the Isabelle to Haskell code generator.
›

text ‹To actually execute the prover, we need to lazily evaluate the stream of rules to apply.
 , we will never actually get to a result.
›
code_lazy_type stream

text ‹We would also like to make the evaluation of streams a bit more efficient.›
declare Stream.smember_code [code del]
lemma [code]: "Stream.smember x (y ## s) = (x = y ∨ Stream.smember x s)"
  unfolding Stream.smember_def by auto

text ‹To export code to Haskell, we need to specify that functions on the option type should be
 exported into the equivalent functions on the Maybe monad.
›
code_printing
  constant the ⇀ (Haskell) "MaybeExt.fromJust"
| constant Option.is_none ⇀ (Haskell) "MaybeExt.isNothing"

text ‹To use the Maybe monad, we need to import it, so we add a shim to do so in every module.›
code_printing code_module MaybeExt ⇀ (Haskell)
  ‹module MaybeExt(fromJust, isNothing) where
 import Data.Maybe(fromJust, isNothing);
›

text ‹The default export setup will create a cycle of module imports, so we roll most of the
 theories into one module when exporting to Haskell to prevent this.
›
code_identifier
  code_module Stream ⇀ (Haskell) Prover
| code_module Prover ⇀ (Haskell) Prover
| code_module Export ⇀ (Haskell) Prover
| code_module Option ⇀ (Haskell) Prover
| code_module MaybeExt ⇀ (Haskell) Prover
| code_module Abstract_Completeness ⇀ (Haskell) Prover

text ‹Finally, we define an executable version of the prover using the code interpretation from the
 framework, and a version where the list of terms is initially empty.
›
definition ‹secavTreeCode ≡ i.mkTree (λr s. Some (effect r s)) rules›
definition ‹secavProverCode ≡ λz . secavTreeCode ([], z)›

text ‹We then export this version of the prover into Haskell.›
export_code open secavProverCode in Haskell

end

Messung V0.5 in Prozent
C=63 H=100 G=83

¤ Dauer der Verarbeitung: 0.12 Sekunden  (vorverarbeitet am  2026-09-27) ¤

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






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1126438
#Domains=1867298