首页> 外文会议>International symposium on static analysis >Static Validation of Dynamically Generated HTML Documents Based on Abstract Parsing and Semantic Processing
【24h】

Static Validation of Dynamically Generated HTML Documents Based on Abstract Parsing and Semantic Processing

机译:基于抽象解析和语义处理的动态生成HTML文档的静态验证

获取原文

摘要

Abstract parsing is a static-analysis technique for a program that, given a reference LR(k) context-free grammar, statically checks whether or not every dynamically generated string output by the program conforms to the grammar. The technique operates by applying an LR(k) parser for the reference language to data-flow equations extracted from the program, immediately parsing all the possible string outputs to validate their syntactic well-formedness. In this paper, we extend abstract parsing to do semantic-attribute processing and apply this extension to statically verify that HTML documents generated by JSP or PHP are always valid according to the HTML DTD. This application is necessary because the HTML DTD cannot be fully described as an LR(k) grammar. We completely define the HTML 4.01 Transitional DTD in an attributed LALR(1) grammar, carry out experiments for selected real-world JSP and PHP applications, and expose numerous HTML validation errors in the applications. In the process, we experimentally show that semantic properties defined by attribute grammars can also be verified using our technique.
机译:对于一个程序,抽象解析是一种静态分析技术,该程序在给定LR(k)上下文无关语法的情况下,静态检查程序输出的每个动态生成的字符串是否均符合该语法。该技术通过将用于参考语言的LR(k)解析器应用于从程序中提取的数据流方程来进行操作,立即解析所有可能的字符串输出以验证其语法格式正确。在本文中,我们扩展了抽象解析以进行语义属性处理,并将此扩展应用于静态验证JSP或PHP生成的HTML文档根据HTML DTD始终有效。此应用程序是必需的,因为HTML DTD无法完全描述为LR(k)语法。我们在归因于LALR(1)的语法中完全定义了HTML 4.01 Transitional DTD,对选定的实际JSP和PHP应用程序进行了实验,并暴露了应用程序中的许多HTML验证错误。在此过程中,我们通过实验表明,使用我们的技术也可以验证由属性语法定义的语义属性。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号