Compilation as a Typed EDSL-to-EDSL Transformation
원문 초록
This article is about an implementation and compilation technique that is used in RAW-Feldspar which is a complete rewrite of the Feldspar embedded domain-specific language (EDSL) (Axelsson et al. 2010). Feldspar is high-level functional language that generates efficient C code to run on embedded targets. The gist of the technique presented in this post is the following: rather writing a back end that converts pure Feldspar expressions directly to C, we translate them to a low-level monadic EDSL. From the low-level EDSL, C code is then generated. This approach has several advantages: 1. The translation is simpler to write than a complete C back end. 2. The translation is between two typed EDSLs, which rules out many potential errors. 3. The low-level EDSL is reusable and can be shared between several high-level EDSLs. Although the article contains a lot of code, most of it is in fact reusable. As mentioned in Discussion, we can write the same implementation in less than 50 lines of code using generic libraries that we have developed to support Feldspar.
함께 살펴볼 논문
공통 태그를 근거로 연결했습니다. 실제 인용 관계나 논문의 우수성을 뜻하지 않습니다.
LLM-Assisted Translation of Legacy FORTRAN Codes to C++: A Cross-Platform Study
대규모 언어 모델을 이용한 프로그램 의미적 비동치 게임
Program Semantic Inequivalence Game with Large Language Models
대규모 언어 모델(LLM)은 일상적인 코딩 작업에서 강한 성능을 낼 수 있지만, 프로그램 의미에 대한 비자명한(non-trivial) 추론을 요구하는 복잡한 작업에서는 실패할 수 있다. LLM이 이러한 작업을 풀도록 가르치기 위한 학습 예시를 마련하는 것은 어려울 수 있다. 본 연구에서는 의미적 비동치 게임(semantic inequivalence game, SInQ)에 기반해 코드 추론 학습 데이터를 합성적으로 생성하는 방법을 탐구한다. 생성자 에이전트는 실제 프로그래밍 과제 데이터셋에서 파생된, 의미적으로 구별되는 프로그램 변형을 만들고, 평가자 에이전트는 두 변형이 서로 다르게 동작하는 입력 예시를 찾아야 한다. 에이전트들은 준적대적으로(semi-adversarially) 서로를 학습시키며 코드의 기저 논리를 이해하는 능력을 향상시킨다. 우리는 코드 생성 및 이해 벤치마크 여러 곳에서 접근법을 평가했으며, 여기에는 교차 언어 취약점 탐지(Lu et al., 2021)가 포함된다. 이 설정에서 우리 방법은 오직 Python 코드로만 학습했음에도 C/C++ 코드의 취약점 탐지를 개선하며, 까다로운 Python 내장 식별자 교체 벤치마크(Miceli Barone et al., 2023)에서는 최신 LLM이 여전히 이 벤치마크에서 어려움을 겪는 반면 우리 접근법이 상당한 개선을 보여준다. 실험 재현에 필요한 코드와 LLM 파인튜닝에 사용할 수 있는 생성된 합성 데이터를 공개한다.
CycleVAR: Repurposing Autoregressive Model for Unsupervised One-Step Image Translation
CycleDistill: Bootstrapping Machine Translation using LLMs with Cyclical Distillation
Gender Bias in English-to-Greek Machine Translation
Mutual-Supervised Learning for Sequential-to-Parallel Code Translation
토론
이 논문과 연결된 포럼 글이 아직 없습니다.