scholarly journals Automatic migration from synchronous to asynchronous JavaScript APIs

2021 ◽  
Vol 5 (OOPSLA) ◽  
pp. 1-27
Author(s):  
Satyajit Gokhale ◽  
Alexi Turcotte ◽  
Frank Tip

The JavaScript ecosystem provides equivalent synchronous and asynchronous Application Programming Interfaces (APIs) for many commonly used I/O operations. Synchronous APIs involve straightforward sequential control flow that makes them easy to use and understand, but their "blocking" behavior may result in poor responsiveness or performance. Asynchronous APIs impose a higher syntactic burden that relies on callbacks, promises, and higher-order functions. On the other hand, their nonblocking behavior enables applications to scale better and remain responsive while I/O requests are being processed. While it is generally understood that asynchronous APIs have better performance characteristics, many applications still rely on synchronous APIs. In this paper, we present a refactoring technique for assisting programmers with the migration from synchronous to asynchronous APIs. The technique relies on static analysis to determine where calls to synchronous API functions can be replaced with their asynchronous counterparts, relying on JavaScript's async/await feature to minimize disruption to the source code. Since the static analysis is potentially unsound, the proposed refactorings are presented as suggestions that must be reviewed and confirmed by the programmer. The technique was implemented in a tool named Desynchronizer. In an empirical evaluation on 12 subject applications containing 316 synchronous API calls, Desynchronizer identified 256 of these as candidates for refactoring. Of these candidates, 244 were transformed successfully, and only 12 resulted in behavioral changes. Further inspection of these cases revealed that the majority of these issues can be attributed to unsoundness in the call graph.

2018 ◽  
Author(s):  
Jianfeng Li ◽  
Bowen Cui ◽  
Yuting Dai ◽  
Ling Bai ◽  
Jinyan Huang

The number of bioinformatics resources, such as tools/scripts and databases are growing exponentially. This poses a great challenge for users to access, manage, and integrate the corresponding bioinformatics resources. To facilitate the request, we proposed a comprehensive R package, BioInstaller, which includes the R functions, Shiny application, and the HTTP representational state transfer (REST) application programming interfaces (APIs). We also established a community-based configuration pool to collect, access and share bioinformatics resources. The source code of BioInstaller is freely available at our lab website http://bioinfo.rjh.com.cn/labs/jhuang/tools/bioinstaller or popular package host GitHub at: https://github.com/JhuangLab/BioInstaller. Also, a docker image can be downloaded from DockerHub (https://hub.docker.com/r/bioinstaller).


Electronics ◽  
2021 ◽  
Vol 10 (18) ◽  
pp. 2211
Author(s):  
Muhammad Umair Khan ◽  
Scott Uk-Jin Lee ◽  
Zhiqiang Wu ◽  
Shanza Abbas

With the proliferation of mobile devices, the popularity of Android applications (apps) has increased exponentially. Efficient power consumption in a device is essential from the perspective of the user because users want their devices to work all day. Developers must properly utilize the application programming interfaces (APIs) provided by Android software development kit to optimize the power consumption of their app. Occasionally, developers fail to relinquish the resources required by their app, resulting in a resource leak. Wake lock APIs are used in apps to manage the power state of the Android smartphone, and they frequently consume more power than necessary if not used appropriately (also called energy leak). In this study, we use a multi-layer perceptron (MLP) to detect wake lock leaks in Android apps because the MLP can solve complex problems and determine similarities in graphs. To detect wake lock leaks, we extract the call graph as features from the APK and embed the instruction and neighbor information in the node’s label of the call graph. Then, the encoded data are input to an MLP model for training and testing. We demonstrate that our model can identify wake lock leaks in apps with 99% accuracy.


Author(s):  
Xiaodong Gu ◽  
Hongyu Zhang ◽  
Dongmei Zhang ◽  
Sunghun Kim

Computer programs written in one language are often required to be ported to other languages to support multiple devices and environments. When programs use language specific APIs (Application Programming Interfaces), it is very challenging to migrate these APIs to the corresponding APIs written in other languages. Existing approaches mine API mappings from projects that have corresponding versions in two languages. They rely on the sparse availability of bilingual projects, thus producing a limited number of API mappings. In this paper, we propose an intelligent system called DeepAM for automatically mining API mappings from a large-scale code corpus without bilingual projects. The key component of DeepAM is based on the multi-modal sequence to sequence learning architecture that aims to learn joint semantic representations of bilingual API sequences from big source code data. Experimental results indicate that DeepAM significantly increases the accuracy of API mappings as well as the number of API mappings when compared with the state-of-the-art approaches.


2018 ◽  
Author(s):  
Jianfeng Li ◽  
Bowen Cui ◽  
Yuting Dai ◽  
Ling Bai ◽  
Jinyan Huang

The number of bioinformatics resources, such as tools/scripts and databases are growing exponentially. This poses a great challenge for users to access, manage, and integrate the corresponding bioinformatics resources. To facilitate the request, we proposed a comprehensive R package, BioInstaller, which includes the R functions, Shiny application, and the HTTP representational state transfer (REST) application programming interfaces (APIs). We also established a community-based configuration pool to collect, access and share bioinformatics resources. The source code of BioInstaller is freely available at our lab website http://bioinfo.rjh.com.cn/labs/jhuang/tools/bioinstaller or popular package host GitHub at: https://github.com/JhuangLab/BioInstaller. Also, a docker image can be downloaded from DockerHub (https://hub.docker.com/r/bioinstaller).


2018 ◽  
Vol 7 (3.4) ◽  
pp. 6
Author(s):  
Bidush Kumar Sahoo ◽  
Mitrabinda Ray

In concurrent programs, bug detection is a tedious job due to non-determinism and multiple thread control. The bug detection is done by checking the interleaving of threads which is not available in operational phases. So, static analysis is one of the preferred approaches for detection of concurrent bug. Invariant based testing technique is one approach of static analysis used for detecting the concurrent bugs. In this paper, we discuss an invariant based testing approach using three steps: (i) the invariants of a given concurrent program are generated using Daikon tool. (ii) The bad invariants are removed by using the static call graph of the source code, where the static call graph is generated by the javacg tool. (iii) The reduced invariant set is obtained by eliminating the bad and redundant invariants which is used for testcase generation. Using the reduced invariant set, we generate the testcases that are used to find the various concurrent bugs such as Deadlock, Atomicity violation and Bad composition. We conducted an experiment on a well-known concurrent program called the Dining Philosopher Problem. The experimental results show that, the testcases obtained from the reduced invariant set is able to detect more types and no. of concurrent bugs than the existing approach on invariant based testing.  


Author(s):  
Александр Викторович Кныш ◽  
Дмитрий Александрович Кобзев ◽  
Оксана Николаевна Давиденко ◽  
Сергей Анатольевич Детистов ◽  
Иван Александрович Шечев ◽  
...  

В условиях существующего многообразия автоматизированных систем управления технологическими процессами (АСУТП), возрастающих рисков компьютерных инцидентов, обусловленных развитием информационных технологий, неизменно актуальными являются вопросы повышения качества программного обеспечения (ПО) АСУТП. В настоящей статье на примере АСУТП организаций системы «Транснефть» представлена возможность использования методов статического анализа исходного кода ПО с целью обеспечения информационной безопасности АСУТП. Рассмотрены причины низкого качества ПО и подходы к его повышению. Проанализированы методы анализа исходного кода ПО (статический, динамический, интерактивный), сделан вывод о том, что наиболее перспективной является комбинация трех видов статического анализа: сигнатурного анализа, анализа потока управления, анализа потока данных. Указанная комбинация легла в основу методики выявления ошибок, потенциально опасных конструкций, логических бомб и неиспользуемых переменных в ПО АСУТП, разработанной в рамках научно-исследовательской работы «Создание системы анализа исходного кода программного обеспечения автоматизированных систем управления технологическими процессами». Основным достоинством созданной методики является ее инвариантность по отношению к языкам программирования и разновидностям дефектов. При этом общий алгоритм поиска дефектов остается неизменным: меняются только сигнатуры, правила выявления. With the existing variety of automated process control systems (APCS) and the increasing risks of computer incidents caused by the development of information technology, the issues of improving the quality of the APCS software are invariably topical. This article presents the possibility of using the software source code static analysis methods for ensuring the information security of the APCS using the example of Transneft system entities’ APCS. The reasons for the low quality of software and approaches to its improvement are considered. Methods of software source code analysis (static, dynamic, interactive) are analyzed, and it is concluded that the most promising is a combination of three types of static analysis: signature analysis, control flow analysis, data flow analysis. This combination serves as the basis for the methodology of detecting errors, potentially dangerous structures, logic bombs, and unused variables in the APCS software developed as part of the research work entitled “Creation of a System for Analyzing the Source Code of Automated Process Control System Software”. The main advantage of the created methodology is its invariance with respect to programming languages and types of defects. At the same time, the general defect searching algorithm remains unchanged: only signatures and detection rules are subject to change.


2016 ◽  
Author(s):  
Malachi Griffith ◽  
Nicholas C Spies ◽  
Kilannin Krysiak ◽  
Adam C Coffman ◽  
Joshua F McMichael ◽  
...  

AbstractCIViC is an expert crowdsourced knowledgebase for Clinical Interpretation of Variants in Cancer (www.civicdb.org) describing the therapeutic, prognostic, and diagnostic relevance of inherited and somatic variants of all types. CIViC is committed to open source code, open access content, public application programming interfaces (APIs), and provenance of supporting evidence to allow for the transparent creation of current and accurate variant interpretations for use in cancer precision medicine.


Sign in / Sign up

Export Citation Format

Share Document