代写 Haskell html prolog ruby compiler software 􏰇􏰈􏰉􏰊􏰋􏰌􏰍􏰎􏰏􏰐􏰑􏰒Confluence􏰓􏰔􏰕􏰖􏰗 􏰘􏰙􏰚􏰛􏰜􏰕􏰖

􏰇􏰈􏰉􏰊􏰋􏰌􏰍􏰎􏰏􏰐􏰑􏰒Confluence􏰓􏰔􏰕􏰖􏰗 􏰘􏰙􏰚􏰛􏰜􏰕􏰖
0 􏰝􏰞! 􏰀􏰁 􏰂􏰃􏰄 􏰅􏰆 􏰟􏰠 ” #
$
CS 3342
,⋆
􏰡􏰔 􏱙􏱚 􏰂􏰃􏰄
􏰡􏰔􏱛􏱜􏱑
! Course Announcements 2019 􏰱January 2019 Calendar
Discussion of Final Exam
Erlang task due in course git reposit Haskell task due in course git reposi
– How to use git
Keeping Up With The Wiki
– OLD Course Announcements from J
– Prolog task due in course git reposit
! Ruby task due in course git reposi
How to start a program
Ruby Task Laundry List
The Making of Phase 1 of Ruby ta The Making of Phase 2 of Ruby ta The Making of Phase 3 of Ruby ta
Software environment of CS3342 co
– Standard setup for course BitBucket
Warmup task due in course git repo
– Week 01: Jan 9􏰣 10 of 2019
– Week 02: Jan 16􏰣 17 of 2019
Week 03: Jan 23􏰣 24 of 2019
– Week 04: Jan 30􏰣 31 of 2019
– Week 05: Feb 6􏰣 7 of 2019
– Week 06: Feb 13􏰣 14 of 2019
– Ruby material Prolog Material Erlang Material
– Haskell Material
– Implementing Language Interpreters a
– Static Code Analysis and CASE Tools
. 􏰝􏰞􏱝􏱞
/
􏰡􏰔 / CS3342 ⋆F􏰳􏰴 &W􏰵􏰶􏰷 ‘S􏰸􏰹 (
/ Course Announcements 2019 􏰱January thru April􏰲
Ruby task due in course git repository by end of
day on 14 Feb 2019
􏰢 Robert Webber􏰅􏰆􏰣 􏰤􏰥􏰦􏰧􏰨􏰩􏰪 07􏰣 2019
Describing the Ruby Task 􏰱structured as three phases a regular expression to tree
converter􏰣 a tree to NFA converter􏰣 and an NFA to DFA converter thru April􏰲
H. Making progress on this assignment. See The Making of Phase 1 of Ruby task due in course git repository by end of day on 14 Feb 2019 .
L. The Making of Phase 2 of Ruby task due in course git repository by end of day on 14
Feb 2019
ry by end of day on 21 Mar 2019
M. The Making of Phase 3 of Ruby task due in course git repository by end of day on 14 ory by end oFfedbay20o1n99 Apr 2019
N. also of interest as another view on the assignment is Ruby Task Laundry List Q. and perhaps How to start a program
Notes:
)
n 2018
ry by end ofadssaiygonmn 7enMtsa/rd2u0e190214/lib/due190214.rb in your course repository. if it is not in the
H. the solution you hand in to this assignment should be in the file
right place􏰣 it might end up with a zero as if it didn’t exist or􏰣 if the TA has time to ory by end of day on 14 Feb 2019
waste on putting it where it belongs􏰣 then a significant penalty will be invoked to discourage such from happening again. As with the warmup exercise􏰣 you should do all the checks possible to make sure your handin has been placed successfully.
a. there is a due190214/name_check.rb program to help you verify that you used k due in course gitthreproigshittonryambyeefonrdyofudrasyoolunti1o4n Ffieleb 2019
L. your solution should be self-contained. in particular􏰣 your solution should not include k due in course git repository by end of day on 14 Feb 2019
or require or require_relative or otherwise reference any other file in the same sk due in coudrisrecgtiotrrye􏰣pinostihtoerryebpyoseintodryo􏰣fodraeylsoenw1h4eFre.b 2019
mpute server used for marking
a. the exception to this being that it is ok to use the Ruby Core libraries and Ruby
Std-Lib􏰣 even though some parts of these libraries are used sufficiently rarely repositories by programmers that they are not included automatically􏰣 but instead have to
itory by end of day on 24 Jan 2019
be explicitly invoked
i. for example􏰣 bigdecimal https://ruby-doc.org/stdlib- 2.4.0/libdoc/bigdecimal/rdoc/BigDecimal.html
ii. for example􏰣 forwardable https://ruby-doc.org/stdlib- 2.4.0/libdoc/forwardable/rdoc/Forwardable.html
b. also comments that reference URLs that were useful in solving the assignment are acceptable 􏰱and indeed􏰣 encouraged􏰲
M. note the solution you hand in for this assignment is essentially some library support classes for the code in the app directory. as such􏰣 your solution code should not be doing any I/O. so􏰣 among other things􏰣 be sure that any debug print messages that might be in your code are inactive – if their output messes up the marking program’s evaluation of your task􏰣 a sizable penalty would be involved as this is harder to deal with than just renaming a file.
The description file that was uploaded with this assignment 􏰱on 2 Feb 2019􏰲 reads:
Assignment due190214 involves writing a Ruby library described on the wiki
https://wiki.csd.uwo.ca/display/CS33422017/Ruby+task+due+in+course+git+re In particular, you will want to review the linked wiki pages on Phase
Phase 2, and Phase 3 of the assignment, as well as the Laundry List for assignment.
As noted on the wiki, the test structure I provide you there is just a sample test framework and not the framework I will actually use for marking. For example, the sample framework currently has 3 test cases in it, whereas the framework I have been working with to develop my solution has 51
and is still growing.
Passing all the hidden phase 1 related tests that I come up with should get to a pass (50%) for the assignment. Passing all the hidden phase 1 and phas related tests should get you to at least a 70% on the assignment. To get
a 100% on the assignment would require passing all my hidden test cases three phases.
So far, the test suites that I am using to evaluate the assignment (51
and growing) take under a second to run on my solution. So if they take ove a minute to run on your solution, I will assume your solution is broken and in an infinite loop and it will be marked accordingly.
Remember that the assignment is being marked as part of the course evaluatio
of your abilities and so is expected to represent your individual effort as
discussed in the accompanying README file.
You should verify that you have accomplished this by running the program assignments/due190214/name_check.rb
by
cd assignments/due190214
ruby name_check.rb
which should respond
successfully found /lib/due190214.rb
If, instead you get:
could not find /lib/due190214.rb
this is bad
then this is bad and you should fix it.
Note name_check.rb just checks the name, we still need to check the contents
of the file yourself.
Once you have pushed your assignment back to the repository, you should also verify that that all worked by connecting to the web page for the repository and navigating to assignments/due190214/lib/due190214.rb and looking at what is there.
Be sure and review the git and assignment related information on the wiki
(and be careful about when you are looking at 2019 material and when
you are looking at older material — like the 2018 assignments). Good luck.
* 􏰫 􏰬􏰭􏰮􏰊􏰋􏰫􏰯􏰰 􏰺􏰻􏰼 + 27 􏰽􏰾
Haolun Li 􏱁􏰄􏱂 Professor Webber􏰣
Are the specifications of the project released already? If so where do I find them?
Sorry if this is a dumb question􏰣 I’m a little bit intimidated by the wiki and I can’t seem to find what I’m looking for.
􏰿􏱀 􏰫 􏰊􏰪 23􏰣 2019
Robert Webber 􏱁􏰄􏱂
Not yet. When they are􏰣 I will update this page as well as that of the week of the next lecture.
􏰿􏱀 􏰫 􏰊􏰪 23􏰣 2019 Ke Chen 􏱁􏰄􏱂
Hi􏰣 Prof:
Could you give a list of what the assignment expects in term of classes and
functions? and any other predetermined attributes. something like:
Ph1:
Class:􏰱name􏰲
Function: input􏰱name􏰲output
attr:􏰱name􏰲type Ph2:

Thank You
􏰿􏱀 􏰫 􏰊􏰪 31􏰣 2019
Robert Webber 􏱁􏰄􏱂
See Ruby Task Laundry List . Since Ruby is duck typed􏰣 the only `type’ requirements are where you are defining a class that I use by name. All other `types’ are just classes that respond to certain messages. Behaviors of methods are simply what is required to make a cluster of usages work.
􏰿􏱀 􏰫 􏰊􏰪 31􏰣 2019 Lionel Wesley Foxcroft 􏱁􏰄􏱂
Professor Webber􏰣
If I’m interpreting this correctly􏰣 the only criteria is that it behaves correctly in your 50+ tests. Does that mean that there are absolutely no non-functional specifications􏰣 and it just needs to work to get 100%?
Thanks
􏰿􏱀 􏰫 􏰩􏰪 03􏰣 2019
Robert Webber 􏱁􏰄􏱂
If you are referring to OO philosophy stuff􏰣 see item 6 on Week 05: Feb 6􏰣 7 of 2019 . Nonfunctional constraints of particular interest are listed in the description file 􏰱included above􏰲 as well as in the notes above.
􏰿􏱀 􏰫 􏰩􏰪 03􏰣 2019 Nicholas Elder 􏱁􏰄􏱂
Can you provide some guidance on how we might go about writing additional test cases @ Robert Webber ? Not just functionally how to create them but also the sorts of features and functionality we should think through combining to get full test coverage to your current standard?
􏰿􏱀 􏰫 􏰩􏰪 07􏰣 2019 Nicholas Elder 􏱁􏰄􏱂
For example how can we effectively test the tree output􏰣 it seems like there can be a lot of spaces and tabs variation.
􏰿􏱀 􏰫 􏰩􏰪 07􏰣 2019
Robert Webber 􏱁􏰄􏱂
The tree is supposed to be convertible back to the string it was produced from using my TreeHolder code. Spaces and tabs aren’t part of the notation presented in The Making of Phase 1 of Ruby task due in course git repository by end of day on 14 Feb 2019 􏰣 so how they are handled in regular expressions is outside the scope of the assignment. How they are handled in a target string 􏰱which is not part of phase 1 testing􏰣 would be that they get converted to a Z before being sent to the FSA.
􏰿􏱀 􏰫 􏰩􏰪 08􏰣 2019 Robert Webber 􏱁􏰄􏱂
How to test is an interesting problem and subject of an entire course and a lifetime of study. When testing􏰣 there are two things to be worried about: 1􏰲 did I understand the task or was something overlooked and 2􏰲 did I make a typo. People make lots of typos and there is a nice theory about how to test for typos. People also misunderstand the task􏰣 but that is harder to test for and there aren’t grand theories for that.
The way you check for typos is that you take your test data that passes on your code and then you introduce a typo into your code and run your tests again. If the typo changed the result of your code but your test data still gave it a pass􏰣 you haven’t tested enough for typos. There are tools that automate this process. The technical term for this approach is mutation testing and a tool for this used by Ruby programmers is called mutant.
The way you check for understanding is more ad hoc. In this case􏰣 you have a number of examples of regular expressions and finite state machines in the textbook and in the wiki. Your code should certainly be able to handle all of them. Remember you want to check for failed matches as well as successful ones 􏰱since otherwise a function that always matched would look like it was working􏰲.
The third of the two ways is the most interesting — to randomly generate test data and see if it works. This works best when you can automate the random generation and testing. You know that to_tree should return the string given􏰣 so that is straightforward to automate. You know the DFA should accept exactly the same thing that the NFA accepts􏰣 so that is easy to automate. The general automation of the checking of the Tree to NFA conversion would require you to write a piece of code that does matching against a Tree􏰣 which then raises the question of how is it tested. Another approach would be to consider special cases. For example􏰣 the concatenation of n character classes should match only strings of length n where those classes line up 􏰱for example 􏰱.LDLDLD􏰲 should only match inputs that are 6 characters long that are alternating letters and digits. Note that A1A2A3 and B3C1D2 both fit this pattern􏰣 but they look identical when sent to your code as my matching program has already converted them to LDLDLD . Anyway􏰣 the big idea around random testing is that it catches things that people don’t think of.
Since a testing course is not a prerequisite for this course􏰣 I basically expect that people will test the way they would test any other assignment they did. Some people will hand in code that has mistakes and my test data will find
them and they will get feedback on that. Some people will hand in code that has mistakes and my test data will miss them and they won’t get feedback about it. And􏰣 perhaps􏰣 maybe􏰣 some people will hand in code that does not have any mistakes and my test data won’t find any mistakes and they won’t get feedback that looks different than if they had had mistakes that my test data missed. In many ways this is much the same as usually happens where we replace the notion of my test data catching a problem with the notion of a TA skimming an assignment catching a problem. The big difference is that test data is more uniform in what it detects than a human would be.
􏰿􏱀 􏰫 􏰩􏰪 08􏰣 2019 Yuhang Song 􏱁􏰄􏱂
Hi Professor􏰣
Could you explain what is NFA and DFA? and give some example of the NFA and
DFA? Thanks
􏰿􏱀 􏰫 􏰩􏰪 09􏰣 2019 Xiaoou Li 􏱁􏰄􏱂
You may find all answers in course CS3331
􏰿􏱀 􏰫 􏰩􏰪 09􏰣 2019 Nicholas Elder 􏱁􏰄􏱂
Xiaoou 3331 is not a prerequisite to this course􏰣 only 2211 is. 􏰿􏱀 􏰫 􏰩􏰪 09􏰣 2019
Robert Webber 􏱁􏰄􏱂
Correct􏰣 see Re: Ruby task due in course git repository by end
of day on 14 Feb 2019 . 􏰿􏱀 􏰫 􏰩􏰪 09􏰣 2019
Robert Webber 􏱁􏰄􏱂
Already did this in lectures Week 03: Jan 23􏰣 24 of 2019 and Week 04: Jan 30􏰣 31 of 2019 . Those wiki pages also contain links to such discussions and examples􏰣 including a link to our textbook on Compiler Design which has a chapter on same 􏰱with discussion and examples􏰲.
These are very standard topics in computer science and so some people will encounter them in other courses they may have taken before they got to this one􏰣 but this one does not expect that􏰣 which is why so much lecture time was devoted to the topics and so much material made available.
If you are having difficulty reading Chapter 1 in the text􏰣 you might want to watch Regular expressions and Non-Deterministic Finite State Automata 􏰱NFA􏰲 􏰱talk􏰲 first and then try the Chapter again. There are many resources on these topics 􏰱this particular video goes all the way to conversion to DFAs although it isn’t obvious from the title􏰲 and if they help you understand􏰣 that is fine. But the assignment assumes you understand the presentation in the textbook.
􏰿􏱀 􏰫 􏰩􏰪 09􏰣 2019 Haolun Li 􏱁􏰄􏱂
Hey everyone􏰣
Hope your assignment is going well. I was fortunate enough to get the help from Lionel􏰣 a classmate of ours􏰣 and with his permission I’m posting the test cases he built. You can find the Gitlab repo below. For those of you who aren’t familiar Gitlab is just a place where we can put files for people to download. There will be more detailed instruction in the link below:
This is viewed as unacceptable collaboration. The repo was taken down.
Also join the Facebook study group for the class. We can help each other:
https://m.me/join/AbZI0z50YtNg3ulo
Let’s make sure not to send each other code and instead focus on deciphering what exactly we are supposed to do.
􏰿􏱀 􏰫 􏱟􏱠4􏱡􏱢􏱣􏱤 Robert Webber 􏱁􏰄􏱂
Why would you be doing it on Facebook rather than on the wiki? Other than creating an unfair advantage for some people rather than others?
And why would you think making up test data for you isn’t as much doing your work for you as writing code for you is? As discussed in Week 01: Jan 9􏰣 10 of 2019 the mark is supposed to represent your work􏰣 not what you can do when a bunch of people help you. Posting questions to the wiki is the only exception I have approved – see discussion of `unacceptable collaboration’
in http://www.csd.uwo.ca/current_students/undergraduate_students/scholas tic_offences.html .
􏰿􏱀 􏰫 􏱟􏱠5􏱡􏱢􏱣􏱤 Haolun Li 􏱁􏰄􏱂
Oh I’m sorry about that Professor Webber I didn’t know that this would be unacceptable.
I’ll take down the test cases immediately.
􏰿􏱀 􏰫 􏱟􏱠5􏱡􏱢􏱣􏱤 Yuhang Song 􏱁􏰄􏱂
Hi Professor􏰣
For the assignment􏰣 I cannot late for even one minute􏰣 right? or I will get a 0?
􏰿􏱀 􏰫 􏱥􏱌10o01 􏰐􏱦
Lionel Wesley Foxcroft 􏱁􏰄􏱂
Some time the following morning􏰣 he will download everyone’s repository. If yours hasn’t been submitted by then􏰣 you get 0. This means the deadline is effectively about 10 hours later􏰣 but it’s a hard deadline so don’t mess with it.
􏰿􏱀 􏰫 􏱥􏱌11o22 􏰐􏱦 Yuhang Song 􏱁􏰄􏱂
Are you sure professor will download it next morning? and do not download immediately after the deadline?
􏰿􏱀 􏰫 􏱥􏱌11o31 􏰐􏱦
Lionel Wesley Foxcroft 􏱁􏰄􏱂
yep
􏰿􏱀 􏰫 􏱥􏱌11o31 􏰐􏱦 Robert Webber 􏱁􏰄􏱂
Yes􏰣 I don’t come in the school just for the pleasure of downloading a minute after midnight. Indeed􏰣 I don’t even come in in the morning unless I have to. Generally I will have a chance to get lunch before I come in on a Friday to do the download. I start the download before I check the wiki or email. ANd if your stuff isn’t there when I download􏰣 then it is a zero. The only exceptions being medical excuses approved by the Dean’s office.
􏰿􏱀 􏰫 􏱟􏱠4􏱡􏱢􏱣􏱤 Andrzej Tomasz Gieralt 􏱁􏰄􏱂
Hello􏰣 just a clarification question – here it says the assignment is due by the end of the day on Thursday. Elsewhere you have said it is due at midnight on Wednesday. Is it in fact due Thursday night? Thank you.
􏰿􏱀 􏰫 􏱥􏱌4o07 􏱧􏱦
Robert Webber 􏱁􏰄􏱂
I have no idea what you mean by elsewhere. Show me the links and I can tell you which is right.
􏰿􏱀 􏰫 􏱟􏱠4􏱡􏱢􏱣􏱤 Yuhang Song 􏱁􏰄􏱂
Hi Professor􏰣
If I can complete phase1 and phase2􏰣 then I do partial phase3􏰣 but the phase3 is not perfect􏰣 can not get the correct output􏰣 could I get some mark for phase3? Thanks!
􏰿􏱀 􏰫 Spencer McMaster􏰫􏱨􏱩 􏱟􏱠23􏱡􏱢􏱣􏱤 Robert Webber 􏱁􏰄􏱂
There will be many test cases per phase. Getting some right and some wrong generates partial marks for the phase. Given the structure of the assignment􏰣 if you are making mistakes in one phase􏰣 that will most likely turn into mistakes in another phase as well.
􏰿􏱀 􏰫 􏱟􏱠4􏱡􏱢􏱣􏱤 􏱃􏱄􏰽􏰾…
d Compilers
at
􏱅􏰒􏰊􏰋􏱆􏱇Department of Computer Science􏰣 The University of Western Ontario􏱈􏱉􏱊Atlassian Confluence Community License􏰗􏱋􏱌􏰽􏱍Confluence􏰗
􏱎􏰨 Atlassian Confluence 6.13.0 􏱏􏱐􏱑􏰆 􏱒 􏱓􏱔􏱕􏱖 􏱒 Atlassian 􏱗􏱘
o t
a o t
s s
s
n
p
y e
r
n