User s Guide: JFLAP Finite Automata Feedback/Grading Tool

Size: px
Start display at page:

Download "User s Guide: JFLAP Finite Automata Feedback/Grading Tool"

Transcription

1 User s Guide: JFLAP Finite Automata Feedback/Grading Tool Daphne A. Norton dan0337@cs.rit.edu February 14, Preface This tool is intended for use with JFLAP, the Java Formal Language and Automata Package (see It provides feedback to the user regarding their solutions to problems involving Deterministic Finite Automata (DFAs) and Nondeterministic Finite Automata (NFAs). The program can simply state that an answer is correct or incorrect; this option may be useful for instructors grading homework assignments or take-home examinations. Alternatively, when equivalence is checked to determine if the student s model accepts the same language as the instructor s answer key, but the student has an incorrect solution, the feedback may include a specific witness string which is accepted by exactly one of these two automata. This feature can even be useful outside the classroom, when looking for a string demonstrating inequivalence. There are a few ways to run the program: 1. Within JFLAP, an added menu option can used to check two finite automata for equivalence. Unlike the existing menu option, if the automata are NOT equivalent, this program provides extra feedback. It displays a short witness string which is accepted by one automaton, but not by the other. 2. This program can also be run standalone, without the JFLAP GUI. This allows the user the option to see verbose output, if they want to follow exactly what the algorithm is doing as it compares the automata. The witness can be turned on or off, as desired. Two different equivalence-checking algorithms are currently available. One is the Hopcroft O(n lg n) partitioning algorithm, which actually runs more slowly if a witness is created. The other is a faster, nearly linear merging algorithm by Hopcroft and Karp; it remains nearly linear even if a witness is produced. For small automata of the size typically created in JFLAP, users will not notice a significant performance difference. However, the merging algorithm has an added advantage, in that it always produces (one of) the shortest possible witness string(s). 3. It can be used as a grading tool. For instance, it can be run via try, the homework submission system which is used frequently at RIT. Instructors 1

2 who are familiar with try will find that it is easy to set it up to accept and grade JFLAP assignments. 2 Instructions 2.1 Getting Started You will need to ensure that the Java JRE version 1.5 or higher has been installed on your computer. Java is available for download on the Sun site at java.sun.com. To download JFLAP, browse to jflap.org and click on Get JFLAP. Since the grading code was written to work with JFLAP 6.4, it is recommended that you download version 6.4. This file is named JFLAP.jar. For the customized feedback/grading code: Obtain JFLAP_grade_dn.jar from If this site is no longer available, the code should be available from the RIT Computer Science Graduate Projects/Theses site, or contact Edith Hemaspaandra ( If you wish to use the new menu option within JFLAP, the easiest approach is to update the JFLAP jar with the class files contained in JFLAP_grade_dn.jar. To do this in Unix, put both jars in the same directory, extract the contents of JFLAP_grade_dn.jar (jar -xvf JFLAP_grade_dn.jar), and update JFLAP.jar: jar -uvf JFLAP.jar equivalence/*.class gui/action/fawitnessaction.class gui/menu/menubarcreator*.class To start the JFLAP program in a Windows environment, simply double-click on the jar file. To start it in Unix, use: java -jar JFLAP.jar For more information, see the directions and Useful References below. 2.2 The Get Distinguishing String Menu Option JFLAP has a lot of nice features, including the ability to determine if two finite automata are equivalent. However, what if you have two NFAs (and/or DFAs), and you would like a simple example string to show exactly what makes them different? The code in this package provides a convenient Get Distinguishing String menu option. To access it, make sure you have done the setup in Getting Started above. Then: 1. Start up JFLAP. 2

3 2. Click on Finite Automaton. 3. Draw two finite automata (as per usual in JFLAP), or choose the menu option File > Open... and browse to the previously saved.jff files you want to compare. You will need to have at least two automata open. 4. In one of the windows, choose the menu option Test > Get Distinguishing String. See Figure A pop-up will allow you to select the second automaton from a drop-down. Only the files you have open will be shown. Click OK when ready. 6. A sample of the final output is shown in Figure 2. This is a string (witness) which one automaton accepts, and the other does not. If you compare two equivalent automata, there will not be a witness for them, as they both accept the same language (the same set of strings), so the program will state that they are equivalent. Note that if you run the program multiple times on the same automata, the possibility exists that you will not get the same witness every time. This is because the order of iteration over HashSets in Java can vary over time, and the witness which is produced depends upon the order in which the states and transitions are processed. However, note that the witness will be as short as it possibly can be, since the program does a breadth-first search (a state-merging algorithm) to find it. See the author s project paper for a full discussion. 2.3 Verbose Mode Outside the JFLAP GUI Normally, the Unix command to run the jar for grading purposes is: java -jar JFLAP_grade_dn.jar studentfile.jff answerkey.jff true where the two.jff files are the student s answer and the instructor s answer key. The order of these two files does not matter. The last parameter, true, can be changed to false if the instructor does not want to display a witness if the answer is wrong. No additional detailed output is provided. A fourth parameter of false may be added to this command if you wish to use the Hopcroft partitioning algorithm behind the scenes instead of the default merging algorithm. However, to study the equivalence-checking algorithms in more depth, see the author s paper and the Java source code which is included in the.jar file. If you are interested in tracing exactly what the near-linear merging algorithm or the n lg n Hopcroft partitioning algorithm is doing as it compares two automata, you can save any two finite automata as.jff files and then run the tool in verbose mode. For example, if you run the partitioning algorithm, then the 3

4 Figure 1: The menu option to get a sample string that distinguishes two automata. Figure 2: The witness string demonstrating why two automata are different. 4

5 inverse transition function, processing lists, partition blocks, and so forth will be printed to standard out. It will also show the details of how a witness string is produced, if the witness option is turned on. Moreover, the witness string from the partitioning algorithm will be a relatively short string, but it is not guaranteed to be the absolute shortest possible string. If you run the program multiple times and look at the output, you may see varying results. To set this up, the main method from EquivalenceNlgNWitness.java needs to be executed. The executable jar file JFLAP_grade_dn.jar is set up to use the Grader.main() method by default. Therefore, if you want an executable jar, one way to set this up is to change the main class in the manifest: 1. Extract the contents of the jar (jar -xvf JFLAP_grade_dn.jar). 2. Create a Manifest.txt file formatted as follows: (a) For the merging equivalence-checking algorithm: Main-Class: equivalence.equivalencemergewitness Class-Path: JFLAP.jar (b) Alternatively, for the partitioning algorithm: Main-Class: equivalence.equivalencenlgnwitness Class-Path: JFLAP.jar 3. Build a new jar file, using a command such as this one to create a file named JFLAP_equiv_dn.jar. jar -cfm JFLAP_equiv_dn.jar Manifest.txt *.java equivalence/*.class gui/action/fawitnessaction.class gui/menu/menubarcreator*.class 4. Then if you have two automata in files nfa1.jff and nfa2.jff, the program can be run with a command like java -jar JFLAP_equiv_dn.jar nfa1.jff nfa2.jff true true where the first boolean turns on the witness, and the second turns on verbose mode. Either one (or both) can be set to false, if preferred. 5

6 Another alternative is to execute the class files directly, outside of the jar. Simply extract the JFLAP 6.4 jar (jar -xvf JFLAP.jar), then extract the grading tool jar on top of it (jar -xvf JFLAP_grade_dn.jar). (This will overwrite a couple of the class files from the original JFLAP jar file; see the description of the new and modified classes in the appendix of this User s Guide.) Now it is feasible to get verbose output via syntax such as: java equivalence.equivalencemergewitness nfa1.jff nfa2.jff true true... or java equivalence.equivalencenlgnwitness nfa1.jff nfa2.jff true true... or to grade files via: java equivalence.grader studentfile.jff answerkey.jff true 2.4 Information for the Instructor To make it easier to grade assignments, it is recommended that the instructor specify the exact JFLAP filename to be submitted for each problem. For example, if there are five questions, the student s files might be named using a convention like problem1.jff, problem2.jff,... problem5.jff. This allows grading to be automated. Note that a convention should also be established for the assignment so that students know whether to draw transitions to a dead (trap) state, or to completely leave these transitions out of the diagram. JFLAP itself allows missing transitions in its definition of DFAs. However, the alphabet used in the answer key.jff file must match the alphabet used in the student s submitted file. In some cases, a missing trap state may result in a missing alphabet symbol within the automaton. If the alphabets do not match, then the two automata cannot be compared automatically, and a message will indicate that equivalence cannot be tested due to differing alphabets. In this situation, the program will assume the automata are not equivalent. 2.5 Using this Program with try at RIT This section provides instructions on how to configure try to use the JFLAP automata grading program. 6

7 2.5.1 Submitting Assignments to be Graded Whenever an assignment is due, the instructor will need to set up a try project to accept submissions. Based on the setup, they should then tell the class exactly how to submit their assignment to try from the Unix command line. The account name, project name, and list of files must be provided. For example, suppose the instructor s account is called grading-acct. The assignment (project code) might be called jflap-submit. Perhaps it was a short assignment, and there were only two problems. If the names of the two corresponding JFLAP files were problem1.jff and problem2.jff, then the command to submit the assignment from the Unix command line would be: try grading-acct jflap-submit problem1.jff problem2.jff The output might be something like: Copying files...done Grading JFLAP assignment... Checking problem 1 The answer is correct! Checking problem 2 Incorrect: the string 00 is an example. You have successfully completed project jflap-submit! When an answer is wrong, the instructor may choose to display an example (here, 00), or to simply state that the answer is incorrect. The student may be able to fix the problem and then resubmit all of the files. Students should make sure that their filenames match the names that try is expecting, or the grading program will not be able to identify the files correctly. A Student s Guide to try provides additional troubleshooting tips. (See the Useful References below.) Setting Up try Projects in the Instructor s Unix Grading Account The following steps assume that the user is an instructor with a Unix account on a system where try has already been installed. (At RIT, professors typically have a special grading account so that try is isolated from their personal account. Refer to Reek s documentation for a discussion of the potential security issues.) First, an entry must be placed in a.tryrc file in the grading home directory to configure the try project. For example: 7

8 # This is a sample.tryrc file for a project # called jflap-submit, to grade JFLAP DFAs/NFAs. # The try directory is trydir, # and the project directory is projdir. Files from the # most recent submission are saved. jflap-submit trydir projdir save Note that the try directory should be created in the home directory, and then the project directory must exist in the try directory, so the path is: /home/account/trydir/projdir/. To enforce security, verify that the permissions on all files and directories follow the recommendations in the try documentation. Next, for try to work, a build or build_safe script is required to exist in the project directory. However, no compilation is necessary to grade the JFLAP.jff files. Therefore, simply create an empty build file (such as via the command touch build). Finally, the run script in the project directory will perform the actual grading. The JFLAP jar and grading jar will need to be available to the account and specified on the classpath. The instructor must also create the.jff answers to the assignment, and save them in an accessible location as well, such as in the project directory. Here is an example of a simple working run script: # This is a sample run file to grade JFLAP DFAs/NFAs # using the try system. # Based in part on samples in Kenneth A Reek s paper, # "The Try System." # The answer key consists of the instructor s files, # named solution1.jff, # solution2.jff, and solution3.jff, which are # JFLAP XML files representing # the desired automata. The student must submit corresponding # files named problem1.jff, problem2.jff, and problem3.jff. echo Grading JFLAP assignment... # Student files are placed in their working directory within # the try directory. This working directory is the current # directory while this script is running. # Instructor files should be located elsewhere, such as the # project directory. Put the grading jar and the standard # JFLAP 6.4 jar on the classpath. CLASSPATH=${CLASSPATH}:/home/stu13/s8/dan0337/tryDir/ projdir/jflap_grade_dn.jar: 8

9 /home/stu13/s8/dan0337/trydir/projdir/jflap.jar # For statistics on the answers correct=0 incorrect=0 submitted=0 missing=0 for T in do echo Checking problem $T # Comment out this call, which does not use Grader.java or # jar file. (The Manifest in the grading jar dictates main # class of Grader, but this call is a way to run the # algorithm with verbose output instead of grading.) # java../projdir/equivalence.equivalencenlgnwitness../projdir/solution$t.jff problem$t.jff true true # This gives the student a witness string as feedback # if the answer is wrong. # Change the "true" to "false" to omit the witness. java -jar../projdir/jflap_grade_dn.jar../projdir/solution$t.jff problem$t.jff true > out.$t # The out file will contain the student s result, unless # the.jff file(s) couldn t be read. # Show the student the result and track the grade. if [ -s out.$t ] then submitted= expr $submitted + 1 cat out.$t resultstatus= grep -c "The answer is correct" out.$t if [ $resultstatus -eq 1 ] then correct= expr $correct + 1 else incorrect= expr $incorrect + 1 fi else # Zero size on the out file means the program didn t # run successfully. echo Could not process or read file $T - did you use the right filename and submit it? missing= expr $missing + 1 9

10 fi done # try_log can only be executed once, so summarize the # results on one line. try_log JFLAP FAs correct $correct, incorrect $incorrect, submitted $submitted, missing $missing exit 0 This run script simply tracks the number of correct, incorrect, submitted, and missing files. The instructor could modify the script to assign a specific number of points to each problem, change file names, and so forth. In this example, the files from the latest submission will be stored in the working directory for the student (since save is indicated in.tryrc), and the log entry for this student might say: student-acct jflap-submit 08/10/12 16:59:16 Completed: JFLAP FAs correct 1, incorrect 1, submitted 2, missing 1 In this case, the student submitted one correct answer and one incorrect answer. Moreover, apparently the instructor was expecting a third file which the student was missing. With the current configuration in this example, the student can execute the try command again until everything is correct. 3 Useful References As a starting point if you are looking for more information: 1. Helpful reference information on JFLAP is available at the org site. This includes tutorials, software updates, and even a wiki. 2. The JFLAP manual may also be useful: Susan H. Rodger and Thomas W. Finley, JFLAP: An Interactive Formal Languages and Automata Package, Jones & Bartlett Publishers, Sudbury, MA, The try software, complete with manual and README doc, can be obtained on Kenneth Reek s Web page at: software.html. 4. His presentation paper and slides regarding try can be found at: http: // 10

11 5. A Student s Guide to try is located at Misc/try.html or It was originally written by Margaret M. Reek, and later updated by Trudy Howles. (Older versions may also exist on the RIT Web; the latest is version 2.8 from 2004.) 6. For additional background on the new grading tool, please refer to the author s M.S. project paper, Algorithms for Testing Equivalence of Finite Automata, with a Grading Tool for JFLAP. See the site: cs.rit.edu/~dan0337/. The appendix below may also be of interest to programmers. 4 Appendix: About the Program For those who are curious, here is a description of the code behind the grading tool. This program was written in Java, so it is cross-platform. As the original JFLAP 6.2 source code documentation indicates, Java versions 1.4 and 1.5 are required to compile and run the main JFLAP program. JFLAP 6.4 requires 1.5, and the additional features for the grading tool have been coded in Java version 1.5. This version allows for type checking on generics at compile time, prior to running the program. In an IDE such as Eclipse, which automatically builds the program as you write, this means errors can be found while you code. This kind of type-checking is an invaluable time-saver to the programmer, particularly when implementing and debugging complex algorithms (such as equivalence checkers) that involve numerous containers like vectors and HashSets, which can hold any type of Object whatsoever. The classes used for grading are all in the equivalence package. These include: EquivalenceWitness: An abstract class used for testing two JFLAP finite automata for equivalence. Contains useful methods for reading.jff files, setting options, getting output, etc. Superclass of the two equivalencechecking algorithms described next. EquivalenceNlgNWitness: This class uses the n lg n Hopcroft algorithm to compare two finite automata to determine if they recognize the same language. The deciding factor is whether or not the start states of the two automata can be distinguished from each other via partitioning. This particular implementation of the algorithm halts immediately if it finds at any point that the start states are distinguishable (meaning that the automata are not equivalent and do not recognize the same language). Moreover, the user can supply a boolean (true/false) to request extra feedback (or not). Specifically, if the automata are not equivalent and this boolean is set to true, the program provides the user with a witness string which is accepted by one automaton, but not by the other. This setting is good for 11

12 providing feedback to a student, but it requires more overhead (more time and space) than the basic algorithm. Refer to the project paper for details. To run the program from main(), the user must provide the names of the two files (automata) to compare, a boolean specifying whether or not to create a witness, and a boolean to turn verbose mode on or off (to dictate how much information is printed to standard out). Note that NFAs and automata with missing transitions are acceptable as input, as the class will convert them to complete DFAs prior to executing the equivalencechecking code. Subset construction will, of course, slow down the program, but to the average JFLAP user it will not have a noticeable impact. EquivalenceMergeWitness: Similar in purpose to the previous class; however, it uses a faster, near-linear merging algorithm by Hopcroft and Karp. This approach acts under the assumption that the start states are equivalent. Using the start states as the origin, the program systematically follows transitions, merging the states it encounters for the same input string, as they must be equivalent for the automata to be equivalent. If at any point an accepting state and a non-accepting state are merged, then the assumption that the start states are equivalent must be false, so the automata cannot be equivalent. The witness generated by this class is guaranteed to be one of the shortest possible, as a breadth-first search strategy is used. Note that even if the witness option is turned on, the run time for this particular algorithm still remains nearly linear. For more analysis, see the project paper. Grader: Essentially a wrapper around EquivalenceWitness to facilitate grading. It simply states whether a student s answer is correct or not, based on the instructor s.jff file. If the answer is incorrect, it can be set to provide a witness, if so desired, in order that the student can receive feedback and learn from their mistake. By default, EquivalenceMergeWitness is implemented, although the user can pass a parameter to the program to use EquivalenceNlgNWitness instead. StateAlphaPair: This class simply tracks a state paired with an alphabet symbol. Used in the other classes (for the transition function and its inverse). StatePair: For easy lookup from a Collection, this class contains two states. One state should come from each of the two automata being compared, in a consistent order. StateStateSymbol: A subclass of StatePair. Tracks an additional alphabet symbol which is associated with the states. StateDisjointSets: A class that stores states in sets which can be merged efficiently. The set containing a particular state can also be found quickly. Used in EquivalenceMergeWitness to allow near-linear time overall performance. (Implements the tree structure with heuristics as described by 12

13 Cormen, Leiserson, Rivest, and Stein, Introduction to Algorithms, 2nd ed., p. 508.) In addition, the algorithms needed to be available to be called by the JFLAP GUI. Therefore, a couple of classes were created and/or modified for the existing JFLAP program: gui.action.fawitnessaction: This class instantiates and runs the EquivalenceMergeWitness class described above. It will display a pop-up with the witness string if two FAs (finite automata) are not equivalent. Otherwise, it states that they are equivalent. gui.menu.menubarcreator: This is existing JFLAP code which displays the menu bar. A new menu option, Get Distinguishing String, was added to the menu in the gettestmenu() method. This calls the FAWitnessAction. Via the normal JFLAP GUI, users are able to select any two finite automata to compare. Additional files used for building the project: buildjar: A script used to create the jar easily from the Unix command line. Both the source files and compiled class files are included in the jar. The script consists of the single (one-line) command: jar -cfm JFLAP_grade_dn.jar Manifest.txt *.java equivalence/*.class gui/action/fawitnessaction.class gui/menu/menubarcreator*.class Manifest.txt: A text file which is used to create a manifest file for the jar. It specifies the main class to use when the jar is executed (the Grader class, although this can be changed to run one of the algorithms directly instead, as described earlier in this guide). It also puts the JFLAP.jar into the classpath for this jar. Here is what it looks like: 4.1 Copyright Main-Class: equivalence.grader Class-Path: JFLAP.jar Programmers are welcome to modify and reuse the code written by Daphne Norton for this project, as long at it is not sold for commercial purposes. Please be sure to acknowledge the author. The original JFLAP code is copyrighted as follows: 13

14 Susan H. Rodger, Thomas Finley Computer Science Department Duke University April 24, 2003 Supported by National Science Foundation DUE Copyright (c) 2003 All rights reserved. Redistribution and use in source and binary forms are permitted provided that the above copyright notice and this paragraph are duplicated in all such forms and that any documentation, advertising materials, and other materials related to such distribution and use acknowledge that the software was developed by the author. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 14

CS52 - Assignment 10

CS52 - Assignment 10 CS52 - Assignment 10 Due Wednesday 12/9 at 7:00pm https://xkcd.com/205/ Important Notice Assignments 9 and 10 are due at the same time. This is to give you maximum flexibility in scheduling during the

More information

CSE Theory of Computing Spring 2018 Project 2-Finite Automata

CSE Theory of Computing Spring 2018 Project 2-Finite Automata CSE 30151 Theory of Computing Spring 2018 Project 2-Finite Automata Version 1 Contents 1 Overview 2 2 Valid Options 2 2.1 Project Options.................................. 2 2.2 Platform Options.................................

More information

LLparse and LRparse: Visual and Interactive Tools for Parsing

LLparse and LRparse: Visual and Interactive Tools for Parsing LLparse and LRparse: Visual and Interactive Tools for Parsing Stephen A. Blythe, Michael C. James, and Susan H. Rodger 1 Department of Computer Science Rensselaer Polytechnic Institute Troy, NY 12180-3590

More information

CSE Theory of Computing Spring 2018 Project 2-Finite Automata

CSE Theory of Computing Spring 2018 Project 2-Finite Automata CSE 30151 Theory of Computing Spring 2018 Project 2-Finite Automata Version 2 Contents 1 Overview 2 1.1 Updates................................................ 2 2 Valid Options 2 2.1 Project Options............................................

More information

CSE Theory of Computing Fall 2017 Project 2-Finite Automata

CSE Theory of Computing Fall 2017 Project 2-Finite Automata CSE 30151 Theory of Computing Fall 2017 Project 2-Finite Automata Version 1: Sept. 27, 2017 1 Overview The goal of this project is to have each student understand at a deep level the functioning of a finite

More information

Decidable Problems. We examine the problems for which there is an algorithm.

Decidable Problems. We examine the problems for which there is an algorithm. Decidable Problems We examine the problems for which there is an algorithm. Decidable Problems A problem asks a yes/no question about some input. The problem is decidable if there is a program that always

More information

Turning Automata Theory into a Hands-on Course

Turning Automata Theory into a Hands-on Course Turning Automata Theory into a Hands-on Course Susan H. Rodger Bart Bressler Computer Science Computer Science Duke University Duke University Durham, NC 27708 Durham, NC 27708 rodger@cs.duke.edu Thomas

More information

1. (10 points) Draw the state diagram of the DFA that recognizes the language over Σ = {0, 1}

1. (10 points) Draw the state diagram of the DFA that recognizes the language over Σ = {0, 1} CSE 5 Homework 2 Due: Monday October 6, 27 Instructions Upload a single file to Gradescope for each group. should be on each page of the submission. All group members names and PIDs Your assignments in

More information

Programming Standards: You must conform to good programming/documentation standards. Some specifics:

Programming Standards: You must conform to good programming/documentation standards. Some specifics: CS3114 (Spring 2011) PROGRAMMING ASSIGNMENT #3 Due Thursday, April 7 @ 11:00 PM for 100 points Early bonus date: Wednesday, April 6 @ 11:00 PM for a 10 point bonus Initial Schedule due Thursday, March

More information

Converting a DFA to a Regular Expression JP

Converting a DFA to a Regular Expression JP Converting a DFA to a Regular Expression JP Prerequisite knowledge: Regular Languages Deterministic Finite Automata Nondeterministic Finite Automata Regular Expressions Conversion of Regular Expression

More information

Implementation of Lexical Analysis. Lecture 4

Implementation of Lexical Analysis. Lecture 4 Implementation of Lexical Analysis Lecture 4 1 Tips on Building Large Systems KISS (Keep It Simple, Stupid!) Don t optimize prematurely Design systems that can be tested It is easier to modify a working

More information

Neha 1, Abhishek Sharma 2 1 M.Tech, 2 Assistant Professor. Department of Cse, Shri Balwant College of Engineering &Technology, Dcrust University

Neha 1, Abhishek Sharma 2 1 M.Tech, 2 Assistant Professor. Department of Cse, Shri Balwant College of Engineering &Technology, Dcrust University Methods of Regular Expression Neha 1, Abhishek Sharma 2 1 M.Tech, 2 Assistant Professor Department of Cse, Shri Balwant College of Engineering &Technology, Dcrust University Abstract - Regular expressions

More information

A Visual and Interactive Automata Theory Course with JFLAP 4.0

A Visual and Interactive Automata Theory Course with JFLAP 4.0 A Visual and Interactive Automata Theory Course with JFLAP 4.0 Ryan Cavalcante Duke University Durham, NC 27708-0129 Thomas Finley Cornell University Ithaca, NY 14853-7501 Susan Rodger Duke University

More information

Assignment Manager. Change Edit Mode to On if it is not already by clicking on the option at the top right of the window.

Assignment Manager. Change Edit Mode to On if it is not already by clicking on the option at the top right of the window. Assignment Manager Blackboard has a tool called the Assignment Manager that facilitates file submissions from students. The Assignment Manager feature can be used in any content area (e.g. Course Information,

More information

Last lecture CMSC330. This lecture. Finite Automata: States. Finite Automata. Implementing Regular Expressions. Languages. Regular expressions

Last lecture CMSC330. This lecture. Finite Automata: States. Finite Automata. Implementing Regular Expressions. Languages. Regular expressions Last lecture CMSC330 Finite Automata Languages Sets of strings Operations on languages Regular expressions Constants Operators Precedence 1 2 Finite automata States Transitions Examples Types This lecture

More information

Com S 227 Assignment Submission HOWTO

Com S 227 Assignment Submission HOWTO Com S 227 Assignment Submission HOWTO This document provides detailed instructions on: 1. How to submit an assignment via Canvas and check it 3. How to examine the contents of a zip file 3. How to create

More information

Limitations of Algorithmic Solvability In this Chapter we investigate the power of algorithms to solve problems Some can be solved algorithmically and

Limitations of Algorithmic Solvability In this Chapter we investigate the power of algorithms to solve problems Some can be solved algorithmically and Computer Language Theory Chapter 4: Decidability 1 Limitations of Algorithmic Solvability In this Chapter we investigate the power of algorithms to solve problems Some can be solved algorithmically and

More information

Comparing and Contrasting different Approaches of Code Generator(Enum,Map-Like,If-else,Graph)

Comparing and Contrasting different Approaches of Code Generator(Enum,Map-Like,If-else,Graph) Comparing and Contrasting different Approaches of Generator(Enum,Map-Like,If-else,Graph) Vivek Tripathi 1 Sandeep kumar Gonnade 2 Mtech Scholar 1 Asst.Professor 2 Department of Computer Science & Engineering,

More information

An Interactive Approach to Formal Languages and Automata with JFLAP

An Interactive Approach to Formal Languages and Automata with JFLAP An Interactive Approach to Formal Languages and Automata with JFLAP Susan H. Rodger Duke University NSF CCLI Showcase March 9, 2007 Supported by NSF Grant DUE 0442513. Outline Overview of JFLAP Examples

More information

CSE Theory of Computing Fall 2017 Project 3: K-tape Turing Machine

CSE Theory of Computing Fall 2017 Project 3: K-tape Turing Machine CSE 30151 Theory of Computing Fall 2017 Project 3: K-tape Turing Machine Version 1: Oct. 23, 2017 1 Overview The goal of this project is to have each student understand at a deep level the functioning

More information

Theory of Computation Dr. Weiss Extra Practice Exam Solutions

Theory of Computation Dr. Weiss Extra Practice Exam Solutions Name: of 7 Theory of Computation Dr. Weiss Extra Practice Exam Solutions Directions: Answer the questions as well as you can. Partial credit will be given, so show your work where appropriate. Try to be

More information

Make sure you have the latest Hive trunk by running svn up in your Hive directory. More detailed instructions on downloading and setting up

Make sure you have the latest Hive trunk by running svn up in your Hive directory. More detailed instructions on downloading and setting up GenericUDAFCaseStudy Writing GenericUDAFs: A Tutorial User-Defined Aggregation Functions (UDAFs) are an excellent way to integrate advanced data-processing into Hive. Hive allows two varieties of UDAFs:

More information

EMC Documentum Composer

EMC Documentum Composer EMC Documentum Composer Version 6.0 SP1.5 User Guide P/N 300 005 253 A02 EMC Corporation Corporate Headquarters: Hopkinton, MA 01748 9103 1 508 435 1000 www.emc.com Copyright 2008 EMC Corporation. All

More information

Finite automata. We have looked at using Lex to build a scanner on the basis of regular expressions.

Finite automata. We have looked at using Lex to build a scanner on the basis of regular expressions. Finite automata We have looked at using Lex to build a scanner on the basis of regular expressions. Now we begin to consider the results from automata theory that make Lex possible. Recall: An alphabet

More information

Due: February 26, 2014, 7.30 PM

Due: February 26, 2014, 7.30 PM Jackson State University Department of Computer Science CSC 438-01/539-01 Systems and Software Security, Spring 2014 Instructor: Dr. Natarajan Meghanathan Project 1: Exploring UNIX Access Control in a

More information

CS3114 (Fall 2013) PROGRAMMING ASSIGNMENT #2 Due Tuesday, October 11:00 PM for 100 points Due Monday, October 11:00 PM for 10 point bonus

CS3114 (Fall 2013) PROGRAMMING ASSIGNMENT #2 Due Tuesday, October 11:00 PM for 100 points Due Monday, October 11:00 PM for 10 point bonus CS3114 (Fall 2013) PROGRAMMING ASSIGNMENT #2 Due Tuesday, October 15 @ 11:00 PM for 100 points Due Monday, October 14 @ 11:00 PM for 10 point bonus Updated: 10/10/2013 Assignment: This project continues

More information

Lexical Error Recovery

Lexical Error Recovery Lexical Error Recovery A character sequence that can t be scanned into any valid token is a lexical error. Lexical errors are uncommon, but they still must be handled by a scanner. We won t stop compilation

More information

EMC Documentum Composer

EMC Documentum Composer EMC Documentum Composer Version 6.5 SP2 User Guide P/N 300-009-462 A01 EMC Corporation Corporate Headquarters: Hopkinton, MA 01748-9103 1-508-435-1000 www.emc.com Copyright 2008 2009 EMC Corporation. All

More information

CS2 Practical 2 CS2Ah

CS2 Practical 2 CS2Ah CS2 Practical 2 Finite automata This practical is based on material in the language processing thread. The practical is made up of two parts. Part A consists of four paper and pencil exercises, designed

More information

1. [5 points each] True or False. If the question is currently open, write O or Open.

1. [5 points each] True or False. If the question is currently open, write O or Open. University of Nevada, Las Vegas Computer Science 456/656 Spring 2018 Practice for the Final on May 9, 2018 The entire examination is 775 points. The real final will be much shorter. Name: No books, notes,

More information

Type Checking and Type Equality

Type Checking and Type Equality Type Checking and Type Equality Type systems are the biggest point of variation across programming languages. Even languages that look similar are often greatly different when it comes to their type systems.

More information

CSE 5317 Midterm Examination 4 March Solutions

CSE 5317 Midterm Examination 4 March Solutions CSE 5317 Midterm Examination 4 March 2010 1. / [20 pts] Solutions (parts a j; -1 point for each wrong answer, 0 points for each blank answer, 2 point for each correct answer. Therefore, the score for this

More information

Introduction to MATLAB

Introduction to MATLAB Introduction to MATLAB This note will introduce you to MATLAB for the purposes of this course. Most of the emphasis is on how to set up MATLAB on your computer. The purposes of this supplement are two.

More information

VISUALIZING NP-COMPLETENESS THROUGH CIRCUIT-BASED WIDGETS

VISUALIZING NP-COMPLETENESS THROUGH CIRCUIT-BASED WIDGETS University of Portland Pilot Scholars Engineering Faculty Publications and Presentations Shiley School of Engineering 2016 VISUALIZING NP-COMPLETENESS THROUGH CIRCUIT-BASED WIDGETS Steven R. Vegdahl University

More information

Essentials for Scientific Computing: Bash Shell Scripting Day 3

Essentials for Scientific Computing: Bash Shell Scripting Day 3 Essentials for Scientific Computing: Bash Shell Scripting Day 3 Ershaad Ahamed TUE-CMS, JNCASR May 2012 1 Introduction In the previous sessions, you have been using basic commands in the shell. The bash

More information

CMPSCI 250: Introduction to Computation. Lecture 20: Deterministic and Nondeterministic Finite Automata David Mix Barrington 16 April 2013

CMPSCI 250: Introduction to Computation. Lecture 20: Deterministic and Nondeterministic Finite Automata David Mix Barrington 16 April 2013 CMPSCI 250: Introduction to Computation Lecture 20: Deterministic and Nondeterministic Finite Automata David Mix Barrington 16 April 2013 Deterministic and Nondeterministic Finite Automata Deterministic

More information

CSCI 2132 Software Development. Lecture 7: Wildcards and Regular Expressions

CSCI 2132 Software Development. Lecture 7: Wildcards and Regular Expressions CSCI 2132 Software Development Lecture 7: Wildcards and Regular Expressions Instructor: Vlado Keselj Faculty of Computer Science Dalhousie University 20-Sep-2017 (7) CSCI 2132 1 Previous Lecture Pipes

More information

Optimizing Finite Automata

Optimizing Finite Automata Optimizing Finite Automata We can improve the DFA created by MakeDeterministic. Sometimes a DFA will have more states than necessary. For every DFA there is a unique smallest equivalent DFA (fewest states

More information

Soda Machine Laboratory

Soda Machine Laboratory Soda Machine Laboratory Introduction This laboratory is intended to give you experience working with multiple queue structures in a familiar real-world setting. The given application models a soda machine

More information

Title of Resource The Syntax Window for SPSS 22.0: Assignment and Grading Rubric Kimberly A. Barchard. Author(s)

Title of Resource The Syntax Window for SPSS 22.0: Assignment and Grading Rubric Kimberly A. Barchard. Author(s) Title of Resource The Syntax Window for SPSS 22.0: Assignment and Grading Rubric Kimberly A. Barchard Author(s) Leiszle Lapping-Carr Institution University of Nevada, Las Vegas Students learn to create

More information

CS103 Handout 13 Fall 2012 May 4, 2012 Problem Set 5

CS103 Handout 13 Fall 2012 May 4, 2012 Problem Set 5 CS103 Handout 13 Fall 2012 May 4, 2012 Problem Set 5 This fifth problem set explores the regular languages, their properties, and their limits. This will be your first foray into computability theory,

More information

Announcements! P1 part 1 due next Tuesday P1 part 2 due next Friday

Announcements! P1 part 1 due next Tuesday P1 part 2 due next Friday Announcements! P1 part 1 due next Tuesday P1 part 2 due next Friday 1 Finite-state machines CS 536 Last time! A compiler is a recognizer of language S (Source) a translator from S to T (Target) a program

More information

CMPSCI 187 / Spring 2015 Postfix Expression Evaluator

CMPSCI 187 / Spring 2015 Postfix Expression Evaluator CMPSCI 187 / Spring 2015 Postfix Expression Evaluator Due on Thursday, 05 March, 8:30 a.m. Marc Liberatore and John Ridgway Morrill I N375 Section 01 @ 10:00 Section 02 @ 08:30 1 CMPSCI 187 / Spring 2015

More information

Lecture 2 Finite Automata

Lecture 2 Finite Automata Lecture 2 Finite Automata August 31, 2007 This lecture is intended as a kind of road map to Chapter 1 of the text just the informal examples that I ll present to motivate the ideas. 1 Expressions without

More information

Alternation. Kleene Closure. Definition of Regular Expressions

Alternation. Kleene Closure. Definition of Regular Expressions Alternation Small finite sets are conveniently represented by listing their elements. Parentheses delimit expressions, and, the alternation operator, separates alternatives. For example, D, the set of

More information

CS61BL Summer 2013 Midterm 2

CS61BL Summer 2013 Midterm 2 CS61BL Summer 2013 Midterm 2 Sample Solutions + Common Mistakes Question 0: Each of the following cost you.5 on this problem: you earned some credit on a problem and did not put your five digit on the

More information

Assignment Submission HOWTO

Assignment Submission HOWTO Assignment Submission HOWTO This document provides detailed instructions on: 1. How to submit an assignment via Blackboard 2. How to create a zip file and check its contents 3. How to make file extensions

More information

CSE 401 Midterm Exam Sample Solution 2/11/15

CSE 401 Midterm Exam Sample Solution 2/11/15 Question 1. (10 points) Regular expression warmup. For regular expression questions, you must restrict yourself to the basic regular expression operations covered in class and on homework assignments:

More information

Lexical Analysis - 2

Lexical Analysis - 2 Lexical Analysis - 2 More regular expressions Finite Automata NFAs and DFAs Scanners JLex - a scanner generator 1 Regular Expressions in JLex Symbol - Meaning. Matches a single character (not newline)

More information

Handout 4: Version Control Reference

Handout 4: Version Control Reference CSCI 2600 Principles of Software Handout 4: Version Control Reference Introduction SVN (Subversion) provides the following functionality: It allows multiple users to edit the same files independently,

More information

14.1 Encoding for different models of computation

14.1 Encoding for different models of computation Lecture 14 Decidable languages In the previous lecture we discussed some examples of encoding schemes, through which various objects can be represented by strings over a given alphabet. We will begin this

More information

MARS AREA SCHOOL DISTRICT Curriculum TECHNOLOGY EDUCATION

MARS AREA SCHOOL DISTRICT Curriculum TECHNOLOGY EDUCATION Course Title: Java Technologies Grades: 10-12 Prepared by: Rob Case Course Unit: What is Java? Learn about the history of Java. Learn about compilation & Syntax. Discuss the principles of Java. Discuss

More information

The Java Type System (continued)

The Java Type System (continued) Object-Oriented Design Lecture 5 CSU 370 Fall 2007 (Pucella) Friday, Sep 21, 2007 The Java Type System (continued) The Object Class All classes subclass the Object class. (By default, this is the superclass

More information

Part III Appendices 165

Part III Appendices 165 Part III Appendices 165 Appendix A Technical Instructions Learning Outcomes This material will help you learn how to use the software you need to do your work in this course. You won t be tested on it.

More information

CS 536 Introduction to Programming Languages and Compilers Charles N. Fischer Lecture 5

CS 536 Introduction to Programming Languages and Compilers Charles N. Fischer Lecture 5 CS 536 Introduction to Programming Languages and Compilers Charles N. Fischer Lecture 5 CS 536 Spring 2015 1 Multi Character Lookahead We may allow finite automata to look beyond the next input character.

More information

What you need to know about Java and JetTrac Licensing

What you need to know about Java and JetTrac Licensing What you need to know about Java and JetTrac Licensing This document is designed to get you up to speed on the multi-platform nature of the JetTrac Products, and the licensing system that protects them

More information

Implementation of Lexical Analysis

Implementation of Lexical Analysis Implementation of Lexical Analysis Lecture 4 (Modified by Professor Vijay Ganesh) Tips on Building Large Systems KISS (Keep It Simple, Stupid!) Don t optimize prematurely Design systems that can be tested

More information

Chapter 3: Lexing and Parsing

Chapter 3: Lexing and Parsing Chapter 3: Lexing and Parsing Aarne Ranta Slides for the book Implementing Programming Languages. An Introduction to Compilers and Interpreters, College Publications, 2012. Lexing and Parsing* Deeper understanding

More information

lec3:nondeterministic finite state automata

lec3:nondeterministic finite state automata lec3:nondeterministic finite state automata 1 1.introduction Nondeterminism is a useful concept that has great impact on the theory of computation. When the machine is in a given state and reads the next

More information

Lab 1 Implementing a Simon Says Game

Lab 1 Implementing a Simon Says Game ECE2049 Embedded Computing in Engineering Design Lab 1 Implementing a Simon Says Game In the late 1970s and early 1980s, one of the first and most popular electronic games was Simon by Milton Bradley.

More information

Important Project Dates

Important Project Dates Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Spring 2010 Handout Project Overview Tuesday, Feb 2 This is an overview of the course project and

More information

Code::Blocks Student Manual

Code::Blocks Student Manual Code::Blocks Student Manual Lawrence Goetz, Network Administrator Yedidyah Langsam, Professor and Theodore Raphan, Distinguished Professor Dept. of Computer and Information Science Brooklyn College of

More information

Homework 4: Hash Tables Due: 5:00 PM, Mar 9, 2018

Homework 4: Hash Tables Due: 5:00 PM, Mar 9, 2018 CS18 Integrated Introduction to Computer Science Fisler, Nelson Contents Homework 4: Hash Tables Due: 5:00 PM, Mar 9, 2018 1 DIY Grep 2 2 Chaining Hash Tables 4 3 Hash Table Iterator 5 Objectives By the

More information

CS 374 Fall 2014 Homework 2 Due Tuesday, September 16, 2014 at noon

CS 374 Fall 2014 Homework 2 Due Tuesday, September 16, 2014 at noon CS 374 Fall 2014 Homework 2 Due Tuesday, September 16, 2014 at noon Groups of up to three students may submit common solutions for each problem in this homework and in all future homeworks You are responsible

More information

COMP 105 Homework: Type Systems

COMP 105 Homework: Type Systems Due Tuesday, March 29, at 11:59 PM (updated) The purpose of this assignment is to help you learn about type systems. Setup Make a clone of the book code: git clone linux.cs.tufts.edu:/comp/105/build-prove-compare

More information

ANIMATING THE CONVERSION OF NONDETERMINISTIC FINITE STATE AUTOMATA TO DETERMINISTIC FINITE STATE AUTOMATA. William Patrick Merryman

ANIMATING THE CONVERSION OF NONDETERMINISTIC FINITE STATE AUTOMATA TO DETERMINISTIC FINITE STATE AUTOMATA. William Patrick Merryman ANIMATING THE CONVERSION OF NONDETERMINISTIC FINITE STATE AUTOMATA TO DETERMINISTIC FINITE STATE AUTOMATA by William Patrick Merryman A thesis submitted in partial fulfillment of the requirements for the

More information

CS415 Compilers. Lexical Analysis

CS415 Compilers. Lexical Analysis CS415 Compilers Lexical Analysis These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University Lecture 7 1 Announcements First project and second homework

More information

Theory of Programming Languages COMP360

Theory of Programming Languages COMP360 Theory of Programming Languages COMP360 Sometimes it is the people no one imagines anything of, who do the things that no one can imagine Alan Turing What can be computed? Before people even built computers,

More information

CS211 Computers and Programming Matthew Harris and Alexa Sharp July 9, Boggle

CS211 Computers and Programming Matthew Harris and Alexa Sharp July 9, Boggle Boggle If you are not familiar with the game Boggle, the game is played with 16 dice that have letters on all faces. The dice are randomly deposited into a four-by-four grid so that the players see the

More information

Multi-Project Workspace

Multi-Project Workspace Multi-Project Workspace Manage multiple projects within BlueJ Version 2008.06.25 by Manuel Haim C o n t e n t s Preface... 3 Software requirements... 4 Software used for developing / testing... 4 License...

More information

Title of Resource Introduction to SPSS 22.0: Assignment and Grading Rubric Kimberly A. Barchard. Author(s)

Title of Resource Introduction to SPSS 22.0: Assignment and Grading Rubric Kimberly A. Barchard. Author(s) Title of Resource Introduction to SPSS 22.0: Assignment and Grading Rubric Kimberly A. Barchard Author(s) Leiszle Lapping-Carr Institution University of Nevada, Las Vegas Students learn the basics of SPSS,

More information

Testing Exceptions with Enforcer

Testing Exceptions with Enforcer Testing Exceptions with Enforcer Cyrille Artho February 23, 2010 National Institute of Advanced Industrial Science and Technology (AIST), Research Center for Information Security (RCIS) Abstract Java library

More information

CS 2110 Summer 2011: Assignment 2 Boggle

CS 2110 Summer 2011: Assignment 2 Boggle CS 2110 Summer 2011: Assignment 2 Boggle Due July 12 at 5pm This assignment is to be done in pairs. Information about partners will be provided separately. 1 Playing Boggle 1 In this assignment, we continue

More information

J A D E Te s t S u i t e

J A D E Te s t S u i t e J A D E Te s t S u i t e USER GUIDE Last update: 12-January-2005 JADE3.4 Authors: Elisabetta Cortese (TILAB) Giovanni Caire (TILAB) Rosalba Bochicchio (TILAB) JADE - Java Agent DEvelopment Framework is

More information

Code::Blocks Student Manual

Code::Blocks Student Manual Code::Blocks Student Manual Lawrence Goetz, Network Administrator Yedidyah Langsam, Professor and Theodore Raphan, Distinguished Professor Dept. of Computer and Information Science Brooklyn College of

More information

CS Lecture 2. The Front End. Lecture 2 Lexical Analysis

CS Lecture 2. The Front End. Lecture 2 Lexical Analysis CS 1622 Lecture 2 Lexical Analysis CS 1622 Lecture 2 1 Lecture 2 Review of last lecture and finish up overview The first compiler phase: lexical analysis Reading: Chapter 2 in text (by 1/18) CS 1622 Lecture

More information

Introduction to Computation and Problem Solving

Introduction to Computation and Problem Solving Class 3: The Eclipse IDE Introduction to Computation and Problem Solving Prof. Steven R. Lerman and Dr. V. Judson Harward What is an IDE? An integrated development environment (IDE) is an environment in

More information

Lexical Analysis. Finite Automata. (Part 2 of 2)

Lexical Analysis. Finite Automata. (Part 2 of 2) # Lexical Analysis Finite Automata (Part 2 of 2) PA0, PA Although we have included the tricky file ends without a newline testcases in previous years, students made good cases against them (e.g., they

More information

University of Nevada, Las Vegas Computer Science 456/656 Fall 2016

University of Nevada, Las Vegas Computer Science 456/656 Fall 2016 University of Nevada, Las Vegas Computer Science 456/656 Fall 2016 The entire examination is 925 points. The real final will be much shorter. Name: No books, notes, scratch paper, or calculators. Use pen

More information

CS2 Language Processing note 3

CS2 Language Processing note 3 CS2 Language Processing note 3 CS2Ah 5..4 CS2 Language Processing note 3 Nondeterministic finite automata In this lecture we look at nondeterministic finite automata and prove the Conversion Theorem, which

More information

ASSIGNMENT 5 Data Structures, Files, Exceptions, and To-Do Lists

ASSIGNMENT 5 Data Structures, Files, Exceptions, and To-Do Lists ASSIGNMENT 5 Data Structures, Files, Exceptions, and To-Do Lists COMP-202B, Winter 2009, All Sections Due: Tuesday, April 14, 2009 (23:55) You MUST do this assignment individually and, unless otherwise

More information

Lexical Analysis. Implementation: Finite Automata

Lexical Analysis. Implementation: Finite Automata Lexical Analysis Implementation: Finite Automata Outline Specifying lexical structure using regular expressions Finite automata Deterministic Finite Automata (DFAs) Non-deterministic Finite Automata (NFAs)

More information

Important Project Dates

Important Project Dates Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Fall 2002 Handout 4 Project Overview Wednesday, September 4 This is an overview of the course project

More information

Lexical Error Recovery

Lexical Error Recovery Lexical Error Recovery A character sequence that can t be scanned into any valid token is a lexical error. Lexical errors are uncommon, but they still must be handled by a scanner. We won t stop compilation

More information

CS103 Handout 14 Winter February 8, 2013 Problem Set 5

CS103 Handout 14 Winter February 8, 2013 Problem Set 5 CS103 Handout 14 Winter 2012-2013 February 8, 2013 Problem Set 5 This fifth problem set explores the regular languages, their properties, and their limits. This will be your first foray into computability

More information

This course supports the assessment for Scripting and Programming Applications. The course covers 4 competencies and represents 4 competency units.

This course supports the assessment for Scripting and Programming Applications. The course covers 4 competencies and represents 4 competency units. This course supports the assessment for Scripting and Programming Applications. The course covers 4 competencies and represents 4 competency units. Introduction Overview Advancements in technology are

More information

Workbook for C++ THIRD EDITION. Yedidyah Langsam, Ph.D. Brooklyn College of the City University of New York. Custom Publishing

Workbook for C++ THIRD EDITION. Yedidyah Langsam, Ph.D. Brooklyn College of the City University of New York. Custom Publishing 9200134_CH00_FM_pi-viii.qxd 6/23/09 3:08 AM Page i Workbook for C++ THIRD EDITION Yedidyah Langsam, Ph.D. Brooklyn College of the City University of New York Custom Publishing New York Boston San Francisco

More information

COMP251: Algorithms and Data Structures. Jérôme Waldispühl School of Computer Science McGill University

COMP251: Algorithms and Data Structures. Jérôme Waldispühl School of Computer Science McGill University COMP251: Algorithms and Data Structures Jérôme Waldispühl School of Computer Science McGill University About Me Jérôme Waldispühl Associate Professor of Computer Science I am conducting research in Bioinformatics

More information

New York University Computer Science Department Courant Institute of Mathematical Sciences

New York University Computer Science Department Courant Institute of Mathematical Sciences New York University Computer Science Department Courant Institute of Mathematical Sciences Course Title: Data Communications & Networks Course Number: CSCI-GA.2662-001 Instructor: Jean-Claude Franchitti

More information

Program 1: Generating Summation Puzzles

Program 1: Generating Summation Puzzles Program 1: Generating Summation Puzzles Owen Kaser October 3, 2015 Due: 15 October 2015, end of class. 1 Introduction Textbook section 5.3.3 gives pseudocode to solve a given summation puzzle. We want

More information

CS 201 Advanced Object-Oriented Programming Lab 4 - Asteroids, Part 2 Due: February 24/25, 11:30 PM

CS 201 Advanced Object-Oriented Programming Lab 4 - Asteroids, Part 2 Due: February 24/25, 11:30 PM CS 201 Advanced Object-Oriented Programming Lab 4 - Asteroids, Part 2 Due: February 24/25, 11:30 PM Introduction to the Assignment In this lab, you will complete the Asteroids program that you started

More information

Implementation of Lexical Analysis

Implementation of Lexical Analysis Implementation of Lexical Analysis Outline Specifying lexical structure using regular expressions Finite automata Deterministic Finite Automata (DFAs) Non-deterministic Finite Automata (NFAs) Implementation

More information

6.001 Notes: Section 8.1

6.001 Notes: Section 8.1 6.001 Notes: Section 8.1 Slide 8.1.1 In this lecture we are going to introduce a new data type, specifically to deal with symbols. This may sound a bit odd, but if you step back, you may realize that everything

More information

CS2112 Fall Assignment 4 Parsing and Fault Injection. Due: March 18, 2014 Overview draft due: March 14, 2014

CS2112 Fall Assignment 4 Parsing and Fault Injection. Due: March 18, 2014 Overview draft due: March 14, 2014 CS2112 Fall 2014 Assignment 4 Parsing and Fault Injection Due: March 18, 2014 Overview draft due: March 14, 2014 Compilers and bug-finding systems operate on source code to produce compiled code and lists

More information

CSE450. Translation of Programming Languages. Lecture 20: Automata and Regular Expressions

CSE450. Translation of Programming Languages. Lecture 20: Automata and Regular Expressions CSE45 Translation of Programming Languages Lecture 2: Automata and Regular Expressions Finite Automata Regular Expression = Specification Finite Automata = Implementation A finite automaton consists of:

More information

MOODLE MANUAL TABLE OF CONTENTS

MOODLE MANUAL TABLE OF CONTENTS 1 MOODLE MANUAL TABLE OF CONTENTS Introduction to Moodle...1 Logging In... 2 Moodle Icons...6 Course Layout and Blocks...8 Changing Your Profile...10 Create new Course...12 Editing Your Course...15 Adding

More information

CSEP 501 Compilers. Languages, Automata, Regular Expressions & Scanners Hal Perkins Winter /8/ Hal Perkins & UW CSE B-1

CSEP 501 Compilers. Languages, Automata, Regular Expressions & Scanners Hal Perkins Winter /8/ Hal Perkins & UW CSE B-1 CSEP 501 Compilers Languages, Automata, Regular Expressions & Scanners Hal Perkins Winter 2008 1/8/2008 2002-08 Hal Perkins & UW CSE B-1 Agenda Basic concepts of formal grammars (review) Regular expressions

More information

Javac and Eclipse tutorial

Javac and Eclipse tutorial Javac and Eclipse tutorial Author: Balázs Simon, BME IIT, 2013. Contents 1 Introduction... 2 2 JRE and JDK... 2 3 Java and Javac... 2 4 Environment variables... 3 4.1 Setting the environment variables

More information

ICOM 4015 Advanced Programming Laboratory. Chapter 1 Introduction to Eclipse, Java and JUnit

ICOM 4015 Advanced Programming Laboratory. Chapter 1 Introduction to Eclipse, Java and JUnit ICOM 4015 Advanced Programming Laboratory Chapter 1 Introduction to Eclipse, Java and JUnit University of Puerto Rico Electrical and Computer Engineering Department by Juan E. Surís 1 Introduction This

More information

FASharpSim: A Software Simulator for Deterministic and Nondeterministic Finite Automata

FASharpSim: A Software Simulator for Deterministic and Nondeterministic Finite Automata Journal of Electrical Engineering, Electronics, Control and Computer Science JEEECCS, Volume 2, Issue 4, pages 13-20, 2016 FASharpSim: A Software Simulator for Deterministic and Nondeterministic Finite

More information