Fault localisation for WS-BPEL programs based on predicate switching and program slicing

Chang-ai Sun, Yufeng Ran, Caiyun Zheng, Huai Liu, Dave Towey, Xiangyu Zhang
2018 Journal of Systems and Software  
Service-Oriented Architecture (SOA) enables the coordination of multiple loosely coupled services. This allows users to choose any service provided by the SOA without knowing implementation details, thus making coding easier and more flexible. Web services are basic units of SOA. However, the functionality of a single Web service is limited, and usually cannot completely satisfy the actual demand. Hence, it is necessary to coordinate multiple independent Web services to achieve complex business
more » ... processes. Business Process Execution Language for Web Services (WS-BPEL) makes the coordination possible, by helping the integration of multiple Web services and providing an interface for users to invoke. When coordinating these services, however, illegal or faulty operations may be encountered, but current tools are not yet powerful enough to support the localisation and removal of these problems. In this paper, we propose a fault localisation technique for WS-BPEL programs based on predicate switching and program slicing, allowing developers to more precisely locate the suspicious faulty code. Case studies were conducted to investigate the effectiveness of the proposed technique, which was compared with predicate switching only, slicing only, and one existing fault localisation technique, namely Tarantula. The experimental results show that the proposed technique has a higher fault localisation effectiveness and precision than the baseline techniques. have many new features. For instance, a WS-BPEL 17 program is represented as an XML file, and dynamic 18 behaviours of the program are embedded into structural 19 XML elements; Web services composed by WS-BPEL 20 programs may be implemented in hybrid programming 21 languages; and WS-BPEL supports concurrency and 22 synchronisation that is not common in the traditional 23 programs. 24 The above unique features make the debugging of 25 WS-BPEL programs significantly different from that 26 of traditional programs. Unfortunately, very little re-27 search in this direction has been reported. In our pre-28 vious work [4], we presented a block-based fault lo-29 calisation framework for WS-BPEL programs, and syn-30 thesised the three well-known spectrum-based fault lo-31 calisation techniques: Tarantula [5], Set-Union [6], and 32 Code Coverage [7, 8]. We also conducted an empir-33 ical study to evaluate the effectiveness of the synthe-34 sized WS-BPEL-specific fault localisation techniques. 35 The result showed that the Tarantula technique was the 36 most effective technique, demonstrated by the highest 37 accuracy in localising the blocks that contain the faulty 38 statement. However, these techniques could only report 39 those suspicious faulty blocks without a deeper analysis 40 inside the suspicious block. 41 There also exist some development platforms for 42 WS-BPEL, such as ActiveBPEL Designer [9] and 43 Eclipse BPEL Designer [10]. Unfortunately, these plat-44 forms usually only provide support for WS-BPEL syn-45 tax checking, while the assistance with logical errors 46 that most developers expect is missing. If such assis-47 tance were available, perhaps as a plug-in to the plat-48 form, the debugging efficiency might be substantially 49 improved. 50 In this work, we attempt to develop a technique 51 to further improve the effectiveness and efficiency of 52 fault localisation for WS-BPEL programs. In particu-53 lar, we propose a new fault localisation technique for 54 WS-BPEL programs, based on two popularly used tech-55 niques, namely predicate switching [11] and program 56 slicing [12]. The proposed technique first employs pred-57 icate switching to narrow the range of blocks to be 58 checked for the fault localisation, and then makes use 59 of slicing to go more deeply into the block for a more 60 precise analysis of the fault. In particular, we focus 61 on the following unique challenges in applying predi-62 cate switching and program slicing into WS-BPEL pro-63 grams. 64 • Predicate switching for WS-BPEL programs: For 65 C, C++, or Java programs, predicate switching 66 is normally implemented through instrumentation. 67 However, WS-BPEL programs are basically the 68 workflow specifications based on XML, and their 69 executions normally rely on a specific interpreter. 70 For instance, Apache ODE [13] is a popular WS-71 BPEL engine that compiles all standard BPEL el-72 ements: the compiled VxBPEL is represented as 73 an object model containing all necessary resources 74 for execution. A runtime component is responsi-75 ble for the execution of compiled processes. Such 76 an execution mode means that dynamic changes to 77 WS-BPEL programs are not allowed. In contrast, 78 the original implementation of predicate switch-79 ing for C programs is based on Valgrind 1 . Val-80 grind supports dynamic instrumentation by calling 81 the instrumentation functions. These functions, in 82 turn, instrument the provided basic block and re-83 turn the new basic block to the Valgrind kernel (re-84 fer to [11] for more details). Clearly, because no 85 5.1. RQ1: Effectiveness 861 The experimental results of the success rates for 862 BPELswice, switchOnly, sliceOnly, and Tarantula are 863 given in Figure 7. 864 Based on Figure 7, we can observe that among 57, 56, 865 and 53 faults (each in one mutant) for SmartShelf, Trav-866 elAgency, and QuoteProcess, respectively, BPELswice 867 could successfully localise 42, 53, and 43 faults, giving 868 success rates of 73.68%, 94.64%, and 81.13%, which 869 were consistently the highest among the four fault lo-870 calisation techniques. These results clearly show that 871 BPELswice was much more effective than the other 872 three techniques in the fault localisation for WS-BPEL 873 programs. 874 We also investigated the faults that BPELswice failed 875 to localise. We found that all these faults are of the 876 types of "remove an activity" and "remove an element". 877 Since BPELswice is based on the execution path, it can-878
doi:10.1016/j.jss.2017.10.030 fatcat:gwd42giibreg7hlp5y5gs7wqpy