7. Explain all the essentials of Types and Programming Languages operational semantics of Booleans, Figure 3-1, Arithmet

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

7. Explain all the essentials of Types and Programming Languages operational semantics of Booleans, Figure 3-1, Arithmet

Post by answerhappygod »

7. Explain all the essentials of Types and Programming
Languages operational semantics of Booleans, Figure 3-1, Arithmetic
expressions, Figure 3-2, Untyped lambda-calculus, Figure 5-3.
Provide illustrating examples of the usage of each of the
rules.
7 Explain All The Essentials Of Types And Programming Languages Operational Semantics Of Booleans Figure 3 1 Arithmet 1
7 Explain All The Essentials Of Types And Programming Languages Operational Semantics Of Booleans Figure 3 1 Arithmet 1 (91.14 KiB) Viewed 29 times
B (untyped) Syntax Evaluation t t' t if true then t2 else t3 --t2 (E-IFTRUE) true false ift then t else t terms: constant true constant false conditional if false then t2 else t3 = t3 (E-IFFALSE) (E-IF) ti — tí if ti then t2 else t3 niftſ then t2 else të values: true value false value true false Figure 3-1: Booleans (B)
B (untyped) Extends B (3-1) New syntactic forms New evaluation rules t-t' t HE 0 ti — succ ti — succ tí (E-SUCC) terms: constant zero successor predecessor zero test succt pred t iszerot pred 0 - 0 (E-PREDZERO) pred (succ nvı) - nv1 (E-PREDSUCC) V "= values: numeric value ην ti pred ti → ti pred t (E-PRED) ny = 0 succ nv numeric values: zero value successor value iszero 0 -- true (E-ISZEROZERO) iszero (succ nvı) - false (E-ISZEROSUCC) ti iszero ti ti iszerot (E-ISZERO) Figure 3-2: Arithmetic expressions (NB)
– (untyped) Syntax t Evaluation t-t' = Х terms: variable abstraction application ti — tí ti t2 — tít2 (E-APP1) ax.t tt t2 —- tz Vi t2 —— Vi t' (E-APP2) V values: abstraction value dx.t (Ax.t12) V2 -- [x - V2]t12 - (E-APPABS) Figure 5-3: Untyped lambda-calculus (4)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply