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 条
  • [41] BAZILEVIC-FUNCTIONS OF HIGHER-ORDER
    NASR, MA
    [J]. REVUE ROUMAINE DE MATHEMATIQUES PURES ET APPLIQUEES, 1983, 28 (08): : 709 - 714
  • [42] COMPUTATIONS OF HILL FUNCTIONS OF HIGHER-ORDER
    JERRI, AJ
    [J]. MATHEMATICS OF COMPUTATION, 1977, 31 (138) : 481 - 484
  • [43] A practical and flexible flow analysis for higher-order languages
    Ashley, JM
    Dybvig, RK
    [J]. ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 1998, 20 (04): : 845 - 868
  • [44] Generation of higher-order squeezing in a micromaser
    Li, FL
    Lin, DL
    [J]. JOURNAL OF PHYSICS B-ATOMIC MOLECULAR AND OPTICAL PHYSICS, 1997, 30 (16) : 3719 - 3729
  • [45] Atomic test of higher-order interference
    Lee, Kai Sheng
    Zhuo, Zhao
    Couteau, Christophe
    Wilkowski, David
    Paterek, Tomasz
    [J]. PHYSICAL REVIEW A, 2020, 101 (05)
  • [46] HIGHER-ORDER ATTRIBUTE SEMANTICS OF FLAT DECLARATIVE LANGUAGES
    Grigorenko, Pavel
    Tyugu, Enn
    [J]. COMPUTING AND INFORMATICS, 2010, 29 (02) : 251 - 280
  • [47] Energy Minimization of Discrete Functions with Higher-order Potentials for Depth Map Generation
    Bulatov, Dimitri
    Kottler, Benedikt
    Rottensteiner, Franz
    [J]. 2016 23RD INTERNATIONAL CONFERENCE ON PATTERN RECOGNITION (ICPR), 2016, : 2344 - 2349
  • [48] Formally based profiling for higher-order functional languages
    Sansom, PM
    Jones, SLP
    [J]. ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 1997, 19 (02): : 334 - 385
  • [50] Behavioural equivalence and indistinguishability in higher-order typed languages
    Katsumata, S
    [J]. RECENT TRENDS IN ALGEBRAIC DEVELOPMENT TECHNIQUES, 2003, 2755 : 284 - 298