1 / 10

AsmL beve zetés

AsmL beve zetés. Mi az AsmL?. A bstract S tate M achine L anguage Az AsmL egy az absztrakt állapotgépek (ASM) elméletén alapuló futtatható specifikációs nyelv. Foundations of Software Engineering (FSE). Az FSE egy kutatói csoport a Microsoft Research -nél.

verena
Télécharger la présentation

AsmL beve zetés

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. AsmL bevezetés

  2. Mi az AsmL? • Abstract State Machine Language • Az AsmL egy az absztrakt állapotgépek (ASM) elméletén alapuló futtatható specifikációs nyelv.

  3. Foundations of Software Engineering (FSE) • Az FSEegy kutatói csoport a MicrosoftResearch-nél. • Jelenleg az FSE keretein belül folyik az AsmL-t támogató tool-ok fejlesztése. • Az FSE szakcsoport alapítója az a Yuri Gurevich, aki megalkotta az ASM-ek elméletét. • AsmL weblap: http://research.microsoft.com/fse/asml/

  4. AsmL vs. ASM • Közös terminológia: Def ASM ill., AsmL modell: • Szótár • Kezdőállapot • Szabálydefiníciók (tranzíciók) • De eltérő szemantika!

  5. AsmL szemantika • Szótár = (név, érték) párok , ahol • Név : egy modell változó • Érték : a változóhoz rendelt ÉT egy eleme • Tranzíció = „if-feltétel” (nyelvi szinten) • „ha A állapotban vagyok, akkor B a rákövetkező” • A, ill. B szótárbejegyzések halmazai • Kezdőállapot

  6. AsmL példa: fájl olvasás (kód) Main() initially F as File? = null// kezdőállapot initially FContents = "" initially Mode = "Initial" stepuntilfixpoint// „step” : tranzíció if Mode = "Initial" then//(Mode,”Initial”) pár F := new Open("MyFile.txt") Mode := "Reading" if Mode = "Reading" and Length(FContents) = 0 then FContents := Read(F, 1) if Mode = "Reading" and Length(FContents) = 1 then FContents := FContents + Read(F, 1) if Mode = "Reading" and Length(FContents) > 1 then WriteLine(FContents) Mode := "Finished"

  7. AsmL példa: fájl olvasás

  8. AsmL features (1) class BasicBox var length as Double var width as Double var height as Double Volume() as Double return(length*width*height) class FragileBox extends BasicBox Volume() as Double return (0.85* length*width*height) • OO támogatás • Tagváltozók • Tagfüggvények • Öröklés • Struktúrák structure Point x as Integer y as Integer

  9. AsmL features (2) • Halmazok • Algoritmikus megadás • Műveletek • Únió • Metszet • Nemdeterminizmus A = {1,2,3,4,5} C = {i | i in A where 2*i in A} Main() step WriteLine(B union A) step WriteLine(B intersect A) Main() S = {"a", "b", "c"} choose i in S WriteLine(i + " was chosen.")

  10. .NET támogatás • Visual Studio .NET integráció • Fejlesztés, futtatás, debug • WriteLine() metódus • nyomtatás a standard kimenetre • Implementáció .NET platform AsmL modell C# kód Köztes kód (IL) Natív kód (assembly)

More Related