首页
网站开发
桌面应用
管理软件
微信开发
App开发
嵌入式软件
工具软件
数据采集与分析
其他
首页
>
> 详细
EECS 590代写、代做C++编程设计
项目预算:
开发周期:
发布时间:
要求地区:
Advanced Programming Languages
Homework Assignment 6F and 6C
EECS 590
Pairs. You may work with a partner for HW 6F and HW 6C. You may also work alone.
If you work with a partner, we expect roughly 1.5× the work described below from the
partnership (but not 2× — there is communication and teamwork overhead). If you work
with a partner then the partnership will submit one final PDF writeup (selecting the team
members on Gradescope) and one final code project (selecting the team members on the
autograder). You must indicate your partnership or solo status in the writeup text (see
below).
Logistics. The previous homework assignment was largely theoretical. This homework
assignment is largely practical. There is no peer review component for this homework as signment.
In class we have covered operational semantics (large- and small-step), axiomatic seman tics (including verification condition generation) and some abstract interpretation. You are
now qualified to pull ideas from many of those techniques together and create a non-trivial
program analysis.
This analysis will target off-the-shelf C programs. We will use the CIL library to parse and
process C programs into an IMP-like OCaml representation. We will use the Z3 automated
theorem prover of de Moura and Bjorner to reason about infeasible paths or otherwise decide
questions of logic.
Our analysis will automatically generate test inputs that will force the subject program
to cover all of its branches. This is undecidable in general (by direct reduction with the
halting problem). Automated test input (and test case) generation is a research problem
that is receiving quite a bit of attention; see the papers on the course webpage for more
information. This problem is also known as program reachability, the same issue we discussed
in the context of software model checking.
I have provided an introductory analysis. It performs flow-sensitive, path-sensitive,
context-insensitive, intraprocedural path enumeration, symbolic execution, and constraint
generation to create test inputs. Unlike previous assignments, for this assignment you may
change anything in the main file you like.
Initial steps:
1. Compile tigen, our test-input generation program. See the file README-GradPL.txt in
the code archive for details. Reproducing the systems research results of others is a
1
key part of modern research. Getting the code up and running is explicitly part of this
assignment and is your responsibility. Talk to your friends, post on the forum, scour
the Internet — do whatever it takes to make it happen.
2. Take a look at some of the included small subject programs. Think about how you
would generate test inputs to reach and cover all of their branches. Then run tigen
and inspect the test cases it actually creates.
As a sanity check, on my machine, the report.txt output is:
array-1.i.c : reached 0 / 4
array-2.i.c : reached 8 / 8
array-3.i.c : reached 0 / 10
array-4.i.c : reached 1 / 4
balanced.i.c : reached 4 / 8
bsearch-1.i.c : reached 4 / 8
bsearch-2.i.c : reached 6 / 8
bubblesort.i.c : reached 5 / 6
conway.i.c : reached 6 / 6
dotprod.i.c : reached 2 / 2
eq-index.i.c : reached 6 / 6
fibo.i.c : reached 6 / 6
float-1.i.c : reached 2 / 6
float-2.i.c : reached 7 / 8
float-3.i.c : reached 5 / 8
float-4.i.c : reached 4 / 14
float-5.i.c : reached 1 / 4
gcd.i.c : reached 4 / 4
hailstone.i.c : reached 5 / 6
leven.i.c : reached 7 / 10
many-features.i.c : reached 0 / 8
matmul.i.c : reached 3 / 6
matrix-path.i.c : reached 0 / 8
mymin-1.i.c : reached 7 / 8
roman.i.c : reached 21 / 28
selsort.i.c : reached 6 / 6
simple-1.i.c : reached 2 / 2
simple-2.i.c : reached 4 / 4
simple-3.i.c : reached 8 / 8
simple-4.i.c : reached 5 / 6
string.i.c : reached 0 / 8
struct-1.i.c : reached 3 / 10
struct-2.i.c : reached 0 / 8
struct-3.i.c : reached 0 / 18
struct-float.i.c : reached 0 / 16
subseqsum.i.c : reached 0 / 12
2
Your output may be slightly different, but if you are reaching significantly fewer
branches, you may be encountering a local setup or installation concern.
3. Read some of the papers associated with this homework on the course webpage.
This exercise is open-ended. You must do something to convince me that you have
an integrated understanding of the theory and practice of using PL research techniques to
analyze programs. More concretely, you must modify tigen.ml so that it is “better” in a
way of your choosing. As a rough estimate, I would expect a diff of your modified source
to indicate at least 200 changed lines. Then you must write up a formal three- or four paragraph explanation of what you did and why it was worthwhile. Your explanation should
motivate your changes and explain why the problem you tackled is important.
Any of the following could suffice:
• Modify tigen so that it handles string-valued data. Textual input generation is in creasingly popular, both using modern LLM-style techniques or traditional symbolic
approaches (e.g., some students have integrated the DPrle external decision procedure
to handle some string constraints). While not required, handling string or textual data
often involves inferring a grammar or regular expression constraints.
• Modify tigen so that it handles loops in an intelligent manner. For example, you
might use a dataflow-style join — if it is to possible reach the loop head knowing
x = 0 ∧ y = 55 and it is also possible to reach the loop head knowing x = 5 ∧ y = 55,
you should process the loop in a state where y = 55 (or, better yet, x ≥ 0 ∧ y = 55).
• Modify tigen so that it handles arrays. Note that Z3 already has built-in handling for
the McCarthy select and update axioms, but you’ll have to integrate it.
• Modify tigen so that it handles the heap (i.e., dynamic pointers) more precisely. For
example, you might introduce an explicit handling of malloc (which either returns 0
or a new non-zero address that is distinct from all previous addresses) and free.
• Modify tigen so that it uses computed alias information. CIL comes with John Kodu mal’s implementation of Manuvir Das’ One-Level Flow alias analysis to aid in reasoning
about pointers, but it is not currently used in this project. As a hint, alias analysis in formation leads directly to “distinctness” constraints. This would be a relatively short
change, so you should also do something else and/or provide compelling examples to
show that the alias analysis really helps.
• Modify tigen so that its performance and scalability are non-trivially improved. This
typically requires more “engineering” than “theory”, but getting an analysis to run
on millions of lines of code (e.g., the Linux kernel, SQL Server) is very difficult. Your
modified version should run significantly faster on large benchmarks of your choosing.
3
• Modify or post-process tigen so that the performance of its generated test inputs is
non-trivially improved. That is, perform test suite selection or test suite reduction or
even time-aware test suite prioritization or a similar improvement. Ideally we would
like the smallest number of test cases that require the smallest amount of wall-clock
time to execute but still covert the greatest fraction of the subject programs. This is
a reasonable project if you are more interested in CS theory than in systems hackery.
• Modify tigen to handle record data types (e.g., structures and/or unions).
• Modify tigen to handle floating-point data types. In practice, this ends up being insuffi-
cient for full credit for most students, as a direct implementation of Z3’s Real datatype
(especially without considering the differences between real numbers in mathematics
and IEEE floating point numbers) may not provide enough material to demonstrate
your mastery of course concepts. Think carefully before you select this option.
• Modify tigen to accept additional constraints provided by the user (e.g., pre- and post conditions on the subject program, an external constraint language that you parse at
the beginning, or whatever you like). For example, you may want to specify that you’re
only interested in test inputs involving negative numbers. Part of a larger project might
be to have tigen output multiple diverse test inputs that cover the same path.
• Modify tigen to be context-sensitive. You might compute the call graph and analyze the
functions in reverse dependency order. You might do a full-blown CFL reachability
analysis. Or you might just start in the target function and take very long paths
through the entire reachable program. Handling recursion is a related topic.
• Modify tigen to incorporate ideas from the popular and effective afl (see https:
//github.com/google/AFL), such as the use of a genetic algorithm.
• Modify tigen so that it implements key ideas from a well-cited or classic test input
generation tool. Examples might include Godefroid et al.’s DART project (random
test input generation), Sen et al.’s CUTE project (concolic testing), or Lakhotia et
al.’s AUSTIN project (empirical optimizations and best practices).
• Rewrite tigen so that it supports another target language with functionality compa rable to the provided baseline. Please check with the instructor before selecting this
option: it usually involves taking the provided tigen code as documentation and writ ing something entirely new. This means that more of the focus is on writing code to
process intermediate representations (rather than implementing a research idea), and
thus more coding work may be required. However, it may be appealing to students
working on a new language. For example, if you are involved in Cyrus Omar’s Hazel
language project, writing a test input generator for Hazel that can be incorporated into
that project going forward may feel more impactful than writing a “one-off” tool that
helps with learning for a class but is not used later.
4
Exercise 6C. Coding. Submit your modified tigen.ml file. In addition, submit two new
subject programs in the style of the subject programs already included. Your homework
should perform well on those new subject programs.
Exercise 6F-1. Bookkeeping [2 points].
1. Clearly indicate whether this is partner work (and make sure both names are clearly
indicated) or solo work.
2. How did this assignment go? What were the high points and the low points? We’re
interested in hearing your opinions, and this is also an opportunity to speak directly
about any meta-level concerns that arose during this assignment. For example, if you
ran out of time, you might feel more comfortable mentioning that here than in the
formal section of the report.
Exercise 6F-2. Report [22 points]. Provide a multi-paragraph report describing your
changes (as above) as well as any other compelling figures or charts relevant to supporting
your case.
Recall that you should demonstrate that you did something useful with respect to this
homework’s goals of using program analysis techniques either (1) in your research or (2) to
understand programs or (3) to find bugs or (4) to verify properties of programs or (5) to
make related tools more usable.
Exercise 6F-3. Research Communication [4 points]. Compose a brief (one- or two paragraph) email to one of the authors of the tools or papers you used in this homework
and include the text of it in your submission. In addition, indicate whether you are willing
to use your name or whether you would like to be portrayed as an anonymous student in
my class. I will check off the fact that you wrote something and potentially forward it
along (or suggest that you do so personally). You can comment on any aspect of your
experience with their work — your comments need not be positive. For example, you might
ask Bjorner why Z3 doesn’t handle multiplication, complain to Kodumal or Das that OLF
isn’t precise enough for C programs, or tell Necula or McPeak that you find CIL’s memory
lvalue semantics unintuitive. You might write to Lakhotia and ask him how he managed to
scale to large programs given all the difficulties you observed when wrestling with C. If you
do offer criticism, strive to make it constructive by commenting on what you would have
liked to have seen instead or how you might like to see things improved if the time were
available. If you absolutely cannot think of anything to say, thank them for making their
tools available and let them know that you used them with success. Even minor comments
about documentation or a fresh-eyed perspective on usability can be helpful.
The purpose of this non-standard exercise is two-fold.
• First, I have observed multiple instances in this class of a student being unwilling to
contact the author of some publicly-available project. While I realize that you don’t
5
want to be known as a whiny grad student who didn’t bother to read the manual (or
some other misconception), it’s also not worth wasting your time to try to decipher a
research prototype when the author is only an email away. I think it would legitimately
be good practice for many students to correspond with an arbitrary researcher. You
may not get a response, but the sky won’t fall. (In addition, I know the people involved
in all of this software and they are all quite friendly.)
• Second, internships are not the only way to build up contacts and networks. It is en tirely reasonable to grow a friendship or collaboration with someone over time, starting
with a lowly email about research, moving on to chatting a conferences, and eventually
working together on new research. You’re rarely certain of exactly where you will end
up or what you will be working on, so it behooves you to know as many people out
there as possible.
• Third, many software systems papers (especially in programming languages, software
engineering, or operating systems) benefit from conducting a direct empirical compar ison to a previous project. This often involves locating, compiling and running the
source code from that previous project. Despite the rise of containerization, virtual
machines, paper artifact badges, and the like, getting the code from a prior paper to
run often requires communicating with the prior authors.
Exercise 6F-4. Guided Notes Feedback [2 points]. This semester we ran a pilot
program of providing guided notes. Many students report that Graduate Programming Lan guages can be demanding in terms of the number of new things to keep track of (e.g.,
new typography and vocabulary, formal mathematical and logical reasoning, etc.). Peda gogy studies suggest that guided notes can reduce cognitive overhead and support study
skills (e.g., see teaching-tip-of-the-week/engaging-students-with-guided-notes.html), but their use
may not be as clear in this graduate-level setting as opposed to an undergraduate context.
Write one positive sentence about the guided notes and write one sentence with a suggestion
for improvement. (1 point for positive sentence, 1 point for negative sentence.) The content
of your answer does not influence your grade in any way: this is feedback to help improve
future semesters.
Submission. Turn in the formal component of the assignment as a single PDF document
via the gradescope website. Your name and Michigan email address must appear on the
first page of your PDF submission but may not appear anywhere else. Turn in the coding
component of the assignment via the autograder.io website.
6
软件开发、广告设计客服
QQ:99515681
邮箱:99515681@qq.com
工作时间:8:00-23:00
微信:codinghelp
热点项目
更多
代写tc2343、代做python设计程...
2025-04-15
6412ele代写、代做c/c++,pyth...
2025-04-15
fit5221代写、代做python语言编...
2025-04-15
代写assessment 3 – “annota...
2025-04-15
代写 comp 310、代做 java/pyt...
2025-04-14
代做 program、代写 java 语言...
2025-04-14
program 代做、代写 c++/pytho...
2025-04-14
代写review questions – ad/a...
2025-04-14
代写eng5009 advanced control...
2025-04-14
代做ent204tc corporate entre...
2025-04-14
代写assignment st3074 ay2024...
2025-04-14
代做cs3243 introduction to a...
2025-04-14
代做empirical finance (bu.23...
2025-04-14
热点标签
mktg2509
csci 2600
38170
lng302
csse3010
phas3226
77938
arch1162
engn4536/engn6536
acx5903
comp151101
phl245
cse12
comp9312
stat3016/6016
phas0038
comp2140
6qqmb312
xjco3011
rest0005
ematm0051
5qqmn219
lubs5062m
eee8155
cege0100
eap033
artd1109
mat246
etc3430
ecmm462
mis102
inft6800
ddes9903
comp6521
comp9517
comp3331/9331
comp4337
comp6008
comp9414
bu.231.790.81
man00150m
csb352h
math1041
eengm4100
isys1002
08
6057cem
mktg3504
mthm036
mtrx1701
mth3241
eeee3086
cmp-7038b
cmp-7000a
ints4010
econ2151
infs5710
fins5516
fin3309
fins5510
gsoe9340
math2007
math2036
soee5010
mark3088
infs3605
elec9714
comp2271
ma214
comp2211
infs3604
600426
sit254
acct3091
bbt405
msin0116
com107/com113
mark5826
sit120
comp9021
eco2101
eeen40700
cs253
ece3114
ecmm447
chns3000
math377
itd102
comp9444
comp(2041|9044)
econ0060
econ7230
mgt001371
ecs-323
cs6250
mgdi60012
mdia2012
comm221001
comm5000
ma1008
engl642
econ241
com333
math367
mis201
nbs-7041x
meek16104
econ2003
comm1190
mbas902
comp-1027
dpst1091
comp7315
eppd1033
m06
ee3025
msci231
bb113/bbs1063
fc709
comp3425
comp9417
econ42915
cb9101
math1102e
chme0017
fc307
mkt60104
5522usst
litr1-uc6201.200
ee1102
cosc2803
math39512
omp9727
int2067/int5051
bsb151
mgt253
fc021
babs2202
mis2002s
phya21
18-213
cege0012
mdia1002
math38032
mech5125
07
cisc102
mgx3110
cs240
11175
fin3020s
eco3420
ictten622
comp9727
cpt111
de114102d
mgm320h5s
bafi1019
math21112
efim20036
mn-3503
fins5568
110.807
bcpm000028
info6030
bma0092
bcpm0054
math20212
ce335
cs365
cenv6141
ftec5580
math2010
ec3450
comm1170
ecmt1010
csci-ua.0480-003
econ12-200
ib3960
ectb60h3f
cs247—assignment
tk3163
ics3u
ib3j80
comp20008
comp9334
eppd1063
acct2343
cct109
isys1055/3412
math350-real
math2014
eec180
stat141b
econ2101
msinm014/msing014/msing014b
fit2004
comp643
bu1002
cm2030
联系我们
- QQ: 9951568
© 2021
www.rj363.com
软件定制开发网!