Confluence
/ ! ” #
$
! 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 reposito
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
, Misc
–
.
/… ⋆F &W ‘S (
/ Ruby task due in course git repository by end of day on 14 Feb 2019 Ruby Task Laundry List
Robert Webber 02 2019
See Ruby task due in course git repository by end of day on 14 Feb 2019 for general handin
thru April instructions.
@. Phase 1:
a. The Making of Phase 1 of Ruby task due in course git repository by end of day
ry by end of day on 21 Mar 2019
on 14 Feb 2019
b. You are implementing a class PrefixToTree that will work with
ory by end of day on 9 Apr 2019
n 2018
y by end of day on 14 Feb 2019
my phase_1_sample_tests.rb program. Specifically for any string that is a properly formed regular expression in my lisp-based prefix notation re_string it should be true that
)
TreeHolder.new(PrefixToTree.new(re_string).to_tree).to_s == re_str ry by end of day on 7 Mar 2019
if you look at the definition of TreeHolder in phase_1_helpers.rb you will see that this makes a number of requirements on what the to_tree message is returning when sent to an instance of your PrefixToTree class.
i. Specifically the return from to_tree must respond to the messages
@. root returning something that behaves like a string
N. subtrees returning something that behaves like an array of trees k due in course git repository by end of day on 14 Feb 2019
where a tree is something like what to_tree is returning
k due in course git repository by end of day on 14 Feb 2019
c. As this is phase 1 of a three phase process you also want what to_tree returns to work with your TreeToNFA class in the next phase.
sk due in course git repository by end of day on 14 Feb 2019
d. While these are the `requirements’ in order to accomplish the requirements in mpute server used for marking
a reasonable fashion you will probably want to define other methods and
classes in addition to those mentioned above.
e. Note your code should be working for any re_string that corresponds to a
repositories
itory by end of day on 24 Jan 2019
d Compilers
a. The Making of Phase 2 of Ruby task due in course git repository by end of day on 14 Feb 2019
b. You are implementing a class TreeToNFA that will work with my phase_2_sample_tests.rb program. Specifically for any string that is a properly formed regular expression in my lisp-based prefix notation re_string it should be true that
test_case_tree = PrefixToTree.new(re_string).to_tree test_case_nfa = TreeToNFA.new(test_case_tree).to_nfa NFAScanner.new(test_case_nfa).match(input_string)
will cause match to return true if input_string is matched by any specified properly formed re_string and return false if input_string is not matched by the specified properly formed re_string. if you look at the definition of NFAScanner in phase_2_helpers.rb you will see that this makes a number of requirements on what the to_nfa message is returning when sent to an instance of your TreeToNFA class.
i. Specifically the return from to_nfa must respond to the messages
@. start – which returns something that behaves like a state see
below
N. epsilon_closure that is taking a `state’ as a parameter and returning
something like an array of states
V. next that is taking a `state’ and an `input category’ as parameters
and returning something like an array of states
ii. A state is something that accepts the message accepting? and returns
true or false
c. As this is phase 2 of a three phase process you also want what to_tree returns
to work with your NFAToDFA class in the next phase.
d. While these are the `requirements’ in order to accomplish the requirements in
a reasonable fashion you will probably want to define other methods and
classes in addition to those mentioned above.
e. Note your code should be working for any re_string that corresponds to a
properly formed regular expression and any input string not just the sample
properly formed regular expression not just the sample test cases provided. N. Phase 2:
test cases provided. V. Phase 3:
a. The Making of Phase 3 of Ruby task due in course git repository by end of day on 14 Feb 2019
b. You are implementing a class NFAToDFA that will work with my phase_3_sample_tests.rb program. Specifically for any string that is a properly formed regular expression in my lisp-based prefix notation re_string it should be true that
test_case_tree = PrefixToTree.new(re_string).to_tree test_case_nfa = TreeToNFA.new(test_case_tree).to_nfa test_case_dfa = NFAToDFA.new(test_case_nfa).to_dfa DFAScanner.new(test_case_dfa).match(input_string)
will cause match to return true if input_string is matched by any specified properly formed re_string and return false if input_string is not matched by the specified properly formed re_string. if you look at the definition of DFAScanner in phase_3_helpers.rb you will see that this makes a number of requirements on what the to_dfa message is returning when sent to an instance of your NFAToDFA class.
@. Specifically the return from to_dfa must respond to the messages
a. start – which returns something that behaves like a state
see below
b. next that is taking a `state’ and an `input category’ as
parameters and returning something like an array of states
c. a DFA accepts the message next with parameters state and
category to return something that is either a state or the
class NullState
N. there is a class named NullState that is defined and exists for the
sole purpose of having something to return when there is not a transition from the current state on the current input character according to the method next.
V. A state is something that accepts the message accepting? and returns true or false
c. While these are the `requirements’ in order to accomplish the requirements in a reasonable fashion you will probably want to define other methods and classes in addition to those mentioned above.
d. Note your code should be working for any re_string that corresponds to a properly formed regular expression and any input string not just the sample test cases provided.
+ 3
Lin-Sheng Ding
Hi Professor Webber I was wondering if Phase 3 is part of the assignment or if it
would be revealed later on much thanks 02 2019
Robert Webber
Later on has arrived. As per the 2 Feb announcement on Week 05: Feb 6 7 of 2019 your repositories have been updated with the phase 3 material as has this page and related pages from Ruby task due in course git repository by end of day on 14 Feb 2019 . Enjoy.
02 2019 Lin-Sheng Ding
Thank you!
03 2019 …
*
Department of Computer Science The University of Western OntarioAtlassian Confluence Community LicenseConfluence
Atlassian Confluence 6.13.0 Atlassian
o t
a o r
s s
s
n
i