Test Generation for Higher-Order Functions in Dynamic Languages

被引:0
|
作者
Selakovic, Marija [1 ]
Pradel, Michael [1 ]
Karim, Rezwana
Tip, Frank [2 ]
机构
[1] Tech Univ Darmstadt, Darmstadt, Germany
[2] Northeastern Univ, Boston, MA 02115 USA
关键词
Higher-order functions; differential testing; dynamic analysis; !text type='Java']Java[!/text]Script;
D O I
暂无
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Test generation has proven to provide an effective way of identifying programming errors. Unfortunately, current test generation techniques are challenged by higher-order functions in dynamic languages, such as JavaScript functions that receive callbacks. In particular, existing test generators suffer from the unavailability of statically known type signatures, do not provide functions or provide only trivial functions as inputs, and ignore callbacks triggered by the code under test. This paper presents LambdaTester, a novel test generator that addresses the specific problems posed by higher-order functions in dynamic languages. The approach automatically infers at what argument position a method under test expects a callback, generates and iteratively improves callback functions given as input to this method, and uses novel test oracles that check whether and how callback functions are invoked. We apply LambdaTester to test 43 higher-order functions taken from 13 popular JavaScript libraries. The approach detects unexpected behavior in 12 of the 13 libraries, many of which are missed by a state-of-the-art test generator.
引用
收藏
页数:27
相关论文
共 50 条
  • [1] Test Generation for Higher-Order Functions in Dynamic Languages
    Selakovic, Marija
    Pradel, Michael
    Karim, Rezwana
    Tip, Frank
    [J]. PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2018, 2
  • [2] Higher-Order Test Generation
    Godefroid, Patrice
    [J]. ACM SIGPLAN NOTICES, 2011, 46 (06) : 258 - 269
  • [3] Higher-Order Test Generation
    Godefroid, Patrice
    [J]. PLDI 11: PROCEEDINGS OF THE 2011 ACM CONFERENCE ON PROGRAMMING LANGUAGE DESIGN AND IMPLEMENTATION, 2011, : 258 - 269
  • [4] Static and dynamic processor allocation for higher-order concurrent languages
    Nielson, HR
    Nielson, F
    [J]. TAPSOFT '95: THEORY AND PRACTICE OF SOFTWARE DEVELOPMENT, 1995, 915 : 590 - 604
  • [5] Environmental Bisimulations for Higher-Order Languages
    Sangiorgi, Davide
    Kobayashi, Naoki
    Sumii, Eijiro
    [J]. ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 2011, 33 (01):
  • [6] Coinductive techniques for higher-order languages
    Sangiorgi, Davide
    [J]. ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2013, (131): : 1 - +
  • [7] EFFECT ANALYSIS IN HIGHER-ORDER LANGUAGES
    NEIRYNCK, A
    PANANGADEN, P
    DEMERS, AJ
    [J]. INTERNATIONAL JOURNAL OF PARALLEL PROGRAMMING, 1989, 18 (01) : 1 - 36
  • [8] Environmental bisimulations for higher-order languages
    Sangiorgi, Davide
    Kobayashi, Naoki
    Sumii, Eijiro
    [J]. 22ND ANNUAL IEEE SYMPOSIUM ON LOGIC IN COMPUTER SCIENCE, PROCEEDINGS, 2007, : 293 - +
  • [9] Higher-Order Operator Precedence Languages
    Reghizzi, Stefano Crespi
    Pradella, Matteo
    [J]. ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2017, (252): : 86 - 100
  • [10] GENERATION AND EVALUATION OF HIGHER-ORDER PLASMA DIELECTRIC FUNCTIONS BY COMPUTER
    ROSEN, B
    [J]. BULLETIN OF THE AMERICAN PHYSICAL SOCIETY, 1973, 18 (10): : 1278 - 1278