91精品国产91久久久久久_国产精品二区一区二区aⅴ污介绍_一本久久a久久精品vr综合_亚洲视频一区二区三区

合肥生活安徽新聞合肥交通合肥房產(chǎn)生活服務(wù)合肥教育合肥招聘合肥旅游文化藝術(shù)合肥美食合肥地圖合肥社保合肥醫(yī)院企業(yè)服務(wù)合肥法律

COMP4233代做、代寫Python/Java程序
COMP4233代做、代寫Python/Java程序

時間:2025-06-04  來源:合肥網(wǎng)hfw.cc  作者:hfw.cc 我要糾錯



COMP4233 25S
Programming Assignment
Introduction
In Lecture 11, we implement an integer calculator, which consists of 
- int : the only data type for integers
- + : binary operator for integer addition
- * : binary operator for integer multiplication
- ( ) : parentheses for force parsing
- parser and evaluator of the expressions in this language.
In Lab 11, we extend the language by let expression, identifiers and its evaluator in the 
substitution model. This upgrade implements a naming system for the language.
Syntax
In this programming assignment, you need to further extend the language with following 
features.
1. if … then … else … : the “if” expression, which can branch computations under 
some conditions.
2. fun … -> … : function definitions, which can also be with let to name them.
To make if statement work properly, we also need 
3. a new data type bool, the guard in if;
4. constants in bool are either true or false;
5. Boolean binary operator ^, boolean conjunction;
6. bool can be constructed from the relational operator <=, integer “less or equal to”.
We want to add a little bit more complex structure into our language, which are
7. a new data type list with only one constant list [] – the empty list; and
8. lists can be constructed by binary operator ::, which is right associative.
Combining everything above, the entire grammar is
<prog> -> <expr> EOF
<expr> -> int
 | <expr> + <expr>
 | <expr> * <expr>
 | ( <expr> )
 | id
 | let id = <expr> in <expr>
 | fun id -> <expr>
 | <expr> <expr>
 | if <expr> then <expr> else <expr>
 | bool
 | <expr> <= <expr>
 | <expr> ^ <expr>
 | []
 | <expr> :: <expr>
Note that <expr> -> <expr> <expr> is the syntax for function application.
For the precedence of operators, we only specify + is lower than *. Others will be guaranteed 
by parentheses. For example, ambiguous expressions like fun a -> a 1 will be excluded 
from testcases. This expression has to be either fun a -> (a 1) or (fun a -> a) 1.
Typing
To make your life easy, type system is excluded from this project. Thus, expressions with 
type errors, like 1 + true are excluded from testcases.
Evaluation
The evaluation for operators simply follows their behaviors in mathematics. Students should 
understand them easily. But if a student insists true ^ true --> false, marks will be 
remove. Goliath does not want to argue.
The evaluation for let expression is implemented by substitution model and already given in 
Lab 11.
let <x> = v in <expr> --> <e>{v / <x>}
(let <x> = v in <expr>){v / <y>} -->
if <x> = <y> then (let <x> = <expr>)
else (let <x> = <expr>{v / <y>}
Students should figure out the substitutions for functions, function applications, and lists by 
themselves, which is interesting and not difficult. Furthermore, we also guarantee that 
function arguments are of distinct names. Expressions like let x = z in (fun z -> x)
are excluded from testcases. The following substitution is naïve and not correct.
let x = z in (fun z -> x)
 --> (fun z -> x) {z / x}
 --> fun z -> x {z / x}
 --> fun z -> z
 -/->
Output
To printout an AST, two functions string_of_val and string_of_bop are defined in 
main.ml. You can also apply these functions to see if your implementation works normally.
Example
Here is one example, 
let x=(fun a -> (if (a <= 1) then true else false)) in ((x 1) :: [])
is parsed into 
and evaluated as
let x=(fun a -> (if (a <= 1) then true else false)) in ((x 1) :: [])
--> ((x 1) :: []){fun a -> .. /x}
--> ((x 1){fun a -> .. /x} :: []{fun a -> .. /x}
--> ((x{fun a -> .. /x} 1{fun a -> .. /x}) :: []{fun a -> .. /x})
--> (((fun a -> ..) 1{fun a -> .. /x}) :: []{fun a -> .. /x})
--> (((fun a -> ..) 1) :: []{fun a -> .. /x})
--> (((fun a ->(if (a<=1) then true else false) 1) :: [])
--> ((if (a <= 1) then true else false){1/a} :: [])
--> ((if (a <= 1){1/a} then true{1/a} else false{1/a}) :: [])
--> ((if (a{1/a} <= 1{1/a}) then true{1/a} else false{1/a}) :: [])
--> ((if (1 <= 1{1/a}) then true{1/a} else false{1/a}) :: [])
--> ((if (1 <= 1) then true{1/a} else false{1/a}) :: [])
--> ((if true then true{1/a} else false{1/a}) :: [])
--> (true{1/a} :: [])
--> (true :: [])
-/-> 
Submission
ast.ml and lexer.mll are given in the package. You only need to implement 
parser.mly and main.ml. You don’t need to change anything else, including file names.
Grade distribution
- Submission 5%
- Compilation 5%
- parsing if statements 15%
- evaluating if statements 10%
- parsing functions and function applications 15%
- evaluating functions and function applications 10%
- parsing & evaluating relational operator <= 10%
- parsing & evaluating Boolean conjunction ^ 10%
- parsing lists 10%
- evaluating lists 10%
Select the features that you have implemented in check_list.md by [x].

請加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp

掃一掃在手機(jī)打開當(dāng)前頁
  • 上一篇:代做159.342 、代寫Operating Systems 編程設(shè)計
  • 下一篇:代寫MIT203、代做SQL編程設(shè)計
  • 無相關(guān)信息
    合肥生活資訊

    合肥圖文信息
    2025年10月份更新拼多多改銷助手小象助手多多出評軟件
    2025年10月份更新拼多多改銷助手小象助手多
    有限元分析 CAE仿真分析服務(wù)-企業(yè)/產(chǎn)品研發(fā)/客戶要求/設(shè)計優(yōu)化
    有限元分析 CAE仿真分析服務(wù)-企業(yè)/產(chǎn)品研發(fā)
    急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計優(yōu)化
    急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計優(yōu)化
    出評 開團(tuán)工具
    出評 開團(tuán)工具
    挖掘機(jī)濾芯提升發(fā)動機(jī)性能
    挖掘機(jī)濾芯提升發(fā)動機(jī)性能
    海信羅馬假日洗衣機(jī)亮相AWE  復(fù)古美學(xué)與現(xiàn)代科技完美結(jié)合
    海信羅馬假日洗衣機(jī)亮相AWE 復(fù)古美學(xué)與現(xiàn)代
    合肥機(jī)場巴士4號線
    合肥機(jī)場巴士4號線
    合肥機(jī)場巴士3號線
    合肥機(jī)場巴士3號線
  • 短信驗(yàn)證碼 目錄網(wǎng) 排行網(wǎng)

    關(guān)于我們 | 打賞支持 | 廣告服務(wù) | 聯(lián)系我們 | 網(wǎng)站地圖 | 免責(zé)聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網(wǎng) 版權(quán)所有
    ICP備06013414號-3 公安備 42010502001045

    91精品国产91久久久久久_国产精品二区一区二区aⅴ污介绍_一本久久a久久精品vr综合_亚洲视频一区二区三区
    欧美一卡二卡在线观看| 欧美电视剧免费观看| 日本中文字幕一区| 欧美色综合影院| 国产精品一区久久久久| 欧美成va人片在线观看| 91老司机福利 在线| 国产精品白丝在线| 亚洲一区欧美激情| 精品影院一区二区久久久| 91精品国产手机| 欧美在线1区| 亚洲精选在线视频| 在线日韩国产精品| 成人综合婷婷国产精品久久 | 亚洲一区二区美女| 色综合久久99| 成人丝袜18视频在线观看| 国产精品天天摸av网| 久久av一区二区三区| 久久99最新地址| 久久―日本道色综合久久| 日韩一级在线| 国产一区二区视频在线播放| 欧美日韩国产免费观看| 亚洲欧美韩国综合色| 欧美在线观看一区二区| 99久久综合国产精品| 亚洲裸体xxx| 欧美二区乱c少妇| 国模精品一区二区三区| 日本 国产 欧美色综合| 久久免费偷拍视频| 亚洲欧美视频一区二区三区| 国产69精品久久777的优势| 《视频一区视频二区| 欧美日韩综合在线免费观看| 欧美精品免费观看二区| 蜜臀va亚洲va欧美va天堂| 久久亚洲精华国产精华液| 亚洲欧美日本视频在线观看| 成熟亚洲日本毛茸茸凸凹| 亚洲精品国产一区二区三区四区在线| 欧美日韩久久久久久| 国产综合精品一区| 韩国女主播成人在线| 中文字幕一区二区三区不卡在线| 91电影在线观看| 欧美日本韩国在线| 精品在线播放免费| 亚洲精品国产品国语在线app| 717成人午夜免费福利电影| 亚洲精品看片| 国产99精品在线观看| 亚洲成人免费看| 精品少妇一区二区三区| 久久亚洲午夜电影| 韩日视频一区| 成人一区在线看| 久久国产精品色婷婷| 久久综合久久综合久久| 在线观看免费一区| 亚洲久久在线| www.成人网.com| 精品在线观看免费| 五月天亚洲婷婷| 综合欧美亚洲日本| 久久精品视频在线看| 欧美精品色综合| 久久婷婷人人澡人人喊人人爽| 好吊色欧美一区二区三区四区| 国产精品自拍在线| 欧美bbbbb| 亚洲午夜一区二区三区| 国产三级精品三级在线专区| 69精品人人人人| 欧美专区日韩专区| 麻豆av一区二区三区| 夜夜嗨一区二区| 欧美日韩高清在线一区| av电影在线不卡| 国产一区91精品张津瑜| 麻豆视频一区二区| 亚洲国产va精品久久久不卡综合| 日本一区二区三区在线不卡| 精品福利视频一区二区三区| 欧美日本在线一区| 欧美系列一区二区| 日本高清不卡在线观看| 国产精品综合色区在线观看| 黄色日韩精品| 狠狠色综合网站久久久久久久| 91欧美一区二区| 95精品视频在线| caoporn国产一区二区| 国产精品亚洲一区二区三区妖精| 精品一区二区三区视频| 精品一区二区在线视频| 秋霞影院一区二区| 蜜桃一区二区三区在线| 视频一区二区中文字幕| 日韩高清在线一区| 日韩电影一二三区| 日韩电影网1区2区| 美女性感视频久久| 一区二区高清视频在线观看| 欧美一区永久视频免费观看| 欧美女孩性生活视频| 欧美日韩国产小视频| 欧美色倩网站大全免费| 欧美猛男超大videosgay| 欧美乱熟臀69xxxxxx| 欧美一级电影网站| 日韩精品一区二区三区视频播放| 日韩一区二区三区精品视频| 欧美成人官网二区| 国产日韩欧美一区二区三区乱码| 日本一区二区视频在线观看| 国产欧美日韩三区| 亚洲色图制服丝袜| 亚洲高清久久久| 免费高清成人在线| 国产999精品久久久久久绿帽| 不卡一二三区首页| 国语自产精品视频在线看抢先版结局| 精品不卡一区二区三区| 国产欧美一级| 色拍拍在线精品视频8848| 6080日韩午夜伦伦午夜伦| 欧美videos大乳护士334| 日本一区二区三区在线不卡| 一区二区在线观看不卡| 日韩精品国产精品| 国产91精品久久久久久久网曝门| 91亚洲永久精品| 国产欧美韩日| 在线观看亚洲精品视频| 日韩精品资源二区在线| 国产精品久久久久久久第一福利 | 狠狠色综合网站久久久久久久| 国产精品久久久久久久久久妞妞| 色综合久久久久久久| 日韩午夜av一区| 国产精品视频一二三| 婷婷成人激情在线网| 丁香五精品蜜臀久久久久99网站| 欧美成人免费在线| 国产精品免费在线| 欧美性受xxxx| 精品久久久久久久久久久久久久久 | 99精品福利视频| 欧美挠脚心视频网站| 国产亚洲欧美色| 水野朝阳av一区二区三区| 成人免费视频网站在线观看| 欧美欧美天天天天操| 色哟哟国产精品| 精品福利在线导航| 亚洲chinese男男1069| 国产高清精品在线| 国产欧美一区二区色老头| 欧美日本韩国一区二区三区视频| 国产精品蜜臀在线观看| 麻豆91精品91久久久的内涵| 91视频xxxx| 在线免费视频一区二区| 国产精品毛片高清在线完整版| 日韩高清不卡在线| 欧美国产激情| 欧美性猛交xxxx乱大交退制版| 中文字幕 久热精品 视频在线| 久久国产婷婷国产香蕉| 亚洲午夜久久久久久尤物| 欧美日韩久久不卡| 亚洲图片另类小说| 国产成人精品一区二区三区网站观看 | 91麻豆免费视频| 色偷偷88欧美精品久久久| 国产亲近乱来精品视频| 精品一区二区三区在线播放视频 | 91麻豆成人久久精品二区三区| 久久国产免费| 国产精品久久久久久久午夜片| 精品制服美女丁香| 国产亚洲成人一区| 久久久精品天堂| 国产在线精品一区二区夜色| 亚洲美女视频在线免费观看 | 中文字幕欧美三区| 久久疯狂做爰流白浆xx| 国产亚洲精品久久飘花| 国产午夜精品久久久久久免费视 | 在线中文字幕一区二区| 亚洲人成网站精品片在线观看| 成人中文字幕电影| 欧美日韩中文精品| 香蕉成人伊视频在线观看| 影院欧美亚洲| 久久久久国产精品免费免费搜索 | 久久99精品一区二区三区|