arXiv (Cornell University) · 2018 · 17 citations · 17 references
ComputingComputer EngineeringComputer ScienceComputational LinguisticsNatural Language ProcessingOperating SystemsAbstract Syntax TreesControl-flow AnalysisData-flow AnalysisCode Similarity AnalysisFunctional Equivalence AssessmentInitializationSpecification MiningSpecification Mining For SecuritySymmetric-key EncryptionVector Space Models
Identifying the relationships among program elements is useful for program understanding, debugging, and analysis. One such relationship is synonymy. Function synonyms are functions that play a similar role in code, e.g. functions that perform initialization for different device drivers, or functions that implement different symmetric-key encryption schemes. Function synonyms are not necessarily semantically equivalent and can be syntactically dissimilar; consequently, approaches for identifying code clones or functional equivalence cannot be used to identify them. This paper presents func2vec, an algorithm that maps each function to a vector in a vector space such that function synonyms are grouped together. We compute the function embedding by training a neural network on sentences generated from random walks over an encoding of the program as a labeled pushdown system (l-PDS). We demonstrate that func2vec is effective at identifying function synonyms in the Linux kernel. Furthermore, we show how function synonyms enable mining error-handling specifications with high support in Linux file systems and drivers.
17
Laurens van der Maaten, Geoffrey E. Hinton · Journal of Machine Learning Research · 2008 · 35.7K citations
Efficient Estimation of Word Representations in Vector Space
Tomáš Mikolov, Kai Chen, Greg S. Corrado et al. · arXiv (Cornell University) · 2013 · 11.7K citations · Full text
Software Framework for Topic Modelling with Large Corpora
Petr Sojka · 2010 · 3.8K citations · Full text
A Generalized Solution of the Orthogonal Procrustes Problem
Peter H. Schönemann · Psychometrika · 1966 · 2.1K citations