An Executable Formal Semantics of PHP

被引:0
|
作者
Filaretti, Daniele [1 ]
Maffeis, Sergio [1 ]
机构
[1] Univ London Imperial Coll Sci Technol & Med, Dept Comp, London, England
来源
关键词
D O I
暂无
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
PHP is among the most used languages for server-side scripting. Although substantial effort has been spent on the problem of automatically analysing PHP code, vulnerabilities remain pervasive in web applications, and analysis tools do not provide any formal guarantees of soundness or coverage. This is partly due to the lack of a precise specification of the language, which is highly dynamic and often exhibits subtle behaviour. We present the first formal semantics for a substantial core of PHP, based on the official documentation and experiments with the Zend reference implementation. Our semantics is executable, and is validated by testing it against the Zend test suite. We define the semantics of PHP in a term-rewriting framework which supports LTL model checking and symbolic execution. As a demonstration, we extend LTL with predicates for the verification of PHP programs, and analyse two common PHP functions.
引用
收藏
页码:567 / 592
页数:26
相关论文
共 50 条
  • [41] A FORMAL SEMANTICS FOR SQL
    MEIRA, S
    MOTZ, R
    TEPEDINO, F
    [J]. INTERNATIONAL JOURNAL OF COMPUTER MATHEMATICS, 1990, 34 (1-2) : 43 - 63
  • [42] REALISM AND FORMAL SEMANTICS
    PEARCE, D
    RANTALA, V
    [J]. SYNTHESE, 1982, 52 (01) : 39 - 53
  • [43] Formal semantics and ontology
    Kusliy, P. S.
    [J]. EPISTEMOLOGY & PHILOSOPHY OF SCIENCE-EPISTEMOLOGIYA I FILOSOFIYA NAUKI, 2012, 33 (03): : 62 - 67
  • [44] Elements of Formal Semantics
    Keenan, Edward L.
    [J]. JOURNAL OF LOGIC LANGUAGE AND INFORMATION, 2018, 27 (02) : 175 - 192
  • [45] AN IMPLEMENTATION OF FORMAL SEMANTICS
    DOMINICY, M
    VANDERHOEFT, C
    [J]. FRANCAIS MODERNE, 1991, 59 (01): : 36 - 55
  • [46] Contexts in Formal Semantics
    Gauker, Christopher
    [J]. PHILOSOPHY COMPASS, 2010, 5 (07) : 568 - 578
  • [47] Pragmatics for Formal Semantics
    Danvy, Olivier
    [J]. GPCE 11: PROCEEDINGS OF THE TENTH INTERNATIONAL CONFERENCE ON GENERATIVE PROGRAMMING AND COMPONENT ENGINEERING, 2011, : 93 - 93
  • [48] A formal semantics for finalizers
    Leal, MA
    Ierusalimschy, R
    [J]. JOURNAL OF UNIVERSAL COMPUTER SCIENCE, 2005, 11 (07) : 1198 - 1214
  • [49] Frames in Formal Semantics
    Cooper, Robin
    [J]. ADVANCES IN NATURAL LANGUAGE PROCESSING, 2010, 6233 : 103 - 114
  • [50] A VIEW OF FORMAL SEMANTICS
    BOOM, HJ
    NIELSEN, CB
    MCGETTRICK, AD
    MOSSES, PD
    RATTRAY, C
    TENNENT, RD
    WATT, DA
    [J]. COMPUTER STANDARDS & INTERFACES, 1989, 9 (01) : 3 - 9