首页    期刊浏览 2024年07月08日 星期一
登录注册

文章基本信息

  • 标题:LR(K) Parser Construction Using Bottom-up Formal Analysis
  • 本地全文:下载
  • 作者:Nazir Ahmad Zafar
  • 期刊名称:Journal of Software Engineering and Applications
  • 印刷版ISSN:1945-3116
  • 电子版ISSN:1945-3124
  • 出版年度:2012
  • 卷号:5
  • 期号:1
  • 页码:21-28
  • DOI:10.4236/jsea.2012.51004
  • 出版社:Scientific Research Publishing
  • 摘要:Design and construction of an error-free compiler is a difficult and challenging process. The main functionality of a compiler is to translate a source code to an executable machine code correctly and efficiently. In formal verification of software, semantics of a language has more meanings than the syntax. It means source program verification does not give guarantee the generated code is correct. This is because the compiler may lead to an incorrect target program due to bugs in itself. It means verification of a compiler is much more important than verification of a source program. In this paper, we present a new approach by linking context-free grammar and Z notation to construct LR(K) parser. This has several advantages because correctness of the compiler depends on describing rules that must be written in formal languages. First, we have defined grammar then language derivation procedure is given using right-most derivations. Verification of a given language is done by recursive procedures based on the words. Ambiguity of a language is checked and verified. The specification is analyzed and validated using Z/Eves tool. Formal proofs are presented using powerful techniques of reduction and rewriting available in Z/Eves.
  • 关键词:Compiler Construction; LR(K) Parser; Context-Free Grammar; Z Specification; Correctness; Verification
国家哲学社会科学文献中心版权所有