3.1.5 v4 Languages
(require cpsc411/langs/v4) | package: cpsc411-lib |
values-lang-v4 : grammar?
p | ::= | (module tail) | ||
pred | ::= | (relop triv triv) | ||
| | (true) | |||
| | (false) | |||
| | (not pred) | |||
| | (let ([x value] ...) pred) | |||
| | (if pred pred pred) | |||
tail | ::= | value | ||
| | (let ([x value] ...) tail) | |||
| | (if pred tail tail) | |||
value | ::= | triv | ||
| | (binop triv triv) | |||
| | (let ([x value] ...) value) | |||
| | (if pred value value) | |||
triv | ::= | x | ||
| | int64 | |||
x | ::= | name? | ||
binop | ::= | * | ||
| | + | |||
relop | ::= | < | ||
| | <= | |||
| | = | |||
| | >= | |||
| | > | |||
| | != | |||
int64 | ::= | int64? |
procedure
(values-lang-v4? a) → boolean?
a : any/c
procedure
(interp-values-lang-v4 a) → any/c
a : values-lang-v4?
values-unique-lang-v4 : grammar?
p | ::= | (module tail) | ||
pred | ::= | (relop triv triv) | ||
| | (true) | |||
| | (false) | |||
| | (not pred) | |||
| | (let ([aloc value] ...) pred) | |||
| | (if pred pred pred) | |||
tail | ::= | value | ||
| | (let ([aloc value] ...) tail) | |||
| | (if pred tail tail) | |||
value | ::= | triv | ||
| | (binop triv triv) | |||
| | (let ([aloc value] ...) value) | |||
| | (if pred value value) | |||
triv | ::= | aloc | ||
| | int64 | |||
binop | ::= | * | ||
| | + | |||
relop | ::= | < | ||
| | <= | |||
| | = | |||
| | >= | |||
| | > | |||
| | != | |||
aloc | ::= | aloc? | ||
int64 | ::= | int64? |
procedure
a : any/c
procedure
a : values-unique-lang-v4?
imp-mf-lang-v4 : grammar?
p | ::= | (module tail) | ||
pred | ::= | (relop triv triv) | ||
| | (true) | |||
| | (false) | |||
| | (not pred) | |||
| | (begin effect ... pred) | |||
| | (if pred pred pred) | |||
tail | ::= | value | ||
| | (begin effect ... tail) | |||
| | (if pred tail tail) | |||
value | ::= | triv | ||
| | (binop triv triv) | |||
| | (if pred value value) | |||
| | (begin effect ... value) | |||
effect | ::= | (set! aloc value) | ||
| | (if pred effect effect) | |||
| | (begin effect ... effect) | |||
triv | ::= | aloc | ||
| | int64 | |||
binop | ::= | * | ||
| | + | |||
relop | ::= | < | ||
| | <= | |||
| | = | |||
| | >= | |||
| | > | |||
| | != | |||
aloc | ::= | aloc? | ||
int64 | ::= | int64? |
procedure
(imp-mf-lang-v4? a) → boolean?
a : any/c
procedure
(interp-imp-mf-lang-v4 a) → any/c
a : imp-mf-lang-v4?
imp-cmf-lang-v4 : grammar?
p | ::= | (module tail) | ||
pred | ::= | (relop triv triv) | ||
| | (true) | |||
| | (false) | |||
| | (not pred) | |||
| | (begin effect ... pred) | |||
| | (if pred pred pred) | |||
tail | ::= | value | ||
| | (begin effect ... tail) | |||
| | (if pred tail tail) | |||
value | ::= | triv | ||
| | (binop triv triv) | |||
effect | ::= | (set! aloc value) | ||
| | (begin effect ... effect) | |||
| | (if pred effect effect) | |||
triv | ::= | aloc | ||
| | int64 | |||
binop | ::= | * | ||
| | + | |||
relop | ::= | < | ||
| | <= | |||
| | = | |||
| | >= | |||
| | > | |||
| | != | |||
aloc | ::= | aloc? | ||
int64 | ::= | int64? |
procedure
(imp-cmf-lang-v4? a) → boolean?
a : any/c
procedure
(interp-imp-cmf-lang-v4 a) → any/c
a : imp-cmf-lang-v4?
asm-pred-lang-v4 : grammar?
p | ::= | (module info tail) | ||
info | ::= | info? | ||
pred | ::= | (relop aloc triv) | ||
| | (true) | |||
| | (false) | |||
| | (not pred) | |||
| | (begin effect ... pred) | |||
| | (if pred pred pred) | |||
tail | ::= | (halt triv) | ||
| | (begin effect ... tail) | |||
| | (if pred tail tail) | |||
effect | ::= | (set! aloc triv) | ||
| | (set! aloc_1 (binop aloc_1 triv)) | |||
| | (begin effect ... effect) | |||
| | (if pred effect effect) | |||
triv | ::= | aloc | ||
| | int64 | |||
binop | ::= | * | ||
| | + | |||
relop | ::= | < | ||
| | <= | |||
| | = | |||
| | >= | |||
| | > | |||
| | != | |||
aloc | ::= | aloc? | ||
int64 | ::= | int64? |
procedure
(asm-pred-lang-v4? a) → boolean?
a : any/c
procedure
(interp-asm-pred-lang-v4 a) → any/c
a : asm-pred-lang-v4?
asm-pred-lang-v4/locals : grammar?
p | ::= | (module info tail) | ||
info | ::= | (#:from-contract (info/c (locals (aloc ...)))) | ||
pred | ::= | (relop aloc triv) | ||
| | (true) | |||
| | (false) | |||
| | (not pred) | |||
| | (begin effect ... pred) | |||
| | (if pred pred pred) | |||
tail | ::= | (halt triv) | ||
| | (begin effect ... tail) | |||
| | (if pred tail tail) | |||
effect | ::= | (set! aloc triv) | ||
| | (set! aloc_1 (binop aloc_1 triv)) | |||
| | (begin effect ... effect) | |||
| | (if pred effect effect) | |||
triv | ::= | aloc | ||
| | int64 | |||
binop | ::= | * | ||
| | + | |||
relop | ::= | < | ||
| | <= | |||
| | = | |||
| | >= | |||
| | > | |||
| | != | |||
aloc | ::= | aloc? | ||
int64 | ::= | int64? |
procedure
a : any/c
procedure
a : asm-pred-lang-v4/locals?
asm-pred-lang-v4/undead : grammar?
p | ::= | (module info tail) | ||
info | ::= | (#:from-contract (info/c (locals (aloc ...)) (undead-out undead-set-tree?))) | ||
pred | ::= | (relop aloc triv) | ||
| | (true) | |||
| | (false) | |||
| | (not pred) | |||
| | (begin effect ... pred) | |||
| | (if pred pred pred) | |||
tail | ::= | (halt triv) | ||
| | (begin effect ... tail) | |||
| | (if pred tail tail) | |||
effect | ::= | (set! aloc triv) | ||
| | (set! aloc_1 (binop aloc_1 triv)) | |||
| | (begin effect ... effect) | |||
| | (if pred effect effect) | |||
triv | ::= | aloc | ||
| | int64 | |||
binop | ::= | * | ||
| | + | |||
relop | ::= | < | ||
| | <= | |||
| | = | |||
| | >= | |||
| | > | |||
| | != | |||
aloc | ::= | aloc? | ||
int64 | ::= | int64? |
procedure
a : any/c
procedure
a : asm-pred-lang-v4/undead?
asm-pred-lang-v4/conflicts : grammar?
p | ::= | (module info tail) | ||
info | ::= | (#:from-contract (info/c (locals (aloc ...)) (conflicts ((aloc (aloc ...)) ...)))) | ||
pred | ::= | (relop aloc triv) | ||
| | (true) | |||
| | (false) | |||
| | (not pred) | |||
| | (begin effect ... pred) | |||
| | (if pred pred pred) | |||
tail | ::= | (halt triv) | ||
| | (begin effect ... tail) | |||
| | (if pred tail tail) | |||
effect | ::= | (set! aloc triv) | ||
| | (set! aloc_1 (binop aloc_1 triv)) | |||
| | (begin effect ... effect) | |||
| | (if pred effect effect) | |||
triv | ::= | aloc | ||
| | int64 | |||
binop | ::= | * | ||
| | + | |||
relop | ::= | < | ||
| | <= | |||
| | = | |||
| | >= | |||
| | > | |||
| | != | |||
aloc | ::= | aloc? | ||
int64 | ::= | int64? |
procedure
a : any/c
procedure
a : asm-pred-lang-v4/conflicts?
asm-pred-lang-v4/assignments : grammar?
p | ::= | (module info tail) | ||
info | ::= | (#:from-contract (info/c (locals (aloc ...)) (assignment ((aloc rloc) ...)))) | ||
pred | ::= | (relop aloc triv) | ||
| | (true) | |||
| | (false) | |||
| | (not pred) | |||
| | (begin effect ... pred) | |||
| | (if pred pred pred) | |||
tail | ::= | (halt triv) | ||
| | (begin effect ... tail) | |||
| | (if pred tail tail) | |||
effect | ::= | (set! aloc triv) | ||
| | (set! aloc_1 (binop aloc_1 triv)) | |||
| | (begin effect ... effect) | |||
| | (if pred effect effect) | |||
triv | ::= | aloc | ||
| | int64 | |||
rloc | ::= | reg | ||
| | fvar | |||
reg | ::= | rsp | ||
| | rbp | |||
| | rax | |||
| | rbx | |||
| | rcx | |||
| | rdx | |||
| | rsi | |||
| | rdi | |||
| | r8 | |||
| | r9 | |||
| | r12 | |||
| | r13 | |||
| | r14 | |||
| | r15 | |||
binop | ::= | * | ||
| | + | |||
relop | ::= | < | ||
| | <= | |||
| | = | |||
| | >= | |||
| | > | |||
| | != | |||
aloc | ::= | aloc? | ||
fvar | ::= | fvar? | ||
int64 | ::= | int64? |
procedure
a : any/c
procedure
a : asm-pred-lang-v4/assignments?
nested-asm-lang-v4 : grammar?
p | ::= | (module tail) | ||
pred | ::= | (relop loc triv) | ||
| | (true) | |||
| | (false) | |||
| | (not pred) | |||
| | (begin effect ... pred) | |||
| | (if pred pred pred) | |||
tail | ::= | (halt triv) | ||
| | (begin effect ... tail) | |||
| | (if pred tail tail) | |||
effect | ::= | (set! loc triv) | ||
| | (set! loc_1 (binop loc_1 triv)) | |||
| | (begin effect ... effect) | |||
| | (if pred effect effect) | |||
triv | ::= | loc | ||
| | int64 | |||
loc | ::= | reg | ||
| | fvar | |||
reg | ::= | rsp | ||
| | rbp | |||
| | rax | |||
| | rbx | |||
| | rcx | |||
| | rdx | |||
| | rsi | |||
| | rdi | |||
| | r8 | |||
| | r9 | |||
| | r12 | |||
| | r13 | |||
| | r14 | |||
| | r15 | |||
binop | ::= | * | ||
| | + | |||
relop | ::= | < | ||
| | <= | |||
| | = | |||
| | >= | |||
| | > | |||
| | != | |||
fvar | ::= | fvar? | ||
int64 | ::= | int64? |
procedure
(nested-asm-lang-v4? a) → boolean?
a : any/c
procedure
a : nested-asm-lang-v4?
block-pred-lang-v4 : grammar?
p | ::= | (module b ... b) | ||
b | ::= | (define label tail) | ||
pred | ::= | (relop loc opand) | ||
| | (true) | |||
| | (false) | |||
| | (not pred) | |||
tail | ::= | (halt opand) | ||
| | (jump trg) | |||
| | (begin effect ... tail) | |||
| | (if pred (jump trg) (jump trg)) | |||
effect | ::= | (set! loc triv) | ||
| | (set! loc_1 (binop loc_1 opand)) | |||
triv | ::= | opand | ||
| | label | |||
opand | ::= | loc | ||
| | int64 | |||
trg | ::= | loc | ||
| | label | |||
loc | ::= | reg | ||
| | fvar | |||
reg | ::= | rsp | ||
| | rbp | |||
| | rax | |||
| | rbx | |||
| | rcx | |||
| | rdx | |||
| | rsi | |||
| | rdi | |||
| | r8 | |||
| | r9 | |||
| | r12 | |||
| | r13 | |||
| | r14 | |||
| | r15 | |||
binop | ::= | * | ||
| | + | |||
relop | ::= | < | ||
| | <= | |||
| | = | |||
| | >= | |||
| | > | |||
| | != | |||
int64 | ::= | int64? | ||
fvar | ::= | fvar? | ||
label | ::= | label? |
procedure
(block-pred-lang-v4? a) → boolean?
a : any/c
procedure
a : block-pred-lang-v4?
block-asm-lang-v4 : grammar?
p | ::= | (module b ... b) | ||
b | ::= | (define label tail) | ||
tail | ::= | (halt opand) | ||
| | (jump trg) | |||
| | (begin effect ... tail) | |||
| | (if (relop loc opand) (jump trg) (jump trg)) | |||
effect | ::= | (set! loc triv) | ||
| | (set! loc_1 (binop loc_1 opand)) | |||
triv | ::= | opand | ||
| | label | |||
opand | ::= | loc | ||
| | int64 | |||
trg | ::= | loc | ||
| | label | |||
loc | ::= | reg | ||
| | fvar | |||
reg | ::= | rsp | ||
| | rbp | |||
| | rax | |||
| | rbx | |||
| | rcx | |||
| | rdx | |||
| | rsi | |||
| | rdi | |||
| | r8 | |||
| | r9 | |||
| | r12 | |||
| | r13 | |||
| | r14 | |||
| | r15 | |||
binop | ::= | * | ||
| | + | |||
relop | ::= | < | ||
| | <= | |||
| | = | |||
| | >= | |||
| | > | |||
| | != | |||
int64 | ::= | int64? | ||
fvar | ::= | fvar? | ||
label | ::= | label? |
procedure
(block-asm-lang-v4? a) → boolean?
a : any/c
procedure
a : block-asm-lang-v4?
para-asm-lang-v4 : grammar?
p | ::= | (begin s ...) | ||
s | ::= | (halt opand) | ||
| | (set! loc triv) | |||
| | (set! loc_1 (binop loc_1 opand)) | |||
| | (jump trg) | |||
| | (with-label label s) | |||
| | (compare loc opand) | |||
| | (jump-if relop trg) | |||
triv | ::= | opand | ||
| | label | |||
opand | ::= | loc | ||
| | int64 | |||
trg | ::= | loc | ||
| | label | |||
loc | ::= | reg | ||
| | fvar | |||
reg | ::= | rsp | ||
| | rbp | |||
| | rax | |||
| | rbx | |||
| | rcx | |||
| | rdx | |||
| | rsi | |||
| | rdi | |||
| | r8 | |||
| | r9 | |||
| | r12 | |||
| | r13 | |||
| | r14 | |||
| | r15 | |||
binop | ::= | * | ||
| | + | |||
relop | ::= | < | ||
| | <= | |||
| | = | |||
| | >= | |||
| | > | |||
| | != | |||
int64 | ::= | int64? | ||
fvar | ::= | fvar? | ||
label | ::= | label? |
procedure
(para-asm-lang-v4? a) → boolean?
a : any/c
procedure
(interp-para-asm-lang-v4 a) → any/c
a : para-asm-lang-v4?
paren-x64-fvars-v4 : grammar?
p | ::= | (begin s ...) | ||
s | ::= | (set! fvar int32) | ||
| | (set! fvar trg) | |||
| | (set! reg loc) | |||
| | (set! reg triv) | |||
| | (set! reg_1 (binop reg_1 int32)) | |||
| | (set! reg_1 (binop reg_1 loc)) | |||
| | (with-label label s) | |||
| | (jump trg) | |||
| | (compare reg opand) | |||
| | (jump-if relop label) | |||
trg | ::= | reg | ||
| | label | |||
triv | ::= | trg | ||
| | int64 | |||
opand | ::= | reg | ||
| | int64 | |||
loc | ::= | reg | ||
| | fvar | |||
reg | ::= | rsp | ||
| | rbp | |||
| | rax | |||
| | rbx | |||
| | rcx | |||
| | rdx | |||
| | rsi | |||
| | rdi | |||
| | r8 | |||
| | r9 | |||
| | r10 | |||
| | r11 | |||
| | r12 | |||
| | r13 | |||
| | r14 | |||
| | r15 | |||
binop | ::= | * | ||
| | + | |||
relop | ::= | < | ||
| | <= | |||
| | = | |||
| | >= | |||
| | > | |||
| | != | |||
int64 | ::= | int64? | ||
int32 | ::= | int32? | ||
fvar | ::= | fvar? | ||
label | ::= | label? |
procedure
(paren-x64-fvars-v4? a) → boolean?
a : any/c
procedure
a : paren-x64-fvars-v4?
paren-x64-rt-v4 : grammar?
p | ::= | (begin s ...) | ||
s | ::= | (set! addr int32) | ||
| | (set! addr trg) | |||
| | (set! reg loc) | |||
| | (set! reg triv) | |||
| | (set! reg_1 (binop reg_1 int32)) | |||
| | (set! reg_1 (binop reg_1 loc)) | |||
| | (jump trg) | |||
| | (compare reg opand) | |||
| | (jump-if relop pc-addr) | |||
trg | ::= | reg | ||
| | pc-addr | |||
triv | ::= | trg | ||
| | int64 | |||
opand | ::= | reg | ||
| | int64 | |||
loc | ::= | reg | ||
| | addr | |||
reg | ::= | rsp | ||
| | rbp | |||
| | rax | |||
| | rbx | |||
| | rcx | |||
| | rdx | |||
| | rsi | |||
| | rdi | |||
| | r8 | |||
| | r9 | |||
| | r10 | |||
| | r11 | |||
| | r12 | |||
| | r13 | |||
| | r14 | |||
| | r15 | |||
addr | ::= | (fbp - dispoffset) | ||
fbp | ::= | frame-base-pointer-register? | ||
binop | ::= | * | ||
| | + | |||
relop | ::= | < | ||
| | <= | |||
| | = | |||
| | >= | |||
| | > | |||
| | != | |||
int64 | ::= | int64? | ||
int32 | ::= | int32? | ||
pc-addr | ::= | natural-number/c | ||
dispoffset | ::= | dispoffset? |
procedure
(paren-x64-rt-v4? a) → boolean?
a : any/c
procedure
(interp-paren-x64-rt-v4 a) → any/c
a : paren-x64-rt-v4?
paren-x64-v4 : grammar?
p | ::= | (begin s ...) | ||
s | ::= | (set! addr int32) | ||
| | (set! addr trg) | |||
| | (set! reg loc) | |||
| | (set! reg triv) | |||
| | (set! reg_1 (binop reg_1 int32)) | |||
| | (set! reg_1 (binop reg_1 loc)) | |||
| | (with-label label s) | |||
| | (jump trg) | |||
| | (compare reg opand) | |||
| | (jump-if relop label) | |||
trg | ::= | reg | ||
| | label | |||
triv | ::= | trg | ||
| | int64 | |||
opand | ::= | reg | ||
| | int64 | |||
loc | ::= | reg | ||
| | addr | |||
reg | ::= | rsp | ||
| | rbp | |||
| | rax | |||
| | rbx | |||
| | rcx | |||
| | rdx | |||
| | rsi | |||
| | rdi | |||
| | r8 | |||
| | r9 | |||
| | r10 | |||
| | r11 | |||
| | r12 | |||
| | r13 | |||
| | r14 | |||
| | r15 | |||
addr | ::= | (fbp - dispoffset) | ||
fbp | ::= | frame-base-pointer-register? | ||
binop | ::= | * | ||
| | + | |||
relop | ::= | < | ||
| | <= | |||
| | = | |||
| | >= | |||
| | > | |||
| | != | |||
int64 | ::= | int64? | ||
int32 | ::= | int32? | ||
dispoffset | ::= | dispoffset? | ||
label | ::= | label? |
procedure
(paren-x64-v4? a) → boolean?
a : any/c
procedure
(interp-paren-x64-v4 a) → any/c
a : paren-x64-v4?