WEKO3
アイテム
代数的データ型から型定義とバイナリ形式へのデコーダとエンコーダのコード生成
https://ipsj.ixsq.nii.ac.jp/records/211067
https://ipsj.ixsq.nii.ac.jp/records/211067da89219e-9191-428c-9f51-ddb9b9d0fc86
名前 / ファイル | ライセンス | アクション |
---|---|---|
![]() |
Copyright (c) 2021 by the Information Processing Society of Japan
|
|
オープンアクセス |
Item type | Trans(1) | |||||||
---|---|---|---|---|---|---|---|---|
公開日 | 2021-05-12 | |||||||
タイトル | ||||||||
タイトル | 代数的データ型から型定義とバイナリ形式へのデコーダとエンコーダのコード生成 | |||||||
タイトル | ||||||||
言語 | en | |||||||
タイトル | Code Generation for Type Definitions, Binary Format Decoders, and Encoders from Algebraic Data Types | |||||||
言語 | ||||||||
言語 | jpn | |||||||
キーワード | ||||||||
主題Scheme | Other | |||||||
主題 | [発表概要, Unrefereed Presentatin Abstract] | |||||||
資源タイプ | ||||||||
資源タイプ識別子 | http://purl.org/coar/resource_type/c_6501 | |||||||
資源タイプ | journal article | |||||||
著者所属 | ||||||||
東京電機大学未来科学部情報メディア学科実空間コンピューティング研究室 | ||||||||
著者所属(英) | ||||||||
en | ||||||||
Cyber Phisical System Lab, Department of Information Systems and Multimedia Design, School of Science and Technology for Future Life, Tokyo Denki University | ||||||||
著者名 |
鳴海, 秀人
× 鳴海, 秀人
|
|||||||
著者名(英) |
Hideto, Narumi
× Hideto, Narumi
|
|||||||
論文抄録 | ||||||||
内容記述タイプ | Other | |||||||
内容記述 | Webアプリのクライアントとサーバの通信にはHTTP,WebSocketsなどを使用し,データをやりとりする.実際にわたすのはバイナリ形式でクライアントとサーバでは何らかの方法でアプリでやりとりするデータをバイナリ形式にエンコード,デコードする必要がある.アプリのデータ型からバイナリ形式に変換できるものとしてJSON,XML,Protocol Buffersなどが用いられる.JSON,XMLはテキストデータであり,画像などのバイナリデータを含めるにはbase64などの形式をさらに介さなければならないため容量が大きくなり,クライアントとサーバで別の言語を使用した場合はデータ型の辻褄を合わせる必要がある.Protocol Buffersは独自のスキーマ形式で記述し,画像などのバイナリデータのサイズを維持し,言語間の辻褄が合わせを行ってくれるが,代数的データ型を直接含めることはできない.代数的データ型はありえないパターンを減らして,データを分かりやすく扱えるものだ.この研究で作成したdefiny-coreのコード生成機能を使えば1つの定義で型定義とバイナリ形式へのデコーダ,エンコーダのコードを生成できる.スキーマの定義とコード生成はコードで行うため,既存言語の入力支援の恩恵を受けることができ,エディタ拡張機能を用意する必要がなく,コードを生成する順番など柔軟に対応できる.現在TypeScriptのコード生成のみサポートしている.definy-core自身の型定義もdefiny-coreを用いて作られている.Webアプリケーションのために開発したが,それ以外の用途でも使用可能. | |||||||
論文抄録(英) | ||||||||
内容記述タイプ | Other | |||||||
内容記述 | The client and the server communicate using communication methods such as HTTP and WebSockets to exchange data. What is passed is in binary format, and the client and the server need to encode and decode the data exchanged by the application in some way to the binary format. JSON, XML, Protocol Buffers, etc. are used as the ones that can be converted from the application data type to binary format. JSON and XML are text data, and if you want to include binary data such as images, you need to use a format such as base64, which will increase the size of the data. Protocol buffers have their schema and maintain the size of binary data such as images, and do not need to write multiple languages, can not include algebraic data types directly. Algebraic data types are designed to reduce impossible patterns and to make the data easier to understand. The code generator of definy-core, which we have developed in this study, allows us to generate type definitions and codes for decoders and encoders to binary formats with a single definition. Since the schema definition and code generation are done in code, we can benefit from the input support of the existing languages and there is no need to provide editor extensions and the order of code generation is flexible. Currently, only TypeScript code generation is supported. Definy-core's type definitions are also made with definy-core. Although it is designed for web applications, it can be used for other purposes as well. | |||||||
書誌レコードID | ||||||||
収録物識別子タイプ | NCID | |||||||
収録物識別子 | AA11464814 | |||||||
書誌情報 |
情報処理学会論文誌プログラミング(PRO) 巻 14, 号 2, p. 28-28, 発行日 2021-05-12 |
|||||||
ISSN | ||||||||
収録物識別子タイプ | ISSN | |||||||
収録物識別子 | 1882-7802 | |||||||
出版者 | ||||||||
言語 | ja | |||||||
出版者 | 情報処理学会 |