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 条
  • [1] KRust: A Formal Executable Semantics of Rust
    Wang, Feng
    Song, Fu
    Zhang, Min
    Zhu, Xiaoran
    Zhang, Jun
    [J]. PROCEEDINGS 2018 12TH INTERNATIONAL SYMPOSIUM ON THEORETICAL ASPECTS OF SOFTWARE ENGINEERING (TASE 2018), 2018, : 44 - 51
  • [2] An Executable Formal Semantics of C with Applications
    Ellison, Chucky
    Rosu, Grigore
    [J]. ACM SIGPLAN NOTICES, 2012, 47 (01) : 533 - 544
  • [3] An Executable Formal Semantics of C with Applications
    Ellison, Chucky
    Rosu, Grigore
    [J]. POPL 12: PROCEEDINGS OF THE 39TH ANNUAL ACM SIGPLAN-SIGACT SYMPOSIUM ON PRINCIPLES OF PROGRAMMING LANGUAGES, 2012, : 533 - 544
  • [4] Executable Formal Semantics for the POSIX Shell
    Greenberg, Michael
    Blatt, Austin J.
    [J]. PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2020, 4 (POPL):
  • [5] A Formal Framework for Prototyping Executable Semantics in ATL
    Boronat, Artur
    [J]. THEORY AND PRACTICE OF MODEL TRANSFORMATION, ICMT 2018, 2018, 10888 : 157 - 172
  • [6] An executable formal semantics for UML-RT
    Posse, Ernesto
    Dingel, Juergen
    [J]. SOFTWARE AND SYSTEMS MODELING, 2016, 15 (01): : 179 - 217
  • [7] A formal executable semantics of the Java']JavaCard platform
    Barthe, G
    Dufay, G
    Jakubiec, L
    Serpette, B
    de Sousa, SM
    [J]. PROGRAMMING LANGUAGES AND SYSTEMS, PROCEEDINGS, 2001, 2028 : 302 - 319
  • [8] Formal executable semantics for conformance in the MDE framework
    Egea, Marina
    Rusu, Vlad
    [J]. INNOVATIONS IN SYSTEMS AND SOFTWARE ENGINEERING, 2010, 6 (1-2) : 73 - 81
  • [9] An executable formal semantics for UML-RT
    Ernesto Posse
    Juergen Dingel
    [J]. Software & Systems Modeling, 2016, 15 : 179 - 217
  • [10] Formal and Executable Semantics of the Ethereum Virtual Machine in Dafny
    Cassez, Franck
    Fuller, Joanne
    Ghale, Milad K.
    Pearce, David J.
    Quiles, Horacio M. A.
    [J]. FORMAL METHODS, FM 2023, 2023, 14000 : 571 - 583