Skip to main content
QUICK REVIEW

[논문 리뷰] From Separate Compilation to Sound Language Composition

Federico Bruzzone, Walter Cazzola|arXiv (Cornell University)|2026. 02. 03.
Software Engineering ResearchComputer Science인용 수 0
한 줄 요약

본 논문은 Neverlang 언어 워크벤치를 위한 정적 데이터 흐름 분석 도구인 nlgcheck을 제시합니다. 이는 분리 컴파일 하에서 신뢰할 수 있는 속성 문법 사용을 가능하게 하며, 모듈성 손실 없이 컴파일 타임에 런타임 속성 오류를 탐지합니다.

ABSTRACT

The development of programming languages involves complex theoretical and practical challenges, particularly when addressing modularity and reusability through language extensions. While language workbenches aim to enable modular development under the constraints of the language extension problem, one critical constraint -- separate compilation -- is often relaxed due to its complexity. However, this relaxation undermines artifact reusability and integration with common dependency systems. A key difficulty under separate compilation arises from managing attribute grammars, as extensions may introduce new attributes that invalidate previously generated abstract syntax tree structures. Existing approaches, such as the use of dynamic maps in the Neverlang workbench, favor flexibility at the cost of compile-time correctness, leading to potential runtime errors due to undefined attributes. This work addresses this issue by introducing nlgcheck, a theoretically sound static analysis tool based on data-flow analysis for the Neverlang language workbench. nlgcheck detects potential runtime errors -- such as undefined attribute accesses -- at compile time, preserving separate compilation while maintaining strong static correctness guarantees. Experimental evaluation using mutation testing on Neverlang-based projects demonstrates that nlgcheck effectively enhances robustness without sacrificing modularity or flexibility and with a level of performance that does not impede its adoption in daily development activities.

연구 동기 및 목표

  • 속성 문법으로 모듈식 언어 설계를 가능하게 하면서 분리 컴파일을 유지하는 과제를 다룬다.
  • Neverlang으로 구축된 언어 구성에서 잠재적인 런타임 속성 오류를 탐지하는 정적 분석 도구를 제공한다.
  • 런타임 속성 오류를 피함으로써 모듈성을 보존하고 일반적인 의존성 워크플로를 지원한다.
  • 실제 Neverlang 프로젝트에서 견고성과 실용성을 입증하기 위해 경험적으로 평가한다.

제안 방법

  • Neverlang의 의미 행동을 CFG 기반 표현으로 속성 사용을 모델링한다.
  • 속성을 타입에 매핑하고 데이터 흐름 분석을 통해 잠재적 접근을 분석하는 검증 프레임워크를 정의한다.
  • 의미 행동의 CFG를 활용하여 Neverlang 프레임워크 내에서 분석을 nlgcheck으로 구현한다.
  • 제어 의존성 및 데이터 의존성과 같은 프로그램 의존성 분석 개념에 모델을 기반으로 한다.
  • 의미 행동의 바이트코드로부터 파생된 CFG를 분석하기 위해 Soot 프레임워크와 통합한다.
  • 오류 탐지 능력을 평가하기 위해 Neverlang 프로젝트에 대한 변이 테스트를 수행한다.

실험 결과

연구 질문

  • RQ1정적 데이터 흐름 분석이 Neverlang의 분리 컴파일 설정에서 정의되지 않은 속성 접근 및 유사한 런타임 오류를 탐지할 수 있는가?
  • RQ2nlgcheck가 컴파일 타임 정확성을 보장하면서 모듈성 및 유연성을 보존하는가?
  • RQ3실제 Neverlang 기반 개발 워크플로우에서 nlgcheck의 실용적인 성능 영향은 무엇인가?
  • RQ4기존 시스템에서 동적 속성 맵으로 인해 발생하는 런타임 오류와 비교하여 이 접근법은 어떤가?
  • RQ5정적 분석이 언어 구성 전반에 걸친 속성 관련 정합성 보장을 어느 정도까지 다룰 수 있는가?

주요 결과

  • nlgcheck은 Neverlang에서 분리 컴파일 하에 속성 사용에 대한 정적 정합성 보장을 제공합니다.
  • 이 접근법은 컴파일 타임에 정의되지 않은 속성 접근과 같은 잠재적 런타임 오류를 포착하여 런타임 실패를 줄입니다.
  • 실험적 변이 테스트는 모듈성이나 유연성을 희생하지 않으면서 견고성이 향상되었음을 시사합니다.
  • 분석 결과가 일상적인 개발 활동과 호환되는 성능을 보여줍니다.
  • 이 프레임워크는 분리 컴파일을 지원하는 언어 워크벤치를 필요로 하는 정적 분석 기능과의 연결 고리 역할을 합니다.

이 논문 읽기

누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.

누빈트에서 이 논문 읽기

이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.