加勒比久久综合,国产精品伦一区二区,66精品视频在线观看,一区二区电影

合肥生活安徽新聞合肥交通合肥房產(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

掃一掃在手機打開當(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)化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發(fā)動機性能
    挖掘機濾芯提升發(fā)動機性能
    海信羅馬假日洗衣機亮相AWE  復(fù)古美學(xué)與現(xiàn)代科技完美結(jié)合
    海信羅馬假日洗衣機亮相AWE 復(fù)古美學(xué)與現(xiàn)代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
  • 短信驗證碼 目錄網(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

    a日韩av网址| 精品国产乱码| 99只有精品| 一区免费在线| 亚洲国产中文在线| 老司机精品视频一区二区三区| 久久国产精品久久w女人spa| 国产福利资源一区| 国产美女精品视频免费播放软件| 久久影院午夜精品| 五月天久久久| 91精品国产乱码久久久竹菊| 亚洲天天综合| 色婷婷成人网| 九色porny丨首页入口在线| 欧美 亚欧 日韩视频在线| 久久免费精品| 国产精品2区| 美女尤物国产一区| 日韩成人三级| 蜜桃精品视频在线观看| 五月婷婷六月综合| 清纯唯美亚洲经典中文字幕| 日本亚洲欧美天堂免费| 国色天香一区二区| 日韩成人精品一区二区三区| 在线天堂新版最新版在线8| 好看的亚洲午夜视频在线| 麻豆精品少妇| 欧美视频四区| 日韩av电影免费观看高清完整版| 永久亚洲成a人片777777| 国产亚洲欧美日韩精品一区二区三区| 麻豆视频在线看| 日韩有码一区二区三区| 尤物精品在线| 欧美在线资源| 欧美+亚洲+精品+三区| 群体交乱之放荡娇妻一区二区| 日韩区一区二| 国产欧美一区二区三区精品观看| 综合激情在线| 欧美黄色免费| 中文无码久久精品| 久久亚州av| 中文字幕一区二区精品区| 欧美aⅴ一区二区三区视频| 亚洲精品777| 日韩一级特黄| 日韩国产欧美视频| 日本aⅴ免费视频一区二区三区| 国产精品久久777777毛茸茸| 日本伊人色综合网| 亚洲精品美女| 国产亚洲观看| 久久99国产精品视频| 国产一区二区三区不卡视频网站| 国产精品欧美三级在线观看| 精品一区二区三区在线观看视频| 国产日产精品_国产精品毛片| 国产成人1区| 久久视频社区| 精品国产乱码久久久| 久久九九精品| 在线观看免费一区二区| 国产精品嫩草99av在线| 麻豆成人在线| 91看片一区| 狠狠久久伊人中文字幕| 亚洲精选久久| 怕怕欧美视频免费大全| 日本在线成人| 99久久精品费精品国产| 午夜视频一区| 欧美好骚综合网| 成人午夜sm精品久久久久久久| 美腿丝袜亚洲三区| 欧美影院在线| 精品成av人一区二区三区| 蜜桃a∨噜噜一区二区三区| 亚洲欧美激情诱惑| 亚洲人成在线网站| 六月丁香综合在线视频| 亚洲精品推荐| 久久久精品五月天| 久久国产精品毛片| 91天天综合| 亚洲综合小说| 国产精品高潮呻吟久久久久| 亚洲午夜黄色| 超碰在线99| 麻豆精品一区二区综合av| 亚洲三级精品| 在线视频亚洲专区| 国产精品国产一区| 美女视频一区在线观看| 无码日韩精品一区二区免费| 欧美偷窥清纯综合图区| 午夜在线精品偷拍| 欧美日韩女优| 国产麻豆一区二区三区精品视频| 精品亚洲精品| 久久亚洲电影| 久久精品女人天堂| 日韩精品一区二区三区中文在线 | 六月婷婷色综合| 日韩高清二区| 午夜在线a亚洲v天堂网2018| 欧美日韩卡一| 日韩高清三区| 亚洲激情精品| 日日夜夜精品免费视频| 久久一级大片| 香蕉成人久久| 日本欧美一区二区| 精品淫伦v久久水蜜桃| 91欧美国产| 国产精一区二区| 一本一道久久综合狠狠老| 亚州精品国产| 红杏aⅴ成人免费视频| 四季av一区二区三区免费观看| 亚洲国产一区二区三区a毛片| 国产一区福利| 亚洲天堂导航| 精品视频在线播放一区二区三区 | 国产精品一区免费在线 | 国产精品99免费看| 亚洲成a人片777777久久| 日韩精品一级| 成人影院天天5g天天爽无毒影院| 中文字幕免费一区二区| 欧美91福利在线观看| 99亚洲伊人久久精品影院| 欧美视频二区| 三级成人在线| 欧美日韩午夜| 日韩久久视频| 亚洲小说春色综合另类电影| 国产精品久久久久久| 日本亚洲免费观看| 久久r热视频| 日韩一区二区三区精品视频第3页| 免费久久99精品国产| 日韩极品少妇| 水蜜桃精品av一区二区| 精品国产一区二| 欧美国产小视频| 91成人福利| 欧美日韩尤物久久| 999久久久国产精品| 欧美在线不卡| 午夜影院欧美| 综合激情一区| 成人影院在线| 4438全国亚洲精品观看视频| 日日av拍夜夜添久久免费| 精品精品国产毛片在线看| 成人精品国产| 激情综合激情| 99久久999| 欧美疯狂party性派对| 在线播放一区二区精品视频| 天堂中文在线播放| 久久精品国语| 亚洲一区导航| 91综合在线| 第九色区aⅴ天堂久久香| 99精品免费网| 久久亚洲不卡| 成人h动漫精品一区二区器材| 日韩专区视频网站 | 激情黄产视频在线免费观看| 欧美激情99| 亚洲精品黄色| 麻豆蜜桃在线观看| 亚洲电影成人| 久久99国产成人小视频| 欧美综合社区国产| 国产婷婷精品| 99精品国产一区二区三区2021 | 免费观看亚洲天堂| 国产精品久久久久久久免费软件 | 四虎地址8848精品| 99在线精品视频在线观看| 日韩中文一区二区| 久久中文欧美| 日韩88av| 欧美1区2区| 香蕉大人久久国产成人av| 美女在线视频一区| 国产精品久久观看| 亚洲高清av| 亚洲自拍电影| 国产精品99久久久久久董美香| 午夜在线a亚洲v天堂网2018| 成人精品天堂一区二区三区| 国产精选久久| 久久激情五月婷婷| 四虎国产精品免费观看|