본문 바로가기
bar_progress

Text Size

Close

KAIST "US Department of Defense Also Takes Notice... World's First Development of 'C-Rust' Conversion Technology"

Professor Seokyoung Ryu's research team (Programming Languages Laboratory) at KAIST's School of Computing has developed the world's first technology to convert C language unions into Rust's tagged unions.


KAIST "US Department of Defense Also Takes Notice... World's First Development of 'C-Rust' Conversion Technology" (From left) Professor Ryu Seok-young, Hong Jae-min, Integrated Master's and Doctoral Program. Provided by KAIST

A union is a core feature of the C language that stores multiple types of data in the same memory space to improve memory efficiency. However, it has the drawback of not distinguishing the type of stored data, which can cause memory issues.


This is considered a critical problem in memory allocation and management, and the White House and the U.S. Department of Defense urge the use of safe languages like Rust to prevent such memory problems.


In contrast, tagged unions attach tags to the various types of data stored in the same space to distinguish them, preventing memory issues. Tagged unions are gaining attention as they can complement the C language, which is mainly used to write software for operating computer systems.


The conversion technology developed by the research team is a new program analysis technique specialized for C language unions, enabling automatic translation into Rust's tagged unions.


Rust is a programming language developed since 2015. It is used in operating system and web browser development, and in 2022, it officially began to be used in Linux development. Unlike C, Rust can detect and prevent memory issues before program execution.


However, due to the significant gap between C and Rust, there are very few successful cases worldwide of developing C-to-Rust code translation technology, and those that exist mostly focus on converting pointers (functions that represent data storage locations).


KAIST "US Department of Defense Also Takes Notice... World's First Development of 'C-Rust' Conversion Technology" Diagram of the entire process of the translation technique proposed by the research team. Provided by KAIST

On the other hand, the research team is leading C-to-Rust code translation technology by consecutively proposing techniques to convert several core features of the C language.


Previously, the team developed the world's first technologies to convert C's mutex (a function necessary for program synchronization) and output parameters (functions used to deliver calculation results) into Rust in May last year and June this year, respectively, and presented these at top international conferences such as the International Conference on Software Engineering (ICSE) and the Programming Language Design and Implementation (PLDI) conference.


This research was conducted with support from the National Research Foundation of Korea's Leading Research Center, Mid-career Researcher Support Program, Institute for Information & Communications Technology Planning & Evaluation (IITP), and Samsung Electronics.


The research results, with KAIST School of Computing integrated master's and doctoral student Jaemin Hong as the first author, were also accepted at the prestigious International Conference on Automated Software Engineering (ASE).


Professor Ryu said, "Aiming to create safe software, we recognized early the importance of C-to-Rust code translation and have actively incorporated various programming language techniques into code translation. Since many challenges remain to achieve complete automatic translation, we will continue to devote ourselves to follow-up research."


Meanwhile, in February, the White House urged the cessation of C language use, and the U.S. Defense Advanced Research Projects Agency (DARPA) announced a research project to develop technology that automatically translates code written in C into Rust.


DARPA emphasized the need to use safe languages like Rust to prevent memory problems in C language while proposing this project. This underscores the attention being paid to 'C-to-Rust' translation technology in the United States as well.


© The Asia Business Daily(www.asiae.co.kr). All rights reserved.

Special Coverage


Join us on social!

Top