程序代写代做代考 go Q&A Session for Proglang Lecture Backup

Q&A Session for Proglang Lecture Backup
Session Number: 1207881586
Date: 2020-9-15
Starting time: 14:39
________________________________________________________________
ANON – 14:41
Q: are we supposed to be able to see our quiz 1 grades? it says graded
for me but only shows what I submitted
Priority: N/A
Konstantin Kuzmin – 15:15
A: For quizzes with manual grading component(s) yes. For fully
autograded ones, like Quiz 1, you can check your grade in Rainbow
Grades, once they are updated.
________________________________________________________________
ANON – 14:46
Q: How are we doing check-ins for lecture or mediasites?
Priority: N/A
Konstantin Kuzmin – 15:05
A: Check https://submitty.cs.rpi.edu/courses/f20/csci4430/
forum/threads/31
________________________________________________________________
ANON – 14:48
Q: So being during live lecture counts as participation?
Priority: N/A
Konstantin Kuzmin – 14:50
A: Yes.
________________________________________________________________
ANON – 14:48
Q: By attending this lecture do I need to do anything to get checked
in? Or will that happen automatically?
Priority: N/A
Konstantin Kuzmin – 14:51
A: No, it is sufficient and it will happena automatically.
________________________________________________________________
ANON – 14:49
Q: so is attendance being recorded automatically, so if you attend
them your weekly check-in is fulfilled? Is there somewhere where we
can see our “check-in” record?
Priority: N/A
Konstantin Kuzmin – 14:54
A: Yes, live lecture attendance is (or at least should be!)
taken automatically by WebEx. You can check your attendance through
Rainbow Grades, once they are updated after the end of the week.

________________________________________________________________
ANON – 14:49
Q: by “them” i mean lectures
Priority: N/A
Konstantin Kuzmin – 15:00
A: OK, got it.
________________________________________________________________
ANON – 14:50
Q: Afternoon Everyone. Question. In the first video, Lecture4_1, in
the parsing table, why does expr matched with id predicts term
term_tail? I have an idea but not quite sure.
Priority: N/A
Ana Milanova – ?:?
A: That’s the only possible production for expr. And also, id
begins the strings that term term_tail generates.
________________________________________________________________
ANON – 14:51
Q: Is this being recorded?
Priority: N/A
Konstantin Kuzmin – 14:54
A: It is now. 🙂
________________________________________________________________
ANON – 14:51
Q: Yes we can see
Priority: N/A
Konstantin Kuzmin – 14:55
A: Thank you!
________________________________________________________________
ANON – 14:51
Q: Do we need to attend live lecture and office hour check-in to get
full participation points?
Priority: N/A
Konstantin Kuzmin – 14:56
A: No, any of the two is sufficient but it needs to be done
weekly. You can only get at most 1 point for attendance in each of the
weeks.
________________________________________________________________
ANON – 14:55
Q: Similar to the question above, do we need to do anything to get
checked in for mediasite? Or you could see who watched the videos from
your end?
Priority: N/A
Konstantin Kuzmin – 14:59
A: We are able to get the list of students who watched the

videos on Mediasite directly from them. We are keeping our fingers
crossed that data that we get from Mediasite is accurate. They do not
count students who just downloaded the video though.
________________________________________________________________
ANON – 14:57
Q: if we have two or more variables in the sentential, do we place new
limbs to the left or right?
Priority: N/A
Ana L. Milanova – 15:07
A: We take the leftmost nonterminal (variable?) and place the
branches underneath. So in this case, we place to the left.
________________________________________________________________
ANON – 15:00
Q: thank you
Priority: N/A
Konstantin Kuzmin – 15:00
A: You are welcome.
________________________________________________________________
ANON – 15:02
Q: Yes we see
Priority: N/A
Konstantin Kuzmin – 15:04
A: Thank you!
________________________________________________________________
ANON – 15:02
Q: I cannot hear the lecture, is it just me or everyone?
Priority: N/A
Konstantin Kuzmin – 15:04
A: If unable to get audio to come from the streams, you might
want to try disabling other audio devices. Webex doesn’t respect your
choices in the speaker/microphone menu, but it will pick a new device
if you disable the one it was trying to output on.
________________________________________________________________
ANON – 15:04
Q: So attending one live lecture per week can get full participation
point right?
Priority: N/A
Konstantin Kuzmin – 15:04
A: Correct.
________________________________________________________________
ANON – 15:05
Q: https://mediasite.mms.rpi.edu/Mediasite5/Channel/
programming_languages
Priority: N/A

________________________________________________________________
ANON – 15:05
Q: Link for those who are looking for videps
Priority: N/A
________________________________________________________________
ANON – 15:07
Q: Is this lecture 4? I cannot see lecture 4 on mediasite?
Priority: N/A
Konstantin Kuzmin – 15:19
A: Yes, Lecture 4. make sure you check Page 2 (use < and >
buttons to navigate).
________________________________________________________________
ANON – 15:08
Q: When will the quiz grades be available, mine says see grade on
submitty but doesn¡¯t show me the actual grade
Priority: N/A
Konstantin Kuzmin – 15:18
A: You can check your grade in Rainbow Grades, once they are
updated.
________________________________________________________________
ANON – 15:08
Q: Oh there is a second page. SOrry, nvm
Priority: N/A
Konstantin Kuzmin – 15:19
A: np
________________________________________________________________
ANON – 15:13
Q: So an LL(1) parsing table could correspond to a grammar that isn’t
LL(1)?
Priority: N/A
Ana L. Milanova – 15:13
A: Yes. We can construct an LL(1) parsing table for a grammar
that is NOT LL(1).
________________________________________________________________
ANON – 15:15
Q: So for expr =>* id what does the =>* mean? Because wouldn’t
first(alpha) be * if * was apart of * id?
Priority: N/A
Steven Haussmann – 15:23
A: =>* indicates that the arrow operator is being applied zero
or more times (so, you’re doing zero or more applications of a rule)
Ana L. Milanova – 15:24
A: Yes, what Steven says. The * associates with =>, not with
id, means 0-or-more applications of the grammar rules.

________________________________________________________________
ANON – 15:16
Q: Can you breifly define Follow(A) again? I missed it..
Priority: N/A
Ana L. Milanova – 15:25
A: Follow(A) is the set of terminals b (including $$) that can
appear immediately to the right of A in some sentential form.
________________________________________________________________
ANON – 15:16
Q: In video 2, why isn’t + an element of FOLLOW(term_tail)?
Priority: N/A
Ana L. Milanova – 15:25
A: Because term_tail always appears at the end of the
sentential form. … term_tail$$. So only $$ is in the FOLLOW.
________________________________________________________________
ANON – 15:19
Q: I basically applied the first rule where A –> alpha B beta, and +
is a member of FIRST(beta). What did I miss?
Priority: N/A
________________________________________________________________
ANON – 15:19
Q: On slide 8, it says for the prdocution expr -> * id, First(expr) =
id. Why sint First(expr) not *. Is * no a terminal?
Priority: N/A
Ana L. Milanova – 15:27
A: Because no expr can start with a * (* meaning
multiplication operation). Expressions are all like this:
id*id+id+id+id*id*id+etc. (expr =>* id… means expr generates strings
that begin with id after the application of 0-or-more production
rules. * here associates with =>, not with id.)
________________________________________________________________
ANON – 15:22
Q: What’s the difference between alpha and A
Priority: N/A
Steven Haussmann – 15:22
A: A is a specific nonterminal symbol. ¦Á is just any sequence
of symbols, used to describe what FIRST and FOLLOW are
Ana L. Milanova – 15:27
A: alpha is a sequence of terminals and nonterminals. A is
strictly just one nonterminal.
________________________________________________________________
ANON – 15:22
Q: The * means the beginning of the expression, correct?
Priority: N/A

Steven Haussmann – 15:23
A: The * is part of the =>* opeartor; it’s not one of the
resulting symbols
________________________________________________________________
ANON – 15:24
Q: What do you mean that \alpha is already an \epsilon (using 0
transitions)? Does this mean that \alpha is an \epsilon production?
Priority: N/A
________________________________________________________________
ANON – 15:24
Q: Sorry, disregard, I thought \alpha was a nonterminal
Priority: N/A
________________________________________________________________
ANON – 15:25
Q: Would it be possible to post the videos before lecture starts? I’m
on a linux OS and can’t run webex client and their web client can’t
play the media so I can’t participate right now.
Priority: N/A
Konstantin Kuzmin – 15:26
A: Lecture videos are already being posted at least the day
before the lecture: https://mediasite.mms.rpi.edu/Mediasite5/Channel/
programming_languages
________________________________________________________________
ANON – 11:28
Q: is the end of input marker implicitly part of every grammar? i.e,
even if its not specified by the grammar, can we reference it?
Priority: N/A
Ana L. Milanova – 15:30
A: Yes. Parsers augment grammars with a special production
start -> S $$, where S is the original starting nonterminal.
________________________________________________________________
ANON – 15:27
Q: is there a difference between FIRST(+ term term_tail) and
FIRST(term_tail)?
Priority: N/A
Ana L. Milanova – 15:31
A: Yes. FIRST(+ term term_tail) = {+}. FIRST(term_tail) = {+,
\epsilon). The latter takes into account both possibilities for
expanding the term_tail.
________________________________________________________________
ANON – 15:30
Q: I think I’m getting confused over some of our vocabulary. What does
sentential form mean?
Priority: N/A

Ana L. Milanova – 15:33
A: When we start deriving strings, the intermediate forms we
go through are called sentential forms. There was a definition
somewhere in lecture 2 I think.
Steven Haussmann – 15:34
A: contrast that with a sentence, which is made up entirely of
terminals. A sentential form is allowed to contain nonterminals as
well, and thus is not completely derived yet.
________________________________________________________________
ANON – 15:29
Q: is FIRST(term term_tail) = {id}?
Priority: N/A
Ana L. Milanova – 15:34
A: Correct.
________________________________________________________________
ANON – 15:31
Q: Why isn’t epsilon included in FIRST(A y)?
Priority: N/A
Ana Milanova – ?:?
A: Because Ay always ends on y, and therefore it cannot be
empty (i.e., epsilon).
________________________________________________________________
ANON – 15:32
Q: so epsilon will only appear in the terminal set if it’s not
followed by any other terminals?
Priority: N/A
Ana Milanova – ?:?
A: Essentially, yes.
________________________________________________________________
ANON – 15:32
Q: epsilon is not included for the FIRST(Ay) because D does not
include epsilon?
Priority: N/A
Ana L. Milanova – 15:32
A: Not included in FIRST(BCD) because D does not generate
epsilon. FIRST(Ay) generates strings that end on y, so cannot be
empty.
________________________________________________________________
ANON – 15:32
Q: In previous slide I thought epsilon counted for FIRST, but in this
slide it doesn’t seem to be counted?
Priority: N/A
Ana L. Milanova – 15:34
A: What slide is it?
________________________________________________________________

ANON – 15:33
Q: For FIRST(BCD), why don’t we count epsilon?
Priority: N/A
Ana L. Milanova – 15:35
A: Because D does not derive \epsilon. So we’ll always have w.
________________________________________________________________
ANON – 15:34
Q: Why didn’t you include epsilon in the other FIRST() excamples?
Don’t they also generate epsilon?
Priority: N/A
Ana L. Milanova – 15:36
A: Technically this is correct. We can include \epsilon’s too,
but it will be just \epsilon.
________________________________________________________________
ANON – 15:35
Q: Why is epsilon in FIRST(A) but not FIRST (Ay)
Priority: N/A
Ana L. Milanova – 15:38
A: Because A can generate \epsilon. But Ay always ends on y,
i.e., it can’t be ever the empty string \epsilon.
________________________________________________________________
ANON – 15:35
Q: Nvm I think I got it
Priority: N/A
________________________________________________________________
ANON – 15:43
Q: Can \epsilon never appear in FOLLOW sets?
Priority: N/A
Ana L. Milanova – 15:43
A: Correct. \epsilon cannot be part of FOLLOW sets. It is a
special symbol that can be part of FIRST sets; this designates that
\alpha can derive epsilon.
________________________________________________________________
ANON – 15:43
Q: Why does follow(term_tail) not include id
Priority: N/A
Ana L. Milanova – 15:45
A: Because term_tail always occurs at the end of the
sentential form, we have … term_tail$$. We cannot have a sentential
form where term_tail is followed by id.
________________________________________________________________
ANON – 15:45
Q: Since you say that FIRST(Ay) does not contain epsilon, I’m assuming

that epsilon is only counted if there’s no other terminal that can be
derived after it? Because technically, if you make A produce epsilon,
then FIRST(Ay) will technically start withepsilo
Priority: N/A
Ana L. Milanova – 15:47
A: Yes, that’s right.
Steven Haussmann – 15:54
A: We tend to ignore ¦Å unless we’re dealing with an empty
string
________________________________________________________________
ANON – 15:45
Q: so \epsilon is in FIRST(\alpha) iff (\alpha =>* \epsilon)?
Priority: N/A
Ana L. Milanova – 15:45
A: Correct.
________________________________________________________________
ANON – 15:48
Q: Why is \epsilon counted in FIRST and not FOLLOW? I understand why
it isn’t counted in FOLLOW, why isn’t that same logic applied? i.e. if
prog -> S $$ and S -> \epsilon, why don’t we say FIRST(S) = { $$ }
Priority: N/A
Ana L. Milanova – 15:50
A: You can see on this slide, slide 15. If we have \epsilon in
the First(\alpha), that means that \alpha can generate \epsilon. And
it’s important to know that we can derive \epsilon.
A: Follow up: FIRST(prog) includes $$, so we’ll expand prog by
prog -> S $$ on $$.
________________________________________________________________
ANON – 15:49
Q: Oh, nvm, then FIRST(prog) = { $$ } but FIRST(S) doesn’t include
that
Priority: N/A
________________________________________________________________
ANON – 15:50
Q: Sorry for understanding my questions after asking them
Priority: N/A
Ana L. Milanova – 15:51
A: That’s fine!
________________________________________________________________
ANON – 15:50
Q: What if Alpha in A -> Alpha is Epsilon itself?
Priority: N/A
Ana L. Milanova – 15:51
A: Which one (slide) are you referring to?
________________________________________________________________

ANON – 15:52
Q: I was referring to the Formal Definition of PREDICT Sets. What
happens if Alpha in A->Alpha is Epsilon itself? Then does Epsilon
Derives Epsilon?
Priority: N/A
Ana L. Milanova – 15:54
A: Then A derives \epsilon, i.e., we have A -> \epsilon. Then
the predict set is made up of FOLLOW(A).
________________________________________________________________
ANON – 15:52
Q: at the end of the video, can you show slide 16 again momentarily
Priority: N/A
Ana L. Milanova – 15:52
A: will do
________________________________________________________________
ANON – 15:56
Q: To clarify, the PREDICT set S for some production A tells the
parser to apply production A if it sees something in the set S as the
lookahead token?
Priority: N/A
Ana Milanova – ?:?
A: Correct.
________________________________________________________________
ANON – 15:58
Q: im confused for predict… you have to decide to use either FIRST
or FOLLOW? And how is this decided?
Priority: N/A
Ana Milanova – ?:?
A: We use both in general. Say we are looking at A -> \alpha.
We use FOLLOW(A) only if \alpha can generate \epsilon. Then it matters
what terminal follows the nonterminal A because upon seeing that
terminal we can expand by A -> \alpha.
________________________________________________________________
ANON – 15:59
Q: yes; thankyou!
Priority: N/A
________________________________________________________________
ANON – 16:00
Q: A little off topic, but if we are ever asked to prove that a
grammar is unambiguous, can we just prove that it’s an LL(1) grammar
and is that enough?
Priority: N/A
Ana L. Milanova – 16:01
A: Yes that proves it.

Ana L. Milanova – 16:02
A: But there are a lot of unambiguous grammars that are not
LL(1).
________________________________________________________________
ANON – 16:01
Q: For PREDICT(A–>e), isn’t the formula first(A)-{e} U follow(A)? So
why is it just y, when the first(A) = {z, v, w}?
Priority: N/A
Steven Haussmann – 16:12
A: The formula is (FIRST(¦Á) – {¦Å}) U FOLLOW(A) — it’s not
FIRST(A).
________________________________________________________________
ANON – 16:20
Q: Do you recommend we watch part 4
Priority: N/A
Ana L. Milanova – 16:21
A: Yes, I do… But it is independent and won’t be on tests. I
will plan to get back to Part4 in the Catchup lecture but we might not
have time.
________________________________________________________________
ANON – 16:26
Q: oh I missed that one. And here alpha is epsilon. got you. Thanks.
Priority: N/A
Ana L. Milanova – 16:27
A: Great!