https://www.mdu.se/

mdu.sePublications
Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
Polyglot AST: Towards Enabling Polyglot Code Analysis
Univ. Rennes, Irisa, Inria, Rennes, France.
Univ. Rennes, Irisa, Inria, Cnrs, Rennes, France.
Univ. Rennes, Esir, Rennes, France.
Mälardalen University, School of Innovation, Design and Engineering, Innovation and Product Realisation.ORCID iD: 0000-0002-1863-3987
Show others and affiliations
2023 (English)In: Proc IEEE Int Conf Eng Complex Comput Syst ICECCS, Institute of Electrical and Electronics Engineers Inc. , 2023, p. 116-125Conference paper, Published paper (Refereed)
Abstract [en]

Today, a plethora of programming languages exists, each better suited for a particular concern. For example, Python is suited for data analysis but not web development, whereas JavaScript is the inverse. As software complexity grows and needs to address multiple concerns, different programming languages are often used in combination, despite the burden of bridging them (e.g., using Java Native Interface). Polyglot programming emerged as a solution allowing the seamless mixing of multiple programming languages. GraalVM and PolyNote are examples of runtimes allowing polyglot programming. However, there is a striking lack of support at design time for building and analyzing polyglot code. To the best of our knowledge, there is no uniform language-agnostic way of reasoning over multiple languages to provide seamless code analysis, since each language comes with its own form of Abstract Syntax Trees (AST). In this paper, we present an approach to build a uniform yet polyglot AST over polyglot code, so that it is easier to perform global analysis. We first motivate this challenge and identify the main requirements for building a polyglot AST. We then propose a proof of concept implementation of our solutions on GraalVM's polyglot API. On top of the polyglot AST, we demonstrate the ability to implement several polyglot-specific analysis services, namely auto-completion, consistency checking, type inference, and rename refactoring. Our evaluation on three polyglot projects taken from GitHub, and involving JavaScript and Python code, shows that we can build a polyglot AST without significant overhead. We also demonstrate the usefulness of the polyglot analysis services through the provided automation, as well as their scalability.

Place, publisher, year, edition, pages
Institute of Electrical and Electronics Engineers Inc. , 2023. p. 116-125
Keywords [en]
code analysis, development tooling, polyglot programming, Codes (symbols), High level languages, Python, Abstract Syntax Trees, Design time, Java Native Interfaces, Javascript, Runtimes, Software complexity, Web development, Trees (mathematics)
National Category
Computer and Information Sciences
Identifiers
URN: urn:nbn:se:mdh:diva-65153DOI: 10.1109/ICECCS59891.2023.00023Scopus ID: 2-s2.0-85179510509ISBN: 9798350340044 (print)OAI: oai:DiVA.org:mdh-65153DiVA, id: diva2:1821859
Conference
Proceedings of the IEEE International Conference on Engineering of Complex Computer Systems, ICECCS
Available from: 2023-12-21 Created: 2023-12-21 Last updated: 2023-12-21Bibliographically approved

Open Access in DiVA

No full text in DiVA

Other links

Publisher's full textScopus

Authority records

Jongeling, Robbert

Search in DiVA

By author/editor
Jongeling, Robbert
By organisation
Innovation and Product Realisation
Computer and Information Sciences

Search outside of DiVA

GoogleGoogle Scholar

doi
isbn
urn-nbn

Altmetric score

doi
isbn
urn-nbn
Total: 27 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf