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

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

CMPT 489代做、Program Synthesis編程設計代寫

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



CMPT 489 / 980 Program Synthesis
Final Project
Phase I is due by 11:59pm PT on Wednesday Nov 8, 2023. Phase II is due by 11:59pm PT on Tuesday
Dec 5, 2023. Please submit them to Canvas on time. No late submission is accepted.
Requirements:
• This project must be your own work. No collaboration is permitted.
• The programming language of this project is Java 11.
• You can learn the code on slides and start from it.
• You can use third-party libraries but not existing synthesizers. However, you can implement the
algorithms in existing synthesizers by yourself.
1 Problem Description
Consider the following context-free grammar G
E ::= Ite(B, E, E) | Add(E, E) | Multiply(E, E) | x | y | z | 1 | 2 | 3
B ::= Lt(E, E) | Eq(E, E) | And(B, B) | Or(B, B) | Not(B)
x, y, z ∈ Variables 1, 2, 3 ∈ Constants
Here, E is the start symbol. E and B are non-terminals; all other symbols are terminals. The meaning
of terminal symbols are self-explanatory. Specifically, Ite is the if-then-else operator. Add is the addition
(+) operator. Multiply is the multiplication (∗) operator. x, y, z are integer variables. 1, 2, 3 are integer
constants. Lt is the less-than (<) operator. Eq is the equals (==) operator. And is the logical conjunction
(&&). Or is the logical disjunction (||). Not is the logical negation (!).
In this project, you need to write an example-based program synthesizer in Java. Specifically, the
synthesizer takes as input a list of input-output examples and the context-free grammar G and produces
as output an implementation of f(x, y, z) in the language of G such that f(x, y, z) is consistent with the
provided examples. You can assume f only uses three variables x, y, z, and all their types are Int. The return
type of f is also Int. If the synthesis succeeds, your program should print the program, e.g., Add(Add(y,
z), x), to the console. Otherwise, if the synthesis fails, the program should print null.
2 Codebase
A codebase is provided as the starting point. It contains the basic framework for the synthesizer. Details
are explained as follows.
Package synth.cfg
This package defines the data structure for the context-free grammar (CFG). It has the following classes
• Symbol. An abstract class for symbols in the CFG.
• Terminal. A subclass of Symbol that corresponds to terminals in the CFG.
• NonTerminal. A subclass of Symbol that corresponds to non-terminals in the CFG.
1
• Production. A class for productions in the CFG. A production is of the form
ReturnSymbol ::= Operator(ArgSymbol, ..., ArgSymbol)
• CFG. A class for representing the CFG. The most important method is getProductions, which takes
as input a non-terminal symbol N and returns as output a list of all productions with N being the
left-hand-side of the production.
Package synth.core
This package contains the classes for synthesizers, examples, programs, and interpreters.
• ASTNode. A class for general Abstract Syntax Tree (AST) nodes. The symbol fields corresponds to
the symbol in the CFG. The children field corresponds to the children nodes.
• Program. A class for representing a program. It only has one field root, which is the root node of the
corresponding AST.
• Example. A class that defines the data structure of an example. The input field is a map from variable
names to their values. The output field is the output value.
• Interpreter. A class that defines an interpreter of the language of G. The most important method
is the static method evaluate, which takes as input a program and an environment and returns as
output the evaluation result. The environment is essentially a map from variable names to their values,
just like the input field of Example. Concrete examples on how to use Interpreter.evaluate are
provided in the test class synth.core.InterpreterTests.
• ISynthesizer. An interface that defines the input and output of a synthesizer. The inputs are a CFG
and a list of examples. The output is a program.
• TopDownEnumSynthesizer. A top-down enumerative synthesizer that implements the ISynthesizer
interface. You need to implement this class.
Package synth.util
This package contains the utility classes and methods.
• FileUtils. A class for file operations. The readLinesFromFile static method reads a file into a list
of strings, where each line of the file is a string.
• Parser. A class for parsing the examples. The parseAnExample static method parses text of the form
“x=a, y=b, z=c -> d” to an object of class Example. The parseAllExamples static method parses
a list of examples from a list of strings, where each string corresponds to an example. It ignores empty
strings.
Class synth.Main
The main class of the framework. It has two methods.
• main. It is the entry of the program. It takes one command-line argument args[0] for the path to
the examples file.
• buildCFG. It builds the CFG G in Section 1.
Tests
JUnit tests are provided in the src/test directory. You are welcome to add more!
• synth.core.InterpreterTests. It contains several unit tests for the interpreter, which is also helpful
for understanding the usage of the interpreter.
2
Other Files
• pom.xml. The configuration file for Maven.
• examples.txt. A sample examples file.
3 Compilation and Execution
Compilation. This codebase uses the Maven build system. Suppose you enter the Synth directory, the
project can be easily compiled with one command
$ mvn package
Then you should be able to see the message “BUILD SUCCESS”. A directory called target will be created
and a jar file called synth-1.0.jar will be generated inside the target.
Execution. In the Synth directory, you can execute the program using the following command (use ;
instead of : in Windows)
$ java -cp lib:target/synth-1.0.jar synth.Main <path-to-examples-file>
where <path-to-examples-file> is the path to the examples file. For example, you can run
$ java -cp lib:target/synth-1.0.jar synth.Main examples.txt
You will see a runtime exception with message “To be implemented”, because the synthesizer is not implemented yet. After you finish implementing the synthesizer, you should see something like (not unique)
Add(Add(y, z), x)
4 Phase I
In Phase I, you need to implement a top-down enumerative synthesizer in synth.core.TopDownEnumSynthesizer.
Deliverable
A zip file called Phase1 Firstname Lastname.zip that contains at least the followings:
• The entire Synth directory. You can change existing code if you want, but please make sure the project
can be compiled and executed as explained in Section 3.
• A short report (**2 pages) called Phase1 Firstname Lastname.pdf that explains the design choices,
features, tests, issues (if any), and anything else that you want to explain about your program.
5 Phase II
In Phase II, you can implement any synthesis algorithm that improves the performance of the synthesizer on
the same problem. You also need to create a small benchmark set and evaluate your algorithm
over the benchmarks.
A zip file called Phase2 Firstname Lastname.zip that contains at least the followings:
• The entire Synth directory. You can change existing code if you want, but please make sure the project
can be compiled and executed as explained in Section 3.
• A long report (5-6 pages) called Phase2 Firstname Lastname.pdf that explains the algorithms,
benchmarks, evaluation results, design choices, features, tests, issues (if any), and anything else
that you want to explain about your program.
請加QQ:99515681 或郵箱:99515681@qq.com   WX:codehelp

掃一掃在手機打開當前頁
  • 上一篇:CS 202代寫、代做Operating Systems設計
  • 下一篇:CPT109程序代做、代寫C/C++編程語言
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發動機性能
    挖掘機濾芯提升發動機性能
    海信羅馬假日洗衣機亮相AWE  復古美學與現代科技完美結合
    海信羅馬假日洗衣機亮相AWE 復古美學與現代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
    合肥機場巴士2號線
    合肥機場巴士2號線
    合肥機場巴士1號線
    合肥機場巴士1號線
  • 短信驗證碼 豆包 幣安下載 AI生圖 目錄網

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

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

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

          国产在线播精品第三| 久久国产精品色婷婷| 国产欧美一区二区精品仙草咪| 西瓜成人精品人成网站| 在线不卡欧美| 国产精品免费aⅴ片在线观看| 蜜桃av噜噜一区二区三区| 在线天堂一区av电影| 在线精品国产欧美| 国产欧美日韩在线观看| 欧美激情91| 老鸭窝毛片一区二区三区 | 卡一卡二国产精品| 午夜精品区一区二区三| 亚洲精品一区二区三区福利| 国内精品久久久久久久果冻传媒| 欧美精品手机在线| 免费成人av在线| 久久精品国产69国产精品亚洲| 在线亚洲免费| 99国产精品国产精品久久| 亚洲国产婷婷| 在线观看日韩av| 久久久久国产精品一区三寸| 中文在线资源观看网站视频免费不卡| 悠悠资源网亚洲青| 一区在线观看| 伊人久久大香线蕉综合热线| 国产综合色一区二区三区| 国产欧美亚洲视频| 国产视频综合在线| 国产一区二区三区四区在线观看 | 欧美激情黄色片| 久久综合一区二区| 欧美激情第三页| 欧美人妖另类| 国产精品看片资源| 国产精品卡一卡二卡三| 国产九色精品成人porny| 国产精品视频999| 国产亚洲欧洲997久久综合| 国产亚洲欧洲| 亚洲国产精品嫩草影院| 日韩一级不卡| 性感少妇一区| 久久综合久久综合这里只有精品| 免费一级欧美片在线观看| 欧美激情中文字幕在线| 国产精品乱人伦一区二区| 国产欧美一区二区三区沐欲| 国产一区日韩一区| 亚洲三级影院| 亚洲欧美精品中文字幕在线| 久久国产一区二区三区| 奶水喷射视频一区| 国产精品乱码久久久久久| 黄色在线成人| 一本大道久久a久久精二百| 欧美主播一区二区三区| 欧美精品1区2区| 国产伦精品一区二区三区在线观看| 国产在线视频不卡二| 亚洲另类一区二区| 久久av一区| 欧美日韩一区国产| 精品69视频一区二区三区| 99精品免费网| 免费成人av在线看| 国产日韩欧美a| 99视频在线观看一区三区| 欧美一区二区高清| 欧美日韩一区视频| 精品1区2区3区4区| 亚洲一区二三| 欧美巨乳在线| 亚洲国产美女| 久久婷婷国产麻豆91天堂| 国产精品久久久久国产精品日日| 亚洲国产欧美精品| 久久激情视频久久| 国产日韩欧美黄色| 在线亚洲欧美视频| 欧美日韩国产一区二区| 亚洲高清网站| 久久综合九色| 国产亚洲视频在线观看| 午夜精品久久久久久久99樱桃| 欧美成人免费播放| 1769国内精品视频在线播放| 新67194成人永久网站| 国产精品久久久久久久7电影| 最新国产乱人伦偷精品免费网站 | 亚洲女同性videos| 欧美色精品天天在线观看视频| 亚洲国产日韩欧美| 欧美成人免费网站| 亚洲欧洲精品一区二区| 美腿丝袜亚洲色图| 影音先锋中文字幕一区二区| 久久精品亚洲精品国产欧美kt∨| 国产日韩一区二区| 欧美在线免费观看| 国产视频久久久久| 国产精品a级| 国内成人精品一区| 久久爱www.| 国产午夜精品一区二区三区视频| 亚洲综合色网站| 国产亚洲欧美另类中文| 久久精品视频在线看| 韩国精品久久久999| 久久九九99视频| 亚洲国产视频一区二区| 欧美日韩午夜精品| 性欧美videos另类喷潮| 国产一区二区三区久久精品| 久久美女艺术照精彩视频福利播放| 韩日精品视频一区| 久久久之久亚州精品露出| 亚洲国产精彩中文乱码av在线播放| 欧美不卡福利| 亚洲一区二区三区在线观看视频| 国产精品永久免费视频| 麻豆久久婷婷| 亚洲视频一区二区在线观看 | 亚洲丝袜av一区| 国产在线观看精品一区二区三区| 鲁鲁狠狠狠7777一区二区| 一区二区三区欧美视频| 国产欧美日韩综合一区在线播放 | 亚洲第一综合天堂另类专| 欧美激情一区在线观看| 亚洲欧美第一页| 亚洲第一黄色网| 国产精品二区在线| 久久这里只有| 一区二区三区日韩精品| 国语自产精品视频在线看一大j8 | 99re66热这里只有精品4| 国产精品国产三级国产普通话蜜臀| 欧美一区二区视频在线观看| 亚洲三级视频在线观看| 国产字幕视频一区二区| 欧美日韩免费观看一区| 麻豆成人av| 欧美资源在线观看| 亚洲欧美日韩成人高清在线一区| 亚洲国产高清视频| 国产视频一区免费看| 欧美视频一二三区| 欧美激情欧美狂野欧美精品| 欧美一区二区国产| 亚洲深爱激情| 亚洲美女中文字幕| 亚洲区第一页| 在线精品一区二区| 黄色成人av网站| 国产一区二区剧情av在线| 国产精品久久久久久久久免费樱桃| 免费日韩成人| 狂野欧美激情性xxxx| 久久高清一区| 欧美亚洲午夜视频在线观看| 亚洲视频在线观看网站| 亚洲免费av网站| 亚洲毛片一区| 一区二区电影免费观看| 亚洲日本国产| 日韩视频免费在线观看| 日韩小视频在线观看| 亚洲经典在线| 亚洲激情综合| 亚洲伦伦在线| 一区二区高清在线| 亚洲欧美成人在线| 亚洲欧美日韩国产综合| 欧美一区二区三区日韩视频| 欧美一区二区三区四区高清| 欧美在线视频日韩| 久久免费视频网站| 免费亚洲电影| 欧美区视频在线观看| 欧美午夜三级| 国产日韩欧美二区| 影音先锋中文字幕一区| 亚洲精品一品区二品区三品区| 亚洲美女免费视频| 亚洲午夜高清视频| 久久久久久免费| 欧美aaa级| 国产精品久久久久久久久久ktv | 国产精品久久久爽爽爽麻豆色哟哟| 欧美三级黄美女| 国产精品一区二区黑丝| 国产在线日韩| 99精品福利视频| 欧美在线视频不卡| 欧美不卡在线| 国产精品免费观看在线| 在线看国产日韩|