国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女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怎么修改定
  • 短信驗證碼 寵物飼養 十大衛浴品牌排行 suno 豆包網頁版入口 wps 目錄網 排行網

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

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

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    国产精品免费一区二区三区四区 | 国产成人精品999| 久久成年人视频| 欧美日韩精品免费观看视一区二区| 91精品国产综合久久男男| 国产精品成人观看视频免费| 欧美高清性xxxxhd| 久草资源站在线观看| 色综合久久av| 久久国产精品一区二区三区 | 国产日韩欧美中文| 国产精品精品视频一区二区三区 | 精品91一区二区三区| 国产福利一区视频| 亚洲a∨一区二区三区| 99在线视频首页| 一区二区三区精品国产| 国产精品亚洲第一区| 久久久久国产精品www| 国产免费一区二区三区在线观看 | 福利视频久久| 亚洲a级在线播放观看| 国产黄视频在线| 激情视频综合网| 中文字幕一区综合| 神马国产精品影院av| 国产欧美精品一区二区三区介绍| 色大师av一区二区三区| 国产成人久久久| 国产欧美日韩精品专区| 日韩av电影在线免费播放| 国产精品十八以下禁看| 久久久久久网站| 日韩av一区二区三区在线观看 | 精品人妻一区二区三区四区在线| 国产精品久久久久久久久影视| 黄色www网站| 精品九九九九| 91精品国产自产在线老师啪 | 欧美亚洲精品日韩| 久久综合伊人77777蜜臀| 欧美日韩视频免费在线观看| 久久久久久伊人| 欧美日韩亚洲综合一区二区三区激情在线| 久久久91精品国产一区不卡| 国产一区二区三区四区五区在线| 亚洲一区二区在线免费观看| 国产成人精品日本亚洲11 | 免费在线观看亚洲视频| 久久中文字幕在线视频| 97人人模人人爽人人少妇| 日本精品一区二区三区在线播放视频 | 91精品国产综合久久香蕉| 亚洲人精品午夜射精日韩| 国产精品9999| 欧美精品国产精品久久久| 欧美人与物videos| 久久99精品久久久久子伦| 国模视频一区二区| 亚洲精品免费av| 久久久999成人| 91精品国产91久久久久久不卡| 日韩精品电影网站| 久久99精品国产99久久6尤物| 99国产视频| 欧美久久电影| 亚洲图片小说在线| 久久精品小视频| 97精品视频在线观看| 欧美中文在线免费| 亚洲一区二区在| 国产精品网址在线| 91精品国产自产在线老师啪| 欧美二区在线视频| 亚洲一区美女| 国产精品久久久久久av| 97精品国产97久久久久久春色 | 日韩精品―中文字幕| 国产精品加勒比| 国产成人av在线| 国产精品自在线| 欧美最猛性xxxxx(亚洲精品)| 在线一区高清| 久久视频在线观看免费| 国产成人精品视| 国产麻豆一区二区三区在线观看 | 久久久久国产精品www| 国产成人极品视频| 高清视频在线观看一区| 精品免费视频123区| 日韩精品久久一区二区| 中文字幕在线乱| 国产精品伦子伦免费视频| 久久免费视频在线| 超碰免费在线公开| 国产日韩一区二区在线| 欧美一性一乱一交一视频| 日本一欧美一欧美一亚洲视频| 一区二区三区精品国产| 国产精品日本精品| 日韩亚洲综合在线| 国产a级全部精品| 91精品在线观| 国产免费一区二区| 国产一区二区四区| 欧美激情专区| 人妻少妇精品久久| 日韩av电影国产| 亚洲视频小说| 一区二区冒白浆视频| 精品国产乱码久久久久久蜜柚| 国产精品日韩一区二区| 国产成人无码a区在线观看视频| 久久免费视频在线| 阿v天堂2017| 波多野结衣久草一区| 国产精品一区二区三区在线观| 麻豆一区二区三区在线观看| 免费看成人午夜电影| 免费一区二区三区| 免费日韩中文字幕| 国精产品一区一区三区视频| 国内精品二区| 国产日本欧美一区| 成人亚洲综合色就1024| 成人国产精品日本在线| 99视频在线免费| 91国产在线免费观看| 国产精品99免视看9| 国产精品999999| 久久久国产精品一区二区三区| 国产成人一区二区三区电影| 国产成人福利网站| 国产成人免费高清视频| 国产精品视频大全| 另类色图亚洲色图| 中文字幕剧情在线观看一区| 亚洲日本精品一区| 欧美一区二区大胆人体摄影专业网站| 日本一区二区三区视频在线观看| 日本精品久久久久久久| 欧美做受777cos| 国内精品在线观看视频| 国产欧美一区二区三区久久人妖 | 亚洲区一区二区三区| 亚洲精品国产系列| 午夜精品99久久免费| 日本精品在线视频| 欧美一级大片视频| 国产又粗又长又爽视频| 高清国产一区| 国产传媒欧美日韩| 精品国产一区二区三区久久久| 国产精品福利网站| 在线不卡视频一区二区| 日本在线观看一区| 免费一级特黄毛片| 国产免费黄色小视频| 69国产精品成人在线播放| 日韩综合中文字幕| 九九热这里只有精品6| 无码免费一区二区三区免费播放| 日韩美女av在线免费观看| 精品无码一区二区三区爱欲| 高清一区二区三区日本久| 久久精品国产一区二区三区不卡 | 久久精品日产第一区二区三区| 国产精品久久久久久久久久小说| 亚州精品天堂中文字幕| 国产一级不卡视频| 亚洲欧美日韩精品在线| 一区二区三区av在线| 青青草国产精品一区二区| 国产免费久久av| 久草综合在线观看| 欧美精品电影在线| 欧美一区二区影院| 99中文字幕在线观看| 国产精品视频地址| av中文字幕av| 久久久久久久999| 日日噜噜噜夜夜爽爽| 91精品视频在线播放| 伊人久久青草| 国产女人精品视频| 欧美成人全部免费| 精品无码久久久久久久动漫| 国产成人精品视频在线观看| 日本免费高清不卡| 国产激情在线看| 亚洲不卡中文字幕无码| 高清视频一区二区三区| 美女福利视频一区| 麻豆av一区二区| 国产精品免费久久久久久| 青青影院一区二区三区四区| 久久久久在线观看| 日韩亚洲欧美精品| 国产欧美精品一区二区三区介绍 | 欧美激情乱人伦|