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;">

                国产成人在线看| 亚洲一二三四久久| 色欧美乱欧美15图片| 国产麻豆成人精品| 九九国产精品视频| 蜜桃视频在线一区| 视频一区视频二区中文| 亚洲国产成人av| 亚洲国产毛片aaaaa无费看| 亚洲欧美日韩综合aⅴ视频| 国产精品久久夜| 国产精品伦一区| 国产精品久久久久9999吃药| 国产精品欧美精品| 中文字幕日韩av资源站| 最新成人av在线| 亚洲欧美一区二区视频| 久久奇米777| 精品国产一区二区三区av性色| 欧美大尺度电影在线| 欧美电影在线免费观看| 欧美一区二区精品在线| 日韩午夜av一区| 国产午夜精品理论片a级大结局| 欧美mv日韩mv国产网站app| 精品国产免费久久| 国产欧美一区二区三区在线看蜜臀 | 国产精品福利电影一区二区三区四区 | 亚洲h精品动漫在线观看| 日日欢夜夜爽一区| 国产真实乱对白精彩久久| 成人黄色大片在线观看| 在线观看免费成人| 欧美一区二区久久| 中文字幕一区av| 免费在线观看一区二区三区| 成人午夜精品在线| 91精品欧美久久久久久动漫 | 欧美一区二区黄色| 欧美国产禁国产网站cc| 亚洲成av人**亚洲成av**| 国产裸体歌舞团一区二区| 91浏览器打开| 久久精品免费在线观看| 亚洲午夜精品网| gogo大胆日本视频一区| 日韩一区国产二区欧美三区| 亚洲色图制服诱惑| 国产激情一区二区三区桃花岛亚洲| 色就色 综合激情| 亚洲国产精品99久久久久久久久| 午夜精品一区二区三区免费视频 | 国产午夜精品一区二区三区嫩草| 亚洲国产综合91精品麻豆| 国产成人午夜视频| 欧美一区二区三区啪啪| 夜夜揉揉日日人人青青一国产精品| 国产在线精品免费| 91精品国产综合久久婷婷香蕉| 国产精品麻豆视频| 国产精品综合视频| 日韩精品一区二区三区老鸭窝| 一区二区三区四区不卡视频| 国产成人自拍高清视频在线免费播放| 8v天堂国产在线一区二区| 亚洲精品国产第一综合99久久| 国产成人在线观看| 久久久精品一品道一区| 青青草精品视频| 欧美久久久久中文字幕| 亚洲一区二区黄色| 色综合久久久久综合| 亚洲欧美日韩在线播放| av电影在线观看不卡| 国产精品福利av| av电影一区二区| 中文字幕一区二区三区四区| 成人免费福利片| 日本一区二区视频在线| 成人免费观看av| 亚洲色图在线播放| 欧美综合色免费| 午夜精品123| 91精品国模一区二区三区| 开心九九激情九九欧美日韩精美视频电影 | 日本va欧美va欧美va精品| 在线不卡的av| 麻豆国产精品777777在线| 精品国产污污免费网站入口 | 国产高清亚洲一区| 国产拍揄自揄精品视频麻豆| 成年人午夜久久久| 亚洲美女在线国产| 欧美色电影在线| 欧美aⅴ一区二区三区视频| 日韩精品资源二区在线| 国产高清在线观看免费不卡| 最近日韩中文字幕| 欧美老肥妇做.爰bbww视频| 久久疯狂做爰流白浆xx| 国产欧美日韩在线看| 91麻豆国产自产在线观看| 亚洲成a人片综合在线| 精品久久五月天| caoporn国产精品| 亚洲午夜视频在线观看| 日韩精品一区二区三区视频| 成a人片亚洲日本久久| 亚洲成人tv网| 久久精品男人天堂av| 91成人免费在线| 极品销魂美女一区二区三区| 亚洲欧美经典视频| 欧美mv日韩mv国产网站app| 不卡的电影网站| 日韩精品视频网| 国产精品无人区| 91精品一区二区三区久久久久久| 国产精品18久久久久久久久| 亚洲一本大道在线| 亚洲国产岛国毛片在线| 欧美精品三级日韩久久| 成人激情图片网| 美女视频一区二区三区| 樱花影视一区二区| 国产日产亚洲精品系列| 欧美福利视频导航| 91在线视频在线| 国产在线精品一区二区| 亚洲成人免费视| 最好看的中文字幕久久| 久久蜜桃香蕉精品一区二区三区| 欧美日韩精品电影| 91免费视频网址| 国产黄色精品网站| 免费欧美在线视频| 亚洲影院免费观看| 亚洲色欲色欲www| 中文字幕日韩精品一区| 国产亚洲成av人在线观看导航 | 亚洲欧美国产毛片在线| 久久久久免费观看| 日韩美女视频在线| 91精品免费观看| 欧美高清视频一二三区| 色偷偷一区二区三区| yourporn久久国产精品| 国产精品一区二区x88av| 看电视剧不卡顿的网站| 日韩av一级片| 日韩精品一二三四| 亚洲成av人片观看| 亚洲午夜久久久久久久久电影网| 亚洲精品中文在线| 亚洲丝袜制服诱惑| 国产精品久久久久久亚洲伦| 欧美xxxxxxxx| 久久综合狠狠综合久久激情| 26uuu精品一区二区| 精品国产3级a| 久久精品一区蜜桃臀影院| 久久久久99精品国产片| 亚洲国产精品99久久久久久久久 | 日韩av在线免费观看不卡| 亚洲成人一区二区在线观看| 亚洲一区视频在线观看视频| 亚洲一区二区三区不卡国产欧美| 亚洲精品国产第一综合99久久| 1000部国产精品成人观看| 1024成人网色www| 一区二区三区精密机械公司| 亚洲午夜电影在线| 亚洲国产日韩a在线播放| 午夜精品一区二区三区三上悠亚| 五月激情六月综合| 日韩成人精品在线观看| 国内精品久久久久影院薰衣草 | 欧美一级黄色录像| 精品国产乱子伦一区| 国产无一区二区| 中文字幕亚洲欧美在线不卡| 一区二区三区高清不卡| 日韩av不卡一区二区| 极品少妇xxxx偷拍精品少妇| 波多野结衣中文字幕一区| 欧洲在线/亚洲| 欧美mv日韩mv| 中文字幕亚洲在| 蜜臀久久久久久久| 国产**成人网毛片九色| 在线观看视频91| 精品不卡在线视频| 亚洲精品国产第一综合99久久| 美女视频黄频大全不卡视频在线播放 | 亚洲美女在线一区| 日本不卡一区二区| av午夜精品一区二区三区| 日韩一级完整毛片| 亚洲精品一卡二卡| 国产毛片精品国产一区二区三区|