
FORMAL LANGUAGES – EDUCATIONAL DATABASE _______________ A Thesis Presented to the Faculty of San Diego State University _______________ In Partial Fulfillment of the Requirements for the Degree Master of Science in Computer Science _______________ by Deepika Devaraje Urs Fall 2015 iii Copyright © 2015 by Deepika Devaraje Urs All Rights Reserved iv ABSTRACT OF THE THESIS Formal Languages – Educational Database by Deepika Devaraje Urs Master of Science in Computer Science San Diego State University, 2015 This thesis focuses on developing an application which can be used to generate finite automata from a given grammar. The main purpose of this application is to assist the learning experience for the classes CS562(Finite Automata) CS620(Formal Languages) offered at San Diego State University. The system is using web-based technologies to generate automata. The reason for a web based system is that once deployed on a server, the system can be accessed anywhere on web and can be used to generate automata in any environment irrespective of the platform used on a machine. A well defined grammar has to be provided to the system which consists of – A definite set of alphabets (V and T) Production rules to generate the language Grammar(G) is represented as G = (V, T, P, S) where, V = finite set of letters called Variables T = finite set of letters called Terminal Symbols S = start variables, belongs to set V P = finite set of productions The system then uses those alphabets and the production rules to generate words of the language and then will use code to generate the finite automaton graph. The output of the system will be – Generation and storage of finite automaton as specified by the delta function A graph of finite automata which conforms with the given grammar as input. Implementation details of the system This web based system consists of three parts which are also called modules. The three modules of the system are – Database – stores the information about the given grammar inputs, so that the automata can be generated again, if need be Logic – generates the automata by taking the inputs from the database. Presentation – shows the graph in a user friendly manner to the user and will be providing the facilities to input the grammar to generate the automata. This thesis included research work of two people. My work was on Database implementation which included user management as well as managing the input grammar v and language. My colleague Divyashree Vijaykumar worked on graphical representation of the finite automata. vi TABLE OF CONTENTS PAGE ABSTRACT ............................................................................................................................. iv LIST OF FIGURES ............................................................................................................... viii CHAPTER 1 INTRODUCTION .........................................................................................................1 1.1 Background Information ....................................................................................1 1.2 Problem Statement .............................................................................................1 1.3 Significance of the Study ...................................................................................2 1.4 Motivation ..........................................................................................................2 1.5 Goal ....................................................................................................................3 1.6 Methodology ......................................................................................................3 1.7 Project Scope .....................................................................................................4 1.8 Security ..............................................................................................................4 2 LITERATURE REVIEW ..............................................................................................5 2.1 Technologies used in Application Development .............................................13 2.2 Application Interface .......................................................................................15 2.3 Database Design...............................................................................................18 2.4 Test Cases ........................................................................................................25 3 STRUCTURAL COMPONENTS OF FORMAL LANGUAGE ................................28 3.1 Symbols............................................................................................................28 3.2 Alphabet ...........................................................................................................29 3.3 Strings ..............................................................................................................29 3.4 Languages ........................................................................................................30 4 TYPES OF FORMAL LANGUAGES ........................................................................31 4.1 Regular Languages...........................................................................................31 4.1.1 Deterministic Finite Automata (DFA) ....................................................31 vii 4.1.2 Nondeterministic Finite Automata (NFA) ..............................................32 4.2 Context-Free Languages ..................................................................................32 4.3 Context-Sensitive Languages...........................................................................33 5 APPLICATIONS OF FORMAL LANGUAGES ........................................................34 6 SUMMARY .................................................................................................................37 7 FUTURE WORK .........................................................................................................38 BIBLIOGRAPHY ....................................................................................................................39 viii LIST OF FIGURES PAGE Figure 1.1. Application architecture. .........................................................................................2 Figure 2.1. Operation of a machine depicted as a state diagram. ..............................................6 Figure 2.2. Regular grammar. ....................................................................................................7 Figure 2.3. State transition table for a deterministic finite automaton.......................................8 Figure 2.4. Deterministic finite automaton state diagram. .........................................................9 Figure 2.5. NFA - can tranist to multiple states on same input. ..............................................10 Figure 2.6. Non deterministic finite automaton state table. .....................................................11 Figure 2.7. Non deterministic finite automaton state diagram.................................................12 Figure 2.8. Login page. ............................................................................................................15 Figure 2.9. User registration. ...................................................................................................15 Figure 2.10. Home page. ..........................................................................................................15 Figure 2.11. Input grammar. ....................................................................................................16 Figure 2.12. Input language. ....................................................................................................16 Figure 2.13. Input State table to generate automaton. .............................................................16 Figure 2.14. Retrieve and edit grammar. .................................................................................17 Figure 2.15. Retrieve and edit language. .................................................................................17 Figure 2.16. Retrieve and edit state table to generate automaton. ...........................................17 Figure 2.17. Generated finite automaton state diagram. ..........................................................18 Figure 2.18. Database schema. ................................................................................................18 Figure 2.19. Users table. ..........................................................................................................19 Figure 2.20. Alphabets table. ...................................................................................................19 Figure 2.21. Variables table. ....................................................................................................20 Figure 2.22. Table storing transition rules specified in state table. .........................................21 Figure 2.23. Table for storing production rules. ......................................................................22 Figure 2.24. Grammar table. ....................................................................................................23 ix Figure 2.25. Language table.....................................................................................................23 Figure 2.26. Table to store states. ............................................................................................24 Figure
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages51 Page
-
File Size-