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

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

代寫CMSC 323、代做Java/Python編程

時間:2024-03-07  來源:合肥網hfw.cc  作者:hfw.cc 我要糾錯



CMSC **3: Design and Implementation of Programming Languages
HW 3: Functions that accept multiple arguments.
Due Date: 03-07-24
Total Points: 100
1. Functions that Accept Multiple Arguments
Start with the F1WAE interpreter (the version that uses subst. See starter code.), and extend
the implementation to support any number of parameters to a function (including zero), and any
number of arguments (including zero) in a function application:
 <FunDef> = {deffun {<id> <id>*} <FnWAE>}
 <FnWAE> = <num>
 | {+ <FnWAE> <FnWAE>}
 | {- <FnWAE> <FnWAE>}
 | {with {<id> <FnWAE>} <FnWAE>}
 | <id>
 | {<id> <FnWAE>*}
Since you must change the F1WAE datatype, and since different people may change it in
different ways, you must provide a parse function this time, which accepts a quoted expression
and produces an FnWAE value. For parsing, assume that any symbol other than '+, '-, or 'with can
be a function name for a function call. Also, you must provide a parse-defn function that takes one
(quoted) deffun and produces a FunDef value.
Some examples:
(test (interp (parse `{f 1 2})
 (list (parse-defn `{deffun {f x y} {+ x y}})))
 3)
(test (interp (parse `{+ {f} {f}})
 (list (parse-defn `{deffun {f} 5})))
 10)
Hint: remember that the PLAIT language provides the following useful functions:
map: takes a function and a list and applies the function to each element in the list, returning a list
of results. For example, if sexps is a list of S-expressions to parse, (map parse sexps) produces a
list of fnWAEs by parsing each S-expression.
foldl: applies a function to an initial accumulated value and elements in a list, each time
obtaining a new accumulated value.
2
pair: creates a tuple. Use fst and snd to access items in the pair.
map2: applies a function, in order, to each pair of elements from two lists in “parallel,” forming a
new list with the results.
2. Errors
At run-time, a new error is now possible: a function application with the wrong number of
arguments. Your interp function should detect this mismatch and report an error that includes the
words “wrong arity”.
As with the interpreter from class, the free variable error is still also possible and must be
detected. Your interp function should detect free variables and report an error that includes the
words “free identifier”.
A function will be ill-defined if two of its arguments <id>s were the same. To prevent this
problem, your parse-defn function should detect this problem and report a “bad syntax” error. For
example, (parse-defn `{deffun {f x x } x}) should report a “bad syntax” error, while (parse-defn
`{deffun {f x y} x}) should produce a FunDef value.
Similarly, your interpreter must check to see if the function in an application is defined before
evaluating the arguments. If not, an “undefined function” error should be raised.
Some examples:
(test/exn (interp (parse `{with {x y} 1}) '()) "free identifier")
(test/exn (interp (parse `{f 1 2}) (list (parse-defn `{deffun {f x x} {+ x x}}))) "bad syntax")
(test/exn (interp (parse `{f x}) (list (parse-defn `{deffun {g a b c} c}))) "undefined function")
(test/exn (interp (parse `{f 1}) (list (parse-defn `{deffun {f x y} {+ x y}}))) "wrong arity")
Your interpreter must evaluate all the argument expressions in an application expression before
signaling any arity errors. For example:
(test/exn (interp (parse `{f x}) (list (parse-defn `{deffun {f a b c} c})))"free identifier")
So overall, the order in which errors should be raised for a given function call is:
• First, “bad syntax”
• Second, “undefined function”
• Third, any errors that are raised while evaluating arguments.
• Fourth, “wrong arity”
• Last, any errors that are raised while evaluating the function body.
3
If the list of definitions contains multiple definitions with the same name, use just the first one
(ignoring the others). In particular, there is no overload in this language: if there are two
definitions with the same name and different arities, the first definition is always used regardless.
For example, if you have the following definitions and program:
(test/exn (interp (parse `{f 3 4})
 (list (parse-defn `{deffun {f a} 5})
 (parse-defn `{deffun {f a b} {+ a b}})))
 "wrong arity")
Since the first definition of f takes a single argument, this program should raise a “wrong arity”
error. The fact that another definition for f that takes two argument exists doesn’t matter.
Your interpreter and parser will not be given any other kinds of erroneous programs besides the
ones described in this section.
3. Handin Instructions
• Provide definitions for parse, parse-defn, and interp, as above.
• Include a contract and comments before each function.
• Your submission must include your test cases. They should not be commented out.
• Include your name as a comment in your submission file.
• Save your homework file in the following format hw3<first_name><last_name>.
請加QQ:99515681  郵箱:99515681@qq.com   WX:codehelp

掃一掃在手機打開當前頁
  • 上一篇:AERO20542代做、代寫Python/Java編程
  • 下一篇:莆田鞋購買渠道(盤點10個莆田鞋微商前十名)
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    流體仿真外包多少錢_專業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怎么修改定
  • 短信驗證碼 豆包網頁版入口 破天一劍 目錄網 排行網

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

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

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    欧美精品与人动性物交免费看| 国产精品网站入口| 国产精品18毛片一区二区| av色综合网| 久久艳片www.17c.com| 欧美精品一区二区三区国产精品| 久久九九亚洲综合 | 亚洲综合在线播放| 国产中文字幕日韩| 国产精品免费一区二区| 精品国产乱码久久久久久108| 国产精品欧美激情在线播放| 国产精品丝袜久久久久久高清| 久久精品视频免费播放| 国产精品久久久久免费| 欧美激情网友自拍| 麻豆精品蜜桃一区二区三区| 精品无人区一区二区三区| 国产精品自拍片| 欧美成人免费va影院高清| 亚洲综合精品一区二区| 久久久999国产| 欧美有码在线视频| 日韩在线视频一区| 青春草在线视频免费观看| 国自在线精品视频| 国产精品色婷婷视频| 亚洲视频电影| 91久久夜色精品国产网站| 久久av免费观看| 亚洲国产成人不卡| 91国产美女在线观看| 国产精品无码电影在线观看| 另类美女黄大片| 国产在线精品一区二区三区| 81精品国产乱码久久久久久| 久久精品xxx| 欧美一区2区三区4区公司二百| 国产一区喷水| 欧美激情视频网址| 99久re热视频这里只有精品6| 久久成人资源| 欧美图片激情小说| 国产精品网红福利| 国产日韩欧美在线看| 国产成人一区二区三区免费看| www.国产精品一二区| 精品九九九九| 国产精品自拍视频| 懂色av一区二区三区在线播放| 欧美欧美一区二区| 久久福利视频导航| 97碰碰碰免费色视频| 国产精品久久久久久久久久久不卡 | 亚洲欧洲三级| 久久久精彩视频| 欧美视频观看一区| 久久99精品久久久久久青青91| 午夜精品理论片| 日韩一区在线视频| 国产资源在线免费观看| 久久久免费观看| 日韩色妇久久av| 欧美巨猛xxxx猛交黑人97人| 亚洲精品日韩av| 久久精品在线免费视频| 欧美激情网友自拍| 116极品美女午夜一级| 色综合久久88| 国产精品69精品一区二区三区| 国产精品高潮粉嫩av| 日本久久久a级免费| 超碰网在线观看| 青青草视频在线视频| 91精品综合久久久久久五月天| 久久九九有精品国产23| 视频在线99| 国产精品入口夜色视频大尺度| 日日碰狠狠躁久久躁婷婷| 国产玖玖精品视频| 欧美尤物巨大精品爽| 国产美女精品在线观看| 国产精品视频一区二区三区四| 色噜噜狠狠一区二区三区| 99国产精品久久久久老师| 欧美大片欧美激情性色a∨久久| 激情视频一区二区| 亚洲一区二区三区精品在线观看| 国产特级淫片高清视频| 国产精品成人aaaaa网站| 免费av在线一区二区| 国产精品丝袜视频| av资源站久久亚洲| 国内精品视频久久| 日韩精品无码一区二区三区| 久久婷婷人人澡人人喊人人爽 | 国产高清视频一区三区| 亚洲一区免费看| 国产精品女人久久久久久| 欧美日韩国产三区| 视频一区亚洲| 一卡二卡三卡视频| 精品国产一区三区| 国产精品视频免费一区二区三区| 欧美日韩精品一区| 日日摸天天爽天天爽视频| 国产成人一区二区三区免费看| 午夜欧美一区二区三区免费观看| 91精品视频专区| 免费看污污视频| 欧美亚洲第一页| 日本一区二区在线| 日韩在线xxx| 亚洲国产精品日韩| 精品久久久久久久免费人妻| 国产视频一区二区三区四区 | 日韩中文字幕在线视频| 秋霞无码一区二区| 天天干天天操天天干天天操| 久久久99国产精品免费| 日本aa在线观看| 日本一区二区三区www| 国产精品推荐精品| 久久久噜噜噜www成人网| 欧洲精品国产| 日韩av播放器| 午夜精品在线观看| 亚洲在线免费视频| 亚洲在线欧美| 亚洲一区二区三区免费看| 国产成人精品国内自产拍免费看| 欧美中文字幕在线| 青青草国产精品一区二区| 国产精品视频xxx| 国产精品日韩av| 欧美大胆在线视频| 久久伊人精品天天| 国产精品免费一区二区三区观看 | 国产在线精品二区| 日本天堂免费a| 伊人网在线免费| 一级黄色免费在线观看| 久久久久久久久久伊人| 国产深夜精品福利| 国产日本欧美在线| 国产精品一区二区三区观看| 欧美中文字幕在线播放| 在线精品日韩| 国产精品黄页免费高清在线观看| 成人免费福利视频| av色综合网| 久久人人97超碰精品888| 国产一区二区网| 国产欧美精品一区二区| 视频一区不卡| 日韩人妻无码精品久久久不卡 | 欧美日韩成人黄色| 一本一道久久久a久久久精品91| 亚洲永久一区二区三区在线| 黄色免费福利视频| 精品一区二区三区毛片| 日韩av123| 欧美日韩激情四射| 黄频视频在线观看| 国产欧美日韩中文字幕| 激情视频一区二区| 国产精品一区二区女厕厕| 黄色三级中文字幕| 国产亚洲综合视频| 91精品国产高清自在线| 国产男女无遮挡| 91精品国产综合久久久久久蜜臀| 国产一区玩具在线观看| 日韩视频第二页| 蜜臀av.com| 久久影院理伦片| 国产精品无码一本二本三本色| 久久久免费电影| 国产精品免费看久久久香蕉| 久久本道综合色狠狠五月| 99久久免费观看| 色婷婷久久av| 中文字幕制服丝袜在线| 精品中文字幕乱| 日韩资源av在线| 国产在线拍揄自揄视频不卡99| 欧美性久久久久| 成人久久久久爱| 久久激情五月丁香伊人| 久久久久久国产免费| 久久综合九色综合网站| 97久久精品在线| 国产精品久久久久久久av电影| 国产精品网红福利| 午夜精品久久久久久久男人的天堂| 在线视频福利一区| 欧美性受xxxx黑人猛交| 欧美在线一区视频| 97精品国产97久久久久久春色| 成人免费网站在线|