APPLICATIONS OF CONTEXT FREE GRAMMARS BY, BRAMARA MANJEERA THOGARCHETI.

Slides:



Advertisements
Similar presentations
Parsing V: Bottom-up Parsing
Advertisements

Translator Architecture Code Generator ParserTokenizer string of characters (source code) string of tokens abstract program string of integers (object.
Lecture # 7 Chapter 4: Syntax Analysis. What is the job of Syntax Analysis? Syntax Analysis is also called Parsing or Hierarchical Analysis. A Parser.
GRAMMAR & PARSING (Syntactic Analysis) NLP- WEEK 4.
NaLIX: A Generic Natural Language Search Environment for XML Data Presented by: Erik Mathisen 02/12/2008.
Model checking dynamic states in GROOVE Arend Rensink Formal Methods and Tools University of Twente.
Context-Free Grammars Lecture 7
1 Foundations of Software Design Lecture 23: Finite Automata and Context-Free Grammars Marti Hearst Fall 2002.
Compiler Summary Mooly Sagiv html://
Normal forms for Context-Free Grammars
BİL744 Derleyici Gerçekleştirimi (Compiler Design)1.
Syntactic Pattern Recognition Statistical PR:Find a feature vector x Train a system using a set of labeled patterns Classify unknown patterns Ignores relational.
Lexical and syntax analysis
Statistical Natural Language Processing. What is NLP?  Natural Language Processing (NLP), or Computational Linguistics, is concerned with theoretical.
1 Introduction to Parsing Lecture 5. 2 Outline Regular languages revisited Parser overview Context-free grammars (CFG’s) Derivations.
Chapter 1 Introduction Dr. Frank Lee. 1.1 Why Study Compiler? To write more efficient code in a high-level language To provide solid foundation in parsing.
Winter 2007SEG2101 Chapter 71 Chapter 7 Introduction to Languages and Compiler.
Intro to Lexing & Parsing CS 153. Two pieces conceptually: – Recognizing syntactically valid phrases. – Extracting semantic content from the syntax. E.g.,
CS 326 Programming Languages, Concepts and Implementation Instructor: Mircea Nicolescu Lecture 2.
Testing Grammars For Top Down Parsers By Asma M Paracha, Frantisek F. Franek Dept. of Computing & Software McMaster University Hamilton, Ont.
Concordia University Department of Computer Science and Software Engineering Click to edit Master title style COMPILER DESIGN Review Joey Paquet,
PART I: overview material
TextBook Concepts of Programming Languages, Robert W. Sebesta, (10th edition), Addison-Wesley Publishing Company CSCI18 - Concepts of Programming languages.
Review 1.Lexical Analysis 2.Syntax Analysis 3.Semantic Analysis 4.Code Generation 5.Code Optimization.
Unit-1 Introduction Prepared by: Prof. Harish I Rathod
Parsing Introduction Syntactic Analysis I. Parsing Introduction 2 The Role of the Parser The Syntactic Analyzer, or Parser, is the heart of the front.
作者 : 陳鍾誠 單位 : 金門技術學院資管系 URL : 日期 : 2016/6/4 程式語言的語法 Grammar.
Introduction to Parsing
Context Free Grammars CFGs –Add recursion to regular expressions Nested constructions –Notation expression  identifier | number | - expression | ( expression.
Introduction to Compiling
Compiler Design Introduction 1. 2 Course Outline Introduction to Compiling Lexical Analysis Syntax Analysis –Context Free Grammars –Top-Down Parsing –Bottom-Up.
Compiler Introduction 1 Kavita Patel. Outlines 2  1.1 What Do Compilers Do?  1.2 The Structure of a Compiler  1.3 Compilation Process  1.4 Phases.
Compiler Construction By: Muhammad Nadeem Edited By: M. Bilal Qureshi.
CSC312 Automata Theory Lecture # 26 Chapter # 12 by Cohen Context Free Grammars.
Concepts and Realization of a Diagram Editor Generator Based on Hypergraph Transformation Author: Mark Minas Presenter: Song Gu.
Overview of Previous Lesson(s) Over View 3 Model of a Compiler Front End.
Overview of Previous Lesson(s) Over View  A token is a pair consisting of a token name and an optional attribute value.  A pattern is a description.
CS 404Ahmed Ezzat 1 CS 404 Introduction to Compiler Design Lecture 1 Ahmed Ezzat.
CS416 Compiler Design1. 2 Course Information Instructor : Dr. Ilyas Cicekli –Office: EA504, –Phone: , – Course Web.
Chapter 3 – Describing Syntax
Describing Syntax and Semantics
Agenda Preliminaries Motivation and Research questions Exploring GLL
Chapter 1 Introduction.
Finite State Machines Dr K R Bond 2009
CS 3304 Comparative Languages
Introduction to Parsing
CS 404 Introduction to Compiler Design
CS510 Compiler Lecture 4.
Introduction to Parsing (adapted from CS 164 at Berkeley)
Table-driven parsing Parsing performed by a finite state machine.
Chapter 1 Introduction.
Compiler Lecture 1 CS510.
CS416 Compiler Design lec00-outline September 19, 2018
Syntax Analysis Sections :.
Compiler Design 4. Language Grammars
Lexical and Syntax Analysis
Introduction CI612 Compiler Design CI612 Compiler Design.
CPSC 388 – Compiler Design and Construction
Programming Language Syntax 2
R.Rajkumar Asst.Professor CSE
CS 3304 Comparative Languages
CS 3304 Comparative Languages
Compilers Principles, Techniques, & Tools Taught by Jing Zhang
CS416 Compiler Design lec00-outline February 23, 2019
Teori Bahasa dan Automata Lecture 9: Contex-Free Grammars
High-Level Programming Language
Compilers Principles, Techniques, & Tools Taught by Jing Zhang
Lec00-outline May 18, 2019 Compiler Design CS416 Compiler Design.
COMPILER CONSTRUCTION
COP 4620 / 5625 Programming Language Translation / Compiler Writing Fall 2003 Lecture 2, 09/04/2003 Prof. Roy Levow.
Presentation transcript:

APPLICATIONS OF CONTEXT FREE GRAMMARS BY, BRAMARA MANJEERA THOGARCHETI

BRIEF INTRODUCTION  CFG is a set of recursive writing rules used to generate patterns of strings. A CFG consists of following components

APPLICATIONS  CFG parsing for high speed network applications.  Data processing.  Natural language processing.  Human activities recognition.  Neural networks.  Multi functional Radar construction.  Software engineering requirements documentation.

MULTI FUNCTIONAL RADAR CONSTRUCTION  MFR is used in electronic warfare(EW) field.  Engage multiple targets at once.  Signal identification.  Threat assessment.  MFR’s are threat in EW because EW signal processing algorithms are not suited for MFR’s complexity.  Accurate modeling of rules by radar control algorithm logic.  Comparison with priori signal intelligence.

RADAR WORDS  Decompose dynamics into hierarchical structure i.e., radar words

PROCESS  MFR signals are read in the form of strings.  Modelled by compact syntactic representation i.e., CFG  Derive a finite state machine.  Directly apply to EW signal processing.  Stochastic CFG(measurement noise)

VERIFICATION OF NON SELF EMBEDDING PROPERTY  Labelled production graph.  Each vertex of the production graph corresponds to one of the non terminal symbols in E.  For each pair of non terminal symbols S,T ∈ E a labelled edge is drawn from node S to node E.  The labelled edges are L={‘b’, ’l’, ’r’, ’u’, ’0’}  Certain production rules are given for these edges.

RULES  Label ‘b’ is assigned if rules are S → βTα, S→βT and S→Tα  Label ‘l’ is assigned if rule is S → βT but not S→Tα or S→βTα  Label ‘r’ is assigned if rule is S→Tα but not S→βT or S→βTα  Label ‘u’ is assigned if rule is S→T but not S → βTα, S→βT, S→Tα  Label ‘0’ is assigned if rule there are no rules of the form S→T, S→βT, S→Tα or S→βTα  Consider the following grammar

PRODUCTION GRAPH AND ADJACENCY MATRIX

GRAMMATICAL DECOMPOSITION  Cover all the of the graph and consider the cycles.

FINITE STATE AUTOMATA →

DEVELOPMENT AND APPLICATION OF CFG FOR REQUIREMENTS  Basis of systems engineering lifestyle activities.  Getting good set of requirements is always a tough job.  Failure of the project if weak set of requirements.  A grammar is developed by combining computer science concepts with natural language.  BADGER-requirements writing tool.

REQUIREMENT ACTIVITIES  Elicit, analyze, document, store, validate the requirements.  Natural language is misunderstanding and ambiguous.  Humans have contextual knowledge.  Requirement sets are very large.  CFG for comparing the current requirements with previous ones and identify semantic matches.  Adaptations to different writing styles

GRAMMAR FOR REQUIREMENTS  Requirement document has formal language of CS and natural language.  Natural language has clauses.  Independent and subordinate clauses.  Independent are full with verb and subject.  Subordinate are temporal, conditional, relative clauses.

CFG FOR REQUIREMENTS  Two main restrictions for constructing a requirement set.  No existence of pronouns  Focus on active voice.  Backus normal form. A set of given derivation rules  Symbol is a non terminal.  And _expression_ consists of one or more sequence of symbols separated by ‘|’  Non terminals are enclosed by ‘<>’

REQUIREMENTS GRAMMAR IN BACKUS NAUR FORM  Here TC is temporal condition clause.

EXAMPLE GRAMMAR  Consider the requirement. “organizational message traffic shall be transferred with no greater than 1 in 10 3 BER”  “Organizational message traffic shall be transferred” is independent clause  Subject=“organizational message traffic”  Verb=“be”  Auxiliary verb=“shall”  Target=“transferred”  Restrictive relative clause  Proposition=“with”  Criterion indicator=“no greater than”  Value’s number=“1 in 10 3 ”  Value’s units=“BER”

GRAMMAR APPLICATION FOR REQUIREMENTS ELICITATION  CFG as basis for BADGER.  BADGER is “Built in Agent using Deterministic Grammar for Engineering of Requirements”  TIGER is “Tool to InGest and Elucidate Requirements”  PETS is “Prototype Educational Tools for Systems and software engineering”  BADGER ensures adequate information and has pulldown menus.

CFG PARSING FOR HIGH SPEED NETWORK APPLICATIONS  Processing the data to traverse over internet.  There must be a rule based pattern matcher capable of detecting strings and/or regular expressions.  Naïve pattern matchers are susceptible to false positive identification.  CFG provide high level of expressiveness than strings and regular expressions.  Goal: design and implement a high speed CFG.

PARSER ARCHITECTURE  4 main components.  Tokenizer (pattern matching).  Parsing structure (from grammar).  Error detection unit.  Recovery unit.

TOKENIZER  Regular expression chain architecture  Pipeline chain grid

GRAMMAR PARSER  Map grammar rules on to a FPGA(field programmable gate array)  For production

STACKS AND COUNTERS  Sometimes hardware logic can accept invalid strings of type “((a))))” hence we keep track of nesting depth using stack.  Parse millions of network flows simultaneously.  Millions of stacks on chip not possible. Hence we use counters.

CONCLUSION

THANKYOU