跳到正文
EasyXiv 检索
投稿 关于 登录

按回车检索 · 直接输入编号(如 1706.03762)可跳转到论文

计算机科学 > 人机交互

arXiv:2006.16743 (cs)
[提交于 2020年6月18日]

标题:Learning to Format Coq Code Using Language Models

作者:Pengyu Nie, Karl Palmskog, Junyi Jessy Li, Milos Gligoric
查看论文《Learning to Format Coq Code Using Language Models》的 PDF
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读
摘要:Should the final right bracket in a record declaration be on a separate line? Should arguments to the rewrite tactic be separated by a single space? Coq code tends to be written in distinct manners by different people and teams. The expressiveness, flexibility, and extensibility of Coq's languages and notations means that Coq projects have a wide variety of recognizable coding styles, sometimes explicitly documented as conventions on naming and formatting. In particular, even inexperienced users can distinguish vernacular using the standard library and plain Ltac from idiomatic vernacular using the Mathematical Components (MathComp) library and SSReflect. While coding conventions are important for comprehension and maintenance, they are costly to document and enforce. Rule-based formatters, such as Coq's beautifier, have limited flexibility and only capture small fractions of desired conventions in large verification projects. We believe that application of language models - a class of Natural Language Processing (NLP) techniques for capturing regularities in corpora - can provide a solution to this conundrum. More specifically, we believe that an approach based on automatically learning conventions from existing Coq code, and then suggesting idiomatic code to users in the proper context, can be superior to manual approaches and static analysis tools - both in terms of effort and results. As a first step, we here outline initial models to learn and suggest space formatting in Coq files, with a preliminary implementation for Coq 8.10, and evaluated on a corpus based on MathComp 1.9.0 which comprises 164k lines of Coq code from four core projects.
评论: Accepted in the Coq Workshop 2020
主题: 人机交互 (cs.HC); 计算与语言 (cs.CL); 程序设计语言 (cs.PL); 软件工程 (cs.SE)
引用方式: arXiv:2006.16743 [cs.HC]
  (或者 arXiv:2006.16743v1 [cs.HC] 对于此版本)
  https://doi.org/10.48550/arXiv.2006.16743

提交历史

来自:Pengyu Nie
[v1] 2020年6月18日 星期四 14:46:15 UTC
全文链接:

访问论文:

  • 查看原文 PDF
  • 中文 PDF (下批处理)
  • EasyResearch 阅读
  • TeX 源文件
  • arXiv 原文页面
查看许可

当前浏览上下文:

cs.HC
< 上一篇   |   下一篇 >
最新 | 近期 | 2020-06
切换浏览方式为:
cs
cs.CL
cs.PL
cs.SE

参考文献与引用

  • Google Scholar
  • Semantic Scholar

BibTeX 格式的引用

EasyXiv 是独立运营的中文预印本站点,与 arXiv 及康奈尔大学无隶属关系。 论文元数据与原文来自 arXiv.org,感谢 arXiv 提供开放获取服务。
关于 · 帮助 · 投稿指南 · 版权 · arXiv 原站