Research Article Open Access

Removing Useless Productions of a Context Free Grammar through Petri Net

Mansoor Al-A'ali and Ali A. Khan

Abstract

Following the proposal for a Petri Net (PN) representation of the Context Free Grammar (CFG)[1], we propose in this paper, an algorithm to eliminate the useless productions of CFG. First the CFG is represented by a PN. Then, based on the reachability, an algorithm is developed to eliminate Useless-productions. The algorithm is analyzed and implemented in Pascal using examples of a CFG. The proposed algorithm is better than the existing techniques in the sense that PN model is easy to understand and requires fewer computations and easily implemented on computers.

Journal of Computer Science
Volume 3 No. 7, 2007, 494-498

DOI: https://doi.org/10.3844/jcssp.2007.494.498

Submitted On: 2 March 2007 Published On: 31 July 2007

How to Cite: Al-A'ali, M. & Khan, A. A. (2007). Removing Useless Productions of a Context Free Grammar through Petri Net. Journal of Computer Science, 3(7), 494-498. https://doi.org/10.3844/jcssp.2007.494.498

  • 2,437 Views
  • 5,052 Downloads
  • 0 Citations

Download

Keywords

  • Formal methods
  • context- free grammar
  • useless productions
  • petri net