timer Asked: May 1st, 2020

Question Description

To design and implement a standard Turing Machine that simulates simple stack

operations.Below attached files have more information.

Unformatted Attachment Preview

Term Project San José State University CS 154: Formal Languages and Computability Spring 2020 Ahmad Yazdankhah Department of Computer Science "A good developer always reads the requirements at least 10 times! Ahmad Y" Objective To design and implement a standard Turing Machine that simulates simple stack operations. Project Description You are going to design and implement a TM whose input string is a very simple assembly language for operating on a Stack and finally showing the contents of the stack. Stack's Characteristic 1. It has two instructions Push and Pop. 2. It pushes one symbol per instruction. 3. It pops one symbol per instruction. 4. It has Γ = {Z, a, b}. Assembly Language Instructions Instruction Explanation Hx Push x 'H' is the last char of push Valid values for x are: a, b, Z Px Pop x 'P' is the last char of pop Valid values for x are: a, b, Z © Ahmad Yazdankhah SJSU, Department of Computer Science CS 154: Formal Languages and Computability Spring 2020 Examples The following table shows examples of input string of your TM and the expected output when machine halts. This output is the contents of the stack. Input String Expected Output of TM / Explanation HaHbHb bbaZ HaHbPb aZ HbHaHbHbHbPbPb babZ PZHaHbPb a Z Pa (Means the input is λ.) Since the top of the stack is Z when you start the machine, therefore, this is illegal instruction and machine just stops and it can show anything! Please refer to my lecture notes and/or JFLAP's documents for how JFLAP shows outputs. TM's Characteristics 1. Σ = {H, P, Z, a, b} 2. The Γ contains all symbols of Σ plus those symbols that you use in your design and are transparent to your users. 3. It is a single-tape TM. Multi-Tape TMs in JFLAP is buggy. Technical Notes 1. We assume that the input string of TM is 100% correct. Therefore, your TM is not supposed to have any error detection and/or error reporting. 2. If the input string is incorrect, for example Hc, or Sp, etc., the machine just stops and it can show anything! 3. You might use "block" feature of JFLAP (optional but recommended). This feature is located in "Turing Machine with Building Blocks" button of JFLAP. 4. Your TM is going to be run in transducer mode. 2 What You Submit 1. Design and test your program by the provided JFLAP in Canvas. Note that your final submission is only one file. 2. Save it as: First_Name.Last_Name.List_Num.jff If your first or last name has more than one part, hyphenate them and don't use underscore. (e.g.: ahmad.yazdan-khah.1.jff) Also note that my fake list number is written as '1', not '01'. 3. Upload it in Canvas before the due date. Rubrics • I'll test your design with 20 test cases like the provided examples and you'll get +10 for every success pass (200 points total). • If your code is invalid (e.g. there is no initial state, it is implemented by JFLAP 7.0, JFLAP 8, etc.) you'll get zero but you'd have chance to resubmit it with 20% penalty. • You'll get -10 for wrong filename! • Note that if you resubmit your project several times, Canvas adds a number at the end of your file name. I won't consider that number as the file name. JFLAP Notes 1. Before implementing and testing your code, make the following changes in JFLAP's preferences: In the Turing Machine Preferences: uncheck "Accept by Halting" and check the other options. JFLAP creates the XML file jflapPreferences.xml in the folder where you ran JFLAP. 2. You are highly recommended to use extra features of JFLAP such as: 'S' (stay option), and JFLAP's special characters '!' and '~'. These are great features that tremendously facilitate the design process and make your life easier. For more information, please refer to the JFLAP's documentations and tutorials. Working with JFLAP's Blocks 1. Be careful if you work with JFLAP's block feature. It is a buggy software, especially when editing and saving a block inside another block. 2. Always have a backup of your current work before modifying it. 3. Always have separate file for each block (aka module). 3 4. If block A has a problem and you need to modify it, change its original file and save it. Then, if block B is using block A, you need to re-inject block A in the block B and save B again. General Notes 1. Always read the requirements at least 10 times! An inaccurate developer is unacceptable! 2. Always set the due date for yourself at least 2-3 days before the official due date. 3. After submitting your work, always download it and test it to make sure that the process of submission was fine. 4. This is an individual project. So, you are NOT allowed to share the solution with other students. 5. The only info that you can share with others is your test cases via Canvas discussion. I might use them for grading If your test cases are smart and tricky! 6. Always make sure that you have the latest version of this document. Sometimes, based on your questions and feedbacks, I need to add some clarifications. If there is a new version, it will be announced via Canvas. 7. For late submission policy, please refer to the Greensheet. 8. If there is any ambiguity, question, or concern, please open a discussion in Canvas. 4 ...
Student has agreed that all tutoring, explanations, and answers provided by the tutor will be used to help in the learning process and in accordance with Studypool's honor code & terms of service.

This question has not been answered.

Create a free account to get help with this and any other question!

Similar Questions
Related Tags

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors