코드 그래프에 대한 동적 종속성을 모델링하여 프로그램 실행을 예측하는 방법 학습
Learning to Predict Program Execution by Modeling Dynamic Dependency on Code Graphs
August 5, 2024
저자: Cuong Chi Le, Hoang Nhat Phan, Huy Nhat Phan, Tien N. Nguyen, Nghi D. Q. Bui
cs.AI
초록
실행 없이 프로그램 동작을 예측하는 것은 소프트웨어 공학에서 중요하고 어려운 작업입니다. 기존 모델은 종종 코드 내의 동적 종속성과 상호작용을 포착하는 데 어려움을 겪습니다. 본 논문은 동적 종속성 학습을 통해 코드 커버리지를 예측하고 런타임 오류를 감지하는 새로운 기계 학습 기반 프레임워크인 CodeFlowrepresents를 소개합니다. 제어 흐름 그래프(CFGs)를 활용하여 CodeFlowrepresents는 모든 가능한 실행 경로와 서로 다른 문장 간의 관계를 나타내며 프로그램 동작에 대한 포괄적인 이해를 제공합니다. 이는 실행 경로를 묘사하기 위해 CFGs를 구성하고 CFG 노드에 대한 벡터 표현을 학습하여 정적 제어 흐름 종속성을 포착합니다. 더불어 실행 추적을 통해 동적 종속성을 학습하여 실행 중 문장 간의 영향을 반영합니다. 이 접근 방식은 코드 커버리지의 정확한 예측과 런타임 오류의 식별을 가능케 합니다. 경험적 평가 결과, 코드 커버리지 예측 정확도와 런타임 오류의 효과적인 지역화에서 현재 모델을 능가하는 상당한 개선이 나타났습니다.
English
Predicting program behavior without execution is an essential and challenging
task in software engineering. Traditional models often struggle to capture
dynamic dependencies and interactions within code. This paper introduces a
novel machine learning-based framework called CodeFlowrepresents, which
predicts code coverage and detects runtime errors through Dynamic Dependencies
Learning. Utilizing control flow graphs (CFGs), CodeFlowrepresents all possible
execution paths and the relationships between different statements, offering a
comprehensive understanding of program behavior. It constructs CFGs to depict
execution paths and learns vector representations for CFG nodes, capturing
static control-flow dependencies. Additionally, it learns dynamic dependencies
through execution traces, which reflect the impacts among statements during
execution. This approach enables accurate prediction of code coverage and
identification of runtime errors. Empirical evaluations show significant
improvements in code coverage prediction accuracy and effective localization of
runtime errors, surpassing current models.Summary
AI-Generated Summary