Menu
maison
Ajouter le document
Signe
Créer un compte
The Drei Programming Language: Big step semantics
local variable. | set a = t variable assignment. | do t instruction. | printInt(t) print integer. | printChar(t) print character. | {S} sequence. Values v. ::= I(n) integers. | â .
Télécharger le PDF
82KB taille
8 téléchargements
448 vues
commentaire
Report
The Drei Programming Language: Big step semantics LAMP EPFL
Name
a, b
Integer n Unary operator unop ::= − | ! Binary operator binop ::= + | − | ∗ | / | % | == | != | < | ≤ | > | ≥ |∧ Term
t, t0
Statement
S, S 0 ::= | | | | | | |
Values
v
::= I(n) | ∅
integers unit
Frame
σ
::= | a→ 7 v, σ
empty frame
Stack
Σ
::= | σ; Σ
empty stack
::= | | | | | | |
n a unop t t binop t0 readInt readChar {S t} empty
integer literal variable, current instance unary operation binary operation read integer read character block unit
while t S if t then S else S 0 var a : T = t set a = t do t printInt(t) printChar(t) {S}
loop conditional local variable variable assignment instruction print integer print character sequence
Fig. 1. Imperative fragment of Drei
def
def
J−K(n) = −n ( 1 def J!K(n) = 0 ( 1 def J∧K(n1 , n2 ) = 0
J+K(n1 , n2 ) = n1 + n2 def
if n = 0 otherwise
J−K(n1 , n2 ) = n1 − n2 def
if n1 ∗ n2 6= 0 otherwise
J∗K(n1 , n2 ) = n1 ∗ n2 def
J/K(n1 , n2 ) = n1 /n2 def
J%K(n1 , n2 ) = n1 mod n2
Fig. 2. Arithmetic and logical operations on integers ( def
JK(n1 , n2 ) = J
des documents recommandant
aucun document
×
Report The Drei Programming Language: Big step semantics
Your name
Email
Reason
-Select Reason-
Pornographic
Defamatory
Illegal/Unlawful
Spam
Other Terms Of Service Violation
File a copyright complaint
Description
×
Signe
Email
Mot de passe
Se souvenir de moi
Vous avez oublié votre mot de passe?
Signe
Connexion avec Facebook
Our partners will collect data and use cookies for ad personalization and measurement.
Learn how we and our ad partner Google, collect and use data
.
Agree & Close