Abstract
In modern web applications, the elaborate GUI of the front end is often developed with large-scale JavaScript frameworks. In such systems, the behavior of one HTML element is usually defined by code in different JavaScript functions scattered all over the source files, and a piece of code may also have influence on other functions and variables all over the source files. Therefore, the data and control flow of the front end may be hard to follow. We propose an automated approach to integrate the overall data and control flow of the front end into an overview model, which then provides us with an excellent starting point to application of formal methods to prove the correctness of the front end. Our approach is hence helpful for comprehension of the front end code and validation of its correctness.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Almashfi, N., Lu, L.: Code smell detection tool for Java Script programs. In: Proceedings of the 5th International Conference on Computer and Communication Systems (ICCCS 2020), pp. 172–176. IEEE (2020)
Facebook: React - A JavaScript Library for Building User Interfaces. https://reactjs.org. Accessed 21 Feb 2021
Google: Angular - The Modern Web Developer’s Platform. https://angular.io. Accessed 17 Feb 2021
Jensen, S.H., Madsen, M., Møller, A.: Modeling the HTML DOM and browser API in static analysis of JavaScript web applications. In: Proceedings of the 19th ACM SIGSOFT Symposium Foundations of Software Engineering and 13th European Software Engineering Conference (FSE/ESEC 2011), pp. 59–69. ACM (2011)
Karakochev, A.: Automatic interaction diagram generation of Vue.js-based web applications. Master’s thesis, Hochschule für Technik und Wirtschaft Berlin (2021)
Lamport, L.: The TLA+ Language and Tools for Hardware and Software Engineers. Addison-Wesley, Boston (2003)
Liu, Y.: JSOptimizer: an extensible framework for JavaScript program optimization. In: Proceedings of the 41st International Conference on Software Engineering Companion, pp. 168–170. IEEE (2019)
Nielson, F., Nielson, H.R., Hankin, C.: Principles of Program Analysis. Springer, Heidelberg (2005)
OpenJS Foundation: ESLint - Pluggable JavaScript linter. https://eslint.org. Accessed 18 Feb 2021
Park, J., Ryou, Y., Park, J., Ryu, S.: Analysis of JavaScript web applications using SAFE 2.0. In: Proceedings of the 39th International Conference on Software Engineering Companion, pp. 59–62. IEEE (2017)
Park, J., Jordan, A., Ryu, S.: Automatic modeling of opaque code for JavaScript static analysis. In: Hähnle, R., van der Aalst, W. (eds.) FASE 2019. LNCS, vol. 11424, pp. 43–60. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-16722-6_3
Sampaio, G., Fragoso Santos, J., Maksimović, P., Gardner, P.: A trusted infrastructure for symbolic analysis of event-driven web applications. In: 34th European Conference on Object-Oriented Programming (ECOOP 2020). LIPIcs, vol. 166, pp. 28:1–28:29. Schloss Dagstuhl-Leibniz-Zentrum für Informatik (2020)
Sotiropoulos, T., Livshits, B.: Static analysis for asynchronous JavaScript programs. In: Donaldson, A.F. (ed.) 33rd European Conference on Object-Oriented Programming, (ECOOP 2019). LIPIcs, vol. 134, pp. 8:1–8:30. Schloss Dagstuhl-Leibniz-Zentrum für Informatik (2019)
Sridharan, M., Dolby, J., Chandra, S., Schäfer, M., Tip, F.: Correlation tracking for points-to analysis of JavaScript. In: Noble, J. (ed.) ECOOP 2012. LNCS, vol. 7313, pp. 435–458. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-31057-7_20
Sun, K., Ryu, S.: Analysis of JavaScript programs: challenges and research trends. ACM Comput. Surv. 50(4), 59:1–59:34 (2017)
You, E.: Vue.js - The Progressive JavaScript Framework. https://vuejs.org. Accessed 18 Feb 2021
Zhang, G.: Specifying and model checking workflows of single page applications with TLA+. In: IEEE 20th International Conference on Software Quality, Reliability and Security Companion (QRS-C), pp. 406–410. IEEE (2020)
Zhang, G., Zhao, J.: Scenario testing of AngularJS-based single page web applications. In: Brambilla, M., Cappiello, C., Ow, S.H. (eds.) ICWE 2019. LNCS, vol. 11609, pp. 91–103. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-51253-8_10
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2021 Springer Nature Switzerland AG
About this paper
Cite this paper
Karakochev, A., Zhang, G. (2021). Static Analysis of Large-Scale JavaScript Front End. In: Brambilla, M., Chbeir, R., Frasincar, F., Manolescu, I. (eds) Web Engineering. ICWE 2021. Lecture Notes in Computer Science(), vol 12706. Springer, Cham. https://doi.org/10.1007/978-3-030-74296-6_36
Download citation
DOI: https://doi.org/10.1007/978-3-030-74296-6_36
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-74295-9
Online ISBN: 978-3-030-74296-6
eBook Packages: Computer ScienceComputer Science (R0)