Download PDFOpen PDF in browser

Automated Generation of Stand-Alone Codes for Software Libraries

10 pagesPublished: October 4, 2021

Abstract

Networks are pervasive in society: infrastructures (e.g., telephone), commercial sectors (e.g., banking), and biological and genomic systems can be represented as networks. Con- sequently, there are software libraries that analyze networks. Containers (e.g., Docker, Singularity), which hold both runnable codes and their execution environments, are in- creasingly utilized by analysts to run codes in a platform-independent fashion. Portability is further enhanced by not only providing software library methods, but also the driver code (i.e., main() method) for each library method. In this way, a user only has to know the invocation for the main() method that is in the container. In this work, we describe an automated approach for generating a main() method for each software library method. A single intermediate representation (IR) format is used for all library methods, and one IR instance is populated for one library method by parsing its comments and method signature. An IR for the main() method is generated from that for the library method. A source code generator uses the main() method IR and a set of small, hand-generated source code templates—with variables in the templates that are automatically customized for a particular library method—to produce the source code main() method. We apply our approach to two widely used software libraries, SNAP and NetworkX, as examplars, which combined have over 400 library methods.

Keyphrases: automated source code generation, cyberinfrastructure, network science, software libraries

In: Frederick Harris, Rui Wu and Alex Redei (editors). Proceedings of ISCA 30th International Conference on Software Engineering and Data Engineering, vol 77, pages 80-89.

BibTeX entry
@inproceedings{SEDE2021:Automated_Generation_Stand_Alone,
  author    = {Lucas Machi and Henry Carscadden and Chris Kuhlman and Dustin Machi and S. S. Ravi},
  title     = {Automated Generation of Stand-Alone Codes for Software Libraries},
  booktitle = {Proceedings of ISCA 30th International Conference on Software Engineering and Data Engineering},
  editor    = {Frederick Harris and Rui Wu and Alex Redei},
  series    = {EPiC Series in Computing},
  volume    = {77},
  publisher = {EasyChair},
  bibsource = {EasyChair, https://easychair.org},
  issn      = {2398-7340},
  url       = {/publications/paper/2dWf},
  doi       = {10.29007/2kx6},
  pages     = {80-89},
  year      = {2021}}
Download PDFOpen PDF in browser