国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看

合肥生活安徽新聞合肥交通合肥房產生活服務合肥教育合肥招聘合肥旅游文化藝術合肥美食合肥地圖合肥社保合肥醫院企業服務合肥法律

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

時間:2025-06-04  來源:合肥網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

掃一掃在手機打開當前頁
  • 上一篇:代做159.342 、代寫Operating Systems 編程設計
  • 下一篇:代寫MIT203、代做SQL編程設計
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    流體仿真外包多少錢_專業CFD分析代做_友商科技CAE仿真
    流體仿真外包多少錢_專業CFD分析代做_友商科
    CAE仿真分析代做公司 CFD流體仿真服務 管路流場仿真外包
    CAE仿真分析代做公司 CFD流體仿真服務 管路
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真技術服務
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲勞振動
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲
    流體cfd仿真分析服務 7類仿真分析代做服務40個行業
    流體cfd仿真分析服務 7類仿真分析代做服務4
    超全面的拼多多電商運營技巧,多多開團助手,多多出評軟件徽y1698861
    超全面的拼多多電商運營技巧,多多開團助手
    CAE有限元仿真分析團隊,2026仿真代做咨詢服務平臺
    CAE有限元仿真分析團隊,2026仿真代做咨詢服
    釘釘簽到打卡位置修改神器,2026怎么修改定位在范圍內
    釘釘簽到打卡位置修改神器,2026怎么修改定
  • 短信驗證碼 寵物飼養 十大衛浴品牌排行 suno 豆包網頁版入口 目錄網 排行網

    關于我們 | 打賞支持 | 廣告服務 | 聯系我們 | 網站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    中文字幕一区二区三区四区五区六区| 亚洲丰满在线| 国产乱子伦精品视频| 欧美精品在欧美一区二区| 日韩在线三级| 日韩在线视频在线观看| 亚洲永久免费观看| 一区二区不卡在线视频 午夜欧美不卡' | 精品一区二区三区自拍图片区| 日韩精品一区二区三区外面| 日本精品久久电影| 少妇大叫太大太粗太爽了a片小说| 一区视频二区视频| 中文精品视频一区二区在线观看| 色综合天天狠天天透天天伊人| 精品久久蜜桃| 精品国产乱码久久久久久郑州公司| 国产精品久久久久9999| 国产精品久久7| 精品久久蜜桃| 亚洲高清乱码| 日韩无套无码精品| 黄色av网址在线播放| 国产性生交xxxxx免费| 成人精品久久av网站| 91高潮在线观看| 777久久精品一区二区三区无码 | 久久精品ww人人做人人爽| 色伦专区97中文字幕| 国产精品少妇在线视频| 欧美精品一本久久男人的天堂| 欧美精品制服第一页| 久久国产精品视频| 亚洲一区亚洲二区| 日韩精品一区二区三区不卡| 国内精品二区| 不卡视频一区| www.精品av.com| 欧美乱人伦中文字幕在线| 亚洲成人午夜在线| 黄色片视频在线免费观看| av无码精品一区二区三区| 日韩在线一区二区三区免费视频| 另类美女黄大片| 日产精品久久久一区二区| 国产自产女人91一区在线观看| 国产精品69av| 国产精品久久久999| 亚洲精品高清国产一线久久| 欧美二区在线看| 69av在线视频| 国产精品美腿一区在线看| 欧美精品久久久久久久久久| 欧美一乱一性一交一视频| 日韩欧美在线播放视频| 成人www视频在线观看| 国产成人亚洲综合青青| 国产精品动漫网站| 色一情一乱一伦一区二区三区丨| 欧美中文字幕在线观看| 国内伊人久久久久久网站视频| 热久久免费国产视频| 国产精品影片在线观看| 九色91在线视频| 色综合老司机第九色激情| 日韩 欧美 高清| 精品无人乱码一区二区三区的优势| 99久久精品免费看国产四区| 91久热免费在线视频| 91精品国产99久久久久久 | 欧美一级爱爱视频| 日韩av在线综合| 国产免费xxx| 色老头一区二区三区在线观看| 美日韩精品免费观看视频| 日韩a∨精品日韩在线观看| 国产一区香蕉久久| 久久久久久久久国产精品| 国产999精品视频| 欧美国产视频在线观看| 91美女福利视频高清| 久久精品91久久香蕉加勒比| 欧美激情在线有限公司| 欧美在线一区二区三区四| 欧美日韩亚洲一区二区三区四区| 久久最新免费视频| 中文视频一区视频二区视频三区| 欧美在线日韩在线| 91av国产在线| 久久久久久国产精品| 精品欧美日韩| 久久久久久久久久久成人| 亚洲欧美日韩另类精品一区二区三区| 欧美日韩在线不卡视频| 久久久噜噜噜久久久| 色中色综合成人| 国产原创精品| 国产精品视频1区| 欧美中文字幕在线观看| 91传媒视频免费| 一区二区三区四区欧美| 免费99视频| 国产精品-区区久久久狼| 欧美在线视频二区| 日韩中文字幕在线精品| 日本韩国欧美精品大片卡二| 国产精品12p| 久久国产色av| 国产视频九色蝌蚪| 久久伊人色综合| 极品尤物一区二区三区| 久久精品国产一区二区三区不卡| 亚洲高清乱码| 91免费在线观看网站| 亚洲精品中文字幕无码蜜桃| 99www免费人成精品| 亚洲欧美日韩精品久久久| 成人中文字幕av| 亚洲欧美日韩国产成人综合一二三区| 欧美高清视频一区| 久久99精品国产99久久6尤物| 黄色成人在线免费观看| 久久艳片www.17c.com| 国产婷婷一区二区三区| 精品国产一区二区三区久久久久久 | 国内精品国产三级国产99| 国产精品美女免费| 黄色国产精品一区二区三区| 国产成人无码一二三区视频| 欧美精品一区二区三区四区五区 | 人妻av无码专区| 久久精品这里热有精品| 欧美日韩精品免费观看视一区二区| 久久精品视频网站| 国模精品视频一区二区| 欧美一区三区二区在线观看| 国产在线精品一区| 美乳视频一区二区| 国产又爽又黄的激情精品视频| 日韩一区视频在线| 国严精品久久久久久亚洲影视| 欧美成aaa人片免费看| 欧美在线视频一区| 久久视频在线免费观看| 国产一级做a爰片久久毛片男| 久久久999国产精品| 欧美日韩亚洲在线| 亚洲精品中文字幕在线| 日韩在线观看网址| 亚洲综合中文字幕在线| 国产h视频在线播放| 精品99在线视频| 在线观看成人一级片| 国产va免费精品高清在线观看| 欧美人与性禽动交精品| 国产aⅴ精品一区二区三区黄| 131美女爱做视频| 日韩一区二区高清视频| 国产精品十八以下禁看| www.日日操| 欧美亚洲丝袜| 一本一生久久a久久精品综合蜜| 久久久com| 国产在线一区二区三区欧美| 综合色婷婷一区二区亚洲欧美国产| 97精品久久久| 狠狠噜天天噜日日噜| 亚洲一区二区三| 国产精品视频26uuu| 久色视频在线播放| 国产一区二区在线视频播放| 真实国产乱子伦对白视频| 91av免费看| 国产一区二区在线观看免费播放| 午夜老司机精品| 国产精品成久久久久三级| 久久露脸国产精品| 国内精品在线一区| 日本一级黄视频| 欧美精品久久久久久久| 久久人人爽亚洲精品天堂| 91精品国产自产在线观看永久| 毛片一区二区三区四区| 日韩久久久久久久久久久久| 亚洲欧洲在线一区| 欧美日本黄视频| 久久久av水蜜桃| 精品日本一区二区| 欧美高清一区二区| 日韩视频一二三| 午夜精品一区二区三区av | 成人免费网视频| 精品日产一区2区三区黄免费 | 亚洲成熟丰满熟妇高潮xxxxx| 久久视频中文字幕| 久久精品香蕉视频| av片在线免费| 激情综合网俺也去| 亚洲成人av动漫| 日韩av在线一区二区三区|