Eine aufbereitete Darstellung der Quelle

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

Benutzer

Quelle  HelloWorld.thy

  Sprache: Isabelle
 

theory HelloWorld
  imports IO
begin

sectionHello, World!

text
 The idea of a termmain :: unit io function is that, upon start of your program, you will be
 handed a value of type typ🌐. You can pass this world through your code and modify it.
 Be careful with the typ🌐, it's the only one we have.
 



textThe main function, defined in Isabelle. It should have the right type in Haskell.
definition main :: "unit io" where
  "main do {
               _ println (STR ''Hello World! What is your name?'');
               name getLine;
               println (STR ''Hello, '' + name + STR ''!'')
             }"


sectionGenerating Code

textChecking that the generated code compiles.

export_code main checking Haskell? SML

(*<*)
setup 
 
 val parser =
 Scan.repeat (Args.const {proper = true, strict = true}) --
 Scan.lift (🚫in |-- Parse.name -- (🚫module_name |-- Parse.name))

 fun action ctxt (consts, (target, module)) =
 Code_Target.produce_code ctxt false consts target module NONE []
 |> fst
 |> map (Bytes.content o snd) |> String.concatWith "\n"
 
 Document_Output.antiquotation_verbatim @{binding code} parser action
 

(*>*)

subsectionHaskell

textThe generated code in Haskell (including the prelude) is shown below.

text_raw@{code main in Haskell module_name HelloWorld}

subsectionSML

textThe generated code in SML (including the prelude) is shown below.

text_raw@{code main in SML module_name HelloWorld}

end

Messung V0.5 in Prozent
C=41 H=58 G=49

¤ Dauer der Verarbeitung: 0.13 Sekunden  (vorverarbeitet am  2026-07-01) ¤

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

Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik