Item type |
Trans(1) |
公開日 |
2015-06-02 |
タイトル |
|
|
タイトル |
CにLuaを容易に埋め込むための言語LuCa |
タイトル |
|
|
言語 |
en |
|
タイトル |
LuCa: A Language for embedding Lua in C |
言語 |
|
|
言語 |
jpn |
キーワード |
|
|
主題Scheme |
Other |
|
主題 |
[発表概要] |
資源タイプ |
|
|
資源タイプ識別子 |
http://purl.org/coar/resource_type/c_6501 |
|
資源タイプ |
journal article |
著者所属 |
|
|
|
電気通信大学大学院情報理工学研究科 |
著者所属 |
|
|
|
電気通信大学大学院情報理工学研究科 |
著者所属(英) |
|
|
|
en |
|
|
Graduate School of Informatics and Engineering, The University of Electro-Communications |
著者所属(英) |
|
|
|
en |
|
|
Graduate School of Informatics and Engineering, The University of Electro-Communications |
著者名 |
谷村, 明
岩崎, 英哉
|
著者名(英) |
Akira, Tanimura
Hideya, Iwasaki
|
論文抄録 |
|
|
内容記述タイプ |
Other |
|
内容記述 |
既存の多くのスクリプト言語は,Cプログラムとの連携を意図したAPIを提供している.特にスクリプト言語Luaは,CプログラムにLuaインタプリタが組み込まれることを前提にして設計されており,Cで実装された多くの既存のソフトウェアもLuaを組み込んでいる.しかし,CプログラムとLuaを連携する際,プログラマはCとLuaの間のデータのやりとりに煩雑なC APIを利用しなければならない.このことは,プログラマにとって実装コストの増加の原因となり,さらに,C APIの規約に従う必要がある結果,ソースコードの見通しも悪くなる.この問題を解決するため,我々はC言語を拡張し,LuaコードをCコード中に直接埋め込んで記述することのできる言語LuCaを提案し,その処理系を実装する.LuCaでは,埋め込まれたLuaコードからCコードの変数や関数にアクセスすることができる.そのため,C APIを陽に使うことなくLuaコードらしい自然な記述を行うことが可能になり,プログラマの負担を軽減することができる.LuCa処理系は与えられたLuCaコードをCコードへと変換する.Luaとの連携部分はC APIを適切に利用したコードとするため,LuCa処理系は特殊なCコンパイラや特殊なLua処理系を用意する必要はない.本発表では,LuCa言語の設計とその処理系の実装について述べる. |
論文抄録(英) |
|
|
内容記述タイプ |
Other |
|
内容記述 |
Most scripting languages provide C APIs that make these languages cooperate with programs written C. Especially, scripting language Lua is designed on the assumption that its interpreter is embedded in a C program. In fact, a lot of existing software written in C embed Lua interpreter. However, when embedding a Lua program in a C program, it is necessary for the programmer to use complicated C APIs provided by Lua for trasferring data between C and Lua. This increases the developing cost of programs within which C and Lua cooperate. Worse, obeying protocols of Lua's C APIs spoils the readability of source programs. To resolve this problem, we propose a new language LuCa that extends C to make it possible to embed Lua code directly, and implement a LuCa processor. In a LuCa program, embedded Lua code can access variables and fucntions in C. Thus, using LuCa enables the programmer to write Lua-like code without explicit C APIs and reduces the programmer's burden. LuCa processor converts a given LuCa code into a C code. Since cooperating part of C and Lua is converted into C code with existing C APIs, the LuCa processor does not require special C compiler and Lua interpreter. We describe LuCa language and the implementation of its processor. |
書誌レコードID |
|
|
収録物識別子タイプ |
NCID |
|
収録物識別子 |
AA11464814 |
書誌情報 |
情報処理学会論文誌プログラミング(PRO)
巻 8,
号 1,
p. 14-14,
発行日 2015-06-02
|
ISSN |
|
|
収録物識別子タイプ |
ISSN |
|
収録物識別子 |
1882-7802 |
出版者 |
|
|
言語 |
ja |
|
出版者 |
情報処理学会 |