摘要
在Prolog程序分析中,考虑程序的执行路径和非逻辑的cut操作可提高程序分析的精度。当前用于Prolog程序路径依赖分析的语义因依赖于程序执行的目标而不适合目标独立的程序分析。为此,本文采用了一种携带路径信息并允许cut操作的Prolog抽象语法,在此基础上给出了Prolog的操作语义和一种目标独立的标号树(LT)语义,并证明了LT语义相对于操作语义的正确性。LT语义可作为目标独立的Prolog程序路径依赖分析的基础。
Considering the execution path and cut operators of a Prolog program can improve the precision of program analysis. Known semantics for Prolog either makes use of limited amount of path information and hence leads to less precise analysis or is goal-dependent and therefore not suitable for goal-independent program analysis. This paper deals with the problems by proposing a goal-independent labeled tree semantics for Prolog with cut, which makes it possible to use call strings as context information to improve Prolog program analysis. This semantics is shown to be correct w. r. t the operational semantics presented in this paper.
出处
《计算机科学》
CSCD
北大核心
2008年第2期246-252,297,共8页
Computer Science
基金
国家自然科学基金(60563005,60663005)
广西青年科学基金(桂科青0728093,0542036)
关键词
程序分析
Prolog语义
目标独立
上下文信息
抽象解释
Program analysis, Prolog semantics, Goal-independence, Context information, Abstract interpretation