DOC PREVIEW
An Interactive Approach to Formal Languages and Automata with JFLAP

This preview shows page 1-2-3-4-5-33-34-35-36-66-67-68-69-70 out of 70 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 70 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 70 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 70 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 70 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 70 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 70 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 70 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 70 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 70 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 70 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 70 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 70 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 70 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 70 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 70 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

An Interactive Approach to Formal Languages and Automata with JFLAPOutlineFormal Languages and Automata TheoryWhy study finite automata?Why Develop Tools for Automata?Why Develop Tools for Automata? Examined 10 Automata textbooksOverview of JFLAPThanks to Students - Worked on JFLAP and Automata Theory ToolsJFLAP – Regular LanguagesJFLAP – Regular languages (more)JFLAP – Context-free LanguagesJFLAP – Recursively Enumerable LanguagesFinite Automata Editing and SimulationFA Edit & Simulation Start up JFLAPFA Edit & Simulation Start Editing!FA Edit & Simulation Create StatesFA Edit & Simulation Create TransitionsFA Edit & Simulation Initial and Final StateFA Edit & Simulation Input to Simulate...FA Edit & Simulation Start Simulation!FA Edit & Simulation After One StepFA Edit & Simulation After Two StepsFA Edit & Simulation After Three StepsFA Edit & Simulation After Four StepsFA Edit & Simulation TracebackFA Multiple RunL-SystemsSlide 28Slide 29Slide 30Students like L-systemsTuring Machine Building BlocksSlide 33Simple Building BlocksSimple Building Blocks (cont)Create & Combine Building BlocksProblem again: Count number of a’sBuilding Block Run ChoicesabbabSlide 40Slide 41Slide 42Slide 43Slide 44Slide 45Mealy MachinesExample – Vending MachineMealy Vending Machine ExampleMoore MachineExample – Halve a Binary NumberRegular Pumping LemmaPick an ExampleJFLAP Pump lemma GameContext-Free Pumping LemmaSimilar CFL pump lemma gameCFL pump lemma (cont)Batch Testing ModeBatch Testing Mode (cont)Using JFLAP in TeachingUsing JFLAP during LectureExample: JFLAP during LectureExample 2: JFLAP during LectureParse Tree ResultsWith JFLAP, Exploring Concepts too tedious for paperJFLAP’s use Outside of ClassOrdering of Problems in HomeworkJFLAP StudyFourteen ParticipantsJFLAP’s Use Around the WorldQuestions?An Interactive Approach to Formal Languages and Automata with JFLAPSusan H. RodgerDuke UniversityNSF CCLI ShowcaseMarch 9, 2007Supported by NSF Grant DUE 0442513.Outline•Overview of JFLAP•Examples and Demo–L-Systems–Turing Machine Building Blocks–Moore and Mealy Machines–Pumping Lemma–Batch Testing Mode•JFLAP’s use in Teaching•JFLAP StudyFormal Languages and Automata Theory•Traditionally taught–Pencil and paper exercises–No immediate feedback–More mathematical than most CS courses–Less hands-on than most CS coursesWhy study finite automata?•Application: Compiler•Compiler identifies your syntax errors •Can write a big DFA to identify all words in a Java program–integers, doubles, boolean –keywords, variable names–arithmetic operators, punctuation symbolsWhy Develop Tools for Automata?TextualTabularVisualInteractive•One had software with book•Only 6 had pictures of PDA, 2 or 3 states•Only 6 had pictures of Turing machines, three of those switched representation•Only 2 had picture of CFG to NPDA•None had picture of parse tree for unrestricted grammarWhy Develop Tools for Automata? Examined 10 Automata textbooksOverview of JFLAP•Java Formal Languages and Automata Package•Instructional tool to learn concepts of Formal Languages and Automata Theory•Topics:–Regular Languages–Context-Free Languages–Recursively Enumerable Languages–LsystemsThanks to Students - Worked on JFLAP and Automata Theory Tools•NPDA - 1990, C++, Dan Caugherty•FLAP - 1991, C++, Mark LoSacco, Greg Badros•JFLAP - 1996-1999, Java versionEric Gramond, Ted Hung, Magda and Octavian Procopiuc•Pâté, JeLLRap, LsysAnna Bilska, Jason Salemme, Lenore Ramm, Alex Karweit, Robyn Geer•JFLAP 4.0 – 2003, Thomas Finley, Ryan Cavalcante•JFLAP 6.0 – 2005-2006 Stephen Reading, Bart Bressler, Jinghui LimJFLAP – Regular Languages•Create–DFA and NFA–Moore and Mealy–regular grammar–regular expression•Conversions–NFA to DFA to minimal DFA–NFA  regular expression–NFA  regular grammarJFLAP – Regular languages (more)•Simulate DFA and NFA–Step with Closure or Step by State–Fast Run–Multiple Run•Combine two DFA•Compare Equivalence•Brute Force Parser•Pumping LemmaJFLAP – Context-free Languages•Create–Nondeterministic PDA–Context-free grammar–Pumping Lemma•Transform–PDA  CFG–CFG  PDA (LL & SLR parser)–CFG  CNF–CFG  Parse table (LL and SLR)–CFG  Brute Force ParserJFLAP – Recursively Enumerable Languages•Create–Turing Machine (1-Tape)–Turing Machine (multi-tape)–Building Blocks–Unrestricted grammar•Parsing–Unrestricted grammar with brute force parserFinite Automata Editingand Simulation•The most basic feature of JFLAP has always been the creation of automata, and simulation of input on automata.•Here we demonstrate the creation and simulation on a simple NFA.FA Edit & SimulationStart up JFLAP•When we start up JFLAP we have a choice of structures.•The first of these is the Finite Automata!FA Edit & SimulationStart Editing!•We start with an empty automaton editor window.FA Edit & SimulationCreate States•We create some states ...FA Edit & SimulationCreate Transitions•We create some transitions ...FA Edit & SimulationInitial and Final State•We set an initial and final state.•Now we can simulate input on this automaton!FA Edit & SimulationInput to Simulate...•When we say we want to simulate input on this automaton, a dialog asks us for the input.FA Edit & SimulationStart Simulation!•When simulation starts, we have a configuration on the initial state with all input remaining to be processed.FA Edit & SimulationAfter One Step•This is a nondeterministic FA, and on this input we have multiple configurations after we “Step.”FA Edit & SimulationAfter Two Steps•The previous configurations on q1 and q2 are rejected, and are shown in red. •The remaining uncolored configurations paths are not rejected, and are still open.FA Edit & SimulationAfter Three Steps•Yet another step.FA Edit & SimulationAfter Four Steps•One of the final configurations has been accepted!FA Edit & SimulationTraceback•One can then see a traceback to see the succession of configurations that led to the accepting configuration.FA Multiple Run•Select Multiple Run•One can then enter many strings and receive acceptance info.L-Systems• L-Systems may be used to model biological systems and create fractals.• Similar to Chomsky grammars, except all variables are replaced in each derivation step, not just one!• Commonly, strings from successive derivations are


An Interactive Approach to Formal Languages and Automata with JFLAP

Download An Interactive Approach to Formal Languages and Automata with JFLAP
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view An Interactive Approach to Formal Languages and Automata with JFLAP and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view An Interactive Approach to Formal Languages and Automata with JFLAP 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?