paperbot · PL 论文追踪

全部论文 待读 收藏

P2 OCaml Blockly

OCaml Blockly
JFP vol.352025匹配度 2/10 · 该论文是面向 OCaml 教学的块编程环境,核心是利用作用域与类型规则保证生成代码可编译,属于 PL/教育工具方向;与用户关注的静态分析用于 ML/Agent、LLM 改进静态分析/形式化验证、浮点或贝叶斯程序分析等核心方向基本无关。引用 2 inbox
KENICHI ASAI
crossref: 2026-09-10

AI 速览

一句话:开发了理解 OCaml 作用域与类型规则的块编程环境,使完整块程序生成的 OCaml 代码保证可编译。

OCaml Blockly 是一个基于 Google Blockly 构建的块编程环境,面向函数式语言 OCaml 的一个子集。其核心特点是内建 OCaml 的作用域规则和类型规则:用户拼搭出的完整程序对应的 OCaml 代码不会出现语法错误、作用域错误或类型错误。系统覆盖 OCaml 入门构造,足以编写东京地铁网络最短路问题。论文介绍了 OCaml Blockly 的设计,并说明其在计算机专业函数式编程课程中的使用方式。

问题
如何在块编程环境中支持带作用域和类型规则的函数式语言,使初学者无需处理语法、作用域或类型错误即可构建可编译的 OCaml 程序。
方法
基于 Google Blockly 实现 OCaml 子集的块编程环境,将 OCaml 的作用域与类型规则集成到块编辑器中,并覆盖可表达东京地铁最短路问题所需的入门构造。
评估
通过展示完整块程序能生成可编译的 OCaml 代码,并以东京地铁最短路问题和计算机专业函数式编程课程中的应用说明其实用性。
原文摘要(Abstract)

Abstract OCaml Blockly is a block-based programming environment for a subset of the functional language OCaml, developed based on Google Blockly. The distinct feature of OCaml Blockly is that it knows the scoping and typing rules of OCaml. As such, for any complete program in OCaml Blockly, its OCaml counterpart compiles: it is free from syntax errors, scoping errors, and type errors. OCaml Blockly supports introductory constructs of OCaml that are sufficient to write the shortest path problem for the Tokyo metro network. This paper describes the design of OCaml Blockly and how it is used in a CS-major course on functional programming.

链接与引用

DOI 原文 · PDF(开放获取) · DBLP

BibTeX
@article{Asai25,
  title = {OCaml Blockly},
  author = {KENICHI ASAI},
  journal = {Journal of Functional Programming},
  volume = {35},
  year = {2025},
  doi = {10.1017/s0956796825000073}
}