99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

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

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編程設計
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    2025年10月份更新拼多多改銷助手小象助手多多出評軟件
    2025年10月份更新拼多多改銷助手小象助手多
    有限元分析 CAE仿真分析服務-企業/產品研發/客戶要求/設計優化
    有限元分析 CAE仿真分析服務-企業/產品研發
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發動機性能
    挖掘機濾芯提升發動機性能
    海信羅馬假日洗衣機亮相AWE  復古美學與現代科技完美結合
    海信羅馬假日洗衣機亮相AWE 復古美學與現代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
  • 短信驗證碼 trae 豆包網頁版入口 目錄網 排行網

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

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

    99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

          9000px;">

                日韩一区二区在线看片| 成人福利视频在线看| 欧美高清hd18日本| 成人国产精品免费观看视频| 美女mm1313爽爽久久久蜜臀| 亚洲国产精品久久人人爱蜜臀| 中文幕一区二区三区久久蜜桃| 在线播放/欧美激情| 91久久精品日日躁夜夜躁欧美| 99re成人在线| 欧美色涩在线第一页| 日本乱码高清不卡字幕| 亚洲免费观看高清| 久久av资源网| 视频一区二区不卡| 日本欧美久久久久免费播放网| 午夜国产不卡在线观看视频| 亚洲成人黄色影院| 日韩av一二三| 老司机精品视频一区二区三区| 久久精品国产免费看久久精品| 国产精品一区二区你懂的| 成人av综合一区| 欧美mv日韩mv亚洲| 亚洲欧美一区二区三区久本道91 | 国产精品久久久久久久午夜片| 国产三级精品三级| 一级做a爱片久久| 国产乱对白刺激视频不卡| 色综合天天性综合| 欧美精品一区二区三区蜜臀| 亚洲乱码国产乱码精品精的特点| 午夜精品久久久久影视| 国产aⅴ综合色| 日韩精品一区二区三区在线 | 中文字幕精品三区| 亚洲国产精品久久人人爱| 国产精品一二三区在线| 欧美一区二区三区视频在线观看 | 狠狠狠色丁香婷婷综合激情| 成人激情av网| 中文字幕一区二区三区四区 | 日韩一区二区免费在线观看| 亚洲天堂2014| 99久久婷婷国产综合精品| 久久久久久久久久久黄色| 久久成人18免费观看| 精品美女在线播放| 国产在线一区二区| 欧美一区二区福利在线| 秋霞午夜av一区二区三区 | 4438x亚洲最大成人网| 久久久不卡网国产精品一区| 精品制服美女丁香| 久久久久久一二三区| 丰满白嫩尤物一区二区| 免费亚洲电影在线| 亚洲一区二区欧美激情| 欧美无砖专区一中文字| 婷婷激情综合网| 日韩一级完整毛片| 成人精品一区二区三区中文字幕| 亚洲国产精品成人综合| 91麻豆免费在线观看| 精品在线免费视频| 亚洲免费av高清| 久久久久久亚洲综合影院红桃 | 精品国内二区三区| 国产91对白在线观看九色| 久久久久国产精品免费免费搜索| 成人av电影免费观看| 麻豆传媒一区二区三区| 亚洲品质自拍视频网站| 久久综合九色综合97婷婷女人| 成人一区在线看| 黄页视频在线91| 美女一区二区三区| 亚洲成人三级小说| 亚洲午夜一区二区| 国产精品区一区二区三区| 欧美一区二区三区视频免费| 91麻豆蜜桃一区二区三区| 黄色日韩网站视频| 久久99精品国产91久久来源| 日本午夜精品一区二区三区电影| 国产精品传媒视频| 国产精品系列在线| 日韩理论在线观看| 色综合久久综合网| 日本精品一区二区三区高清 | 国产日韩v精品一区二区| 日韩欧美一区二区久久婷婷| 欧美一区二区精品在线| 日韩精品一区二区三区在线播放| 久久久蜜桃精品| 亚洲另类中文字| 婷婷久久综合九色国产成人| 美女在线观看视频一区二区| 国产一区二区三区免费观看| 波多野结衣亚洲一区| 99国产精品99久久久久久| 欧美性猛交xxxxxxxx| 在线视频国产一区| 欧美一级黄色片| 欧美一区二区三区喷汁尤物| 国产乱子伦视频一区二区三区| 免费在线看一区| 国内精品久久久久影院色| 国产原创一区二区| 99精品在线免费| 蜜臀av一区二区在线免费观看| 日韩视频在线永久播放| 色先锋资源久久综合| 亚洲伦理在线精品| 久久精品人人做人人综合| 337p粉嫩大胆色噜噜噜噜亚洲| 国产精品五月天| 一区二区高清免费观看影视大全| 精品成人在线观看| 亚洲欧美激情视频在线观看一区二区三区 | 风间由美中文字幕在线看视频国产欧美| 天堂一区二区在线| 91麻豆国产福利在线观看| 久久综合九色欧美综合狠狠| 久久嫩草精品久久久久| 中文字幕一区二区三区乱码在线| 亚洲综合激情网| 韩国视频一区二区| 欧美一区二区美女| 午夜精品aaa| 粉嫩13p一区二区三区| 337p亚洲精品色噜噜噜| 国产精品三级在线观看| 日韩电影免费一区| 欧美精品久久久久久久久老牛影院 | 91黄视频在线观看| 国产亚洲欧美日韩俺去了| 在线观看日韩毛片| 国产精品久久毛片av大全日韩| 日本大胆欧美人术艺术动态 | 亚洲最大成人综合| 日本精品免费观看高清观看| 欧美韩日一区二区三区| 丰满放荡岳乱妇91ww| 国产精品久久久久久久久免费桃花| 久久99精品久久久| 国产免费观看久久| 日本久久电影网| 久久99久久99小草精品免视看| 欧美丰满少妇xxxbbb| 亚洲一区二区五区| 精品国产伦一区二区三区观看体验 | 日韩av午夜在线观看| 久久综合资源网| 国产制服丝袜一区| 国产精品国产自产拍高清av王其| 色香蕉久久蜜桃| 国产黄色91视频| 午夜亚洲国产au精品一区二区| 亚洲天堂精品在线观看| 日韩欧美黄色影院| 蜜臀99久久精品久久久久久软件| 国产欧美一区二区精品婷婷 | 国产精品毛片久久久久久| 欧美综合一区二区三区| 午夜一区二区三区视频| 91免费小视频| 免费美女久久99| 中文字幕日韩一区| 日韩精品中文字幕一区| 色8久久精品久久久久久蜜| 美女视频黄 久久| 亚洲国产一二三| 亚洲天堂成人网| 国产精品毛片无遮挡高清| 欧美国产成人在线| 久久久久久免费网| 亚洲精品一区二区三区在线观看 | 日韩av在线发布| 亚洲va国产va欧美va观看| 国产精品国产三级国产三级人妇| 欧美久久久久久蜜桃| 欧美日韩高清不卡| 欧美视频一二三区| 日韩一卡二卡三卡四卡| 欧美美女视频在线观看| 欧美日韩一区二区三区免费看| 午夜一区二区三区视频| 一区二区三区四区不卡视频| 亚洲色图一区二区三区| 国产精品网站在线播放| 自拍视频在线观看一区二区| 国产精品欧美极品| 亚洲高清久久久| 国产激情一区二区三区四区 | 欧美日韩精品一区二区三区四区 | 欧美日韩成人综合天天影院| 欧美一级理论片| 国产日本一区二区| 蜜乳av一区二区|