We present a small, formal language for specifying the behavior of simple console I/O programs. The design is driven by the concrete application case of testing interactive Haskell programs written by students. Specifications are structurally similar to lexical analysis regular expressions, but are augmented with features like global variables that track state and history of program runs, enabling expression of an interesting range of dynamic behavior. We give a semantics for our specification language based on acceptance of execution traces. From this semantics we derive a definition of the set of all traces valid for a given specification. Sampling that set enables us to mechanically check program behavior against specifications in a probabilistic fashion. Beyond testing, other possible uses of the specification language in an education context include related activities like providing more helpful feedback, generating sample solutions, and even generating random exercise tasks.


翻译:我们为指定简单的控制台 I/ O 程序的行为提供了一种小的、正式的语言。 设计是由测试学生编写的交互式哈斯凯尔程序的具体应用案例驱动的。 规格在结构上类似于常规语言分析, 但增加了一些特征, 比如跟踪程序运行状态和历史的全球变量, 使得能够表达一系列有趣的动态行为。 我们根据接受执行痕迹, 给我们的规格语言提供了一种语义。 我们从这个语义中得出了对特定规格有效的所有痕迹的定义 。 抽样让我们能够机械地检查程序行为与规格的概率化方式。 除了测试之外, 在教育背景下, 规格语言的其他可能用途包括相关活动, 比如提供更有用的反馈, 生成样本解决方案, 甚至产生随机练习任务 。

0
下载
关闭预览

相关内容

Haskell 是一种纯函数式编程语言,于 1990 年在编程语言 Miranda 的基础上标准化,并且以 λ 演算为基础发展而来。
ACL2020接受论文列表公布,571篇长文208篇短文
专知会员服务
66+阅读 · 2020年5月19日
【微众银行】联邦学习白皮书_v2.0,48页pdf,
专知会员服务
163+阅读 · 2020年4月26日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
144+阅读 · 2019年10月12日
2019年机器学习框架回顾
专知会员服务
35+阅读 · 2019年10月11日
【SIGGRAPH2019】TensorFlow 2.0深度学习计算机图形学应用
专知会员服务
39+阅读 · 2019年10月9日
计算机 | IUI 2020等国际会议信息4条
Call4Papers
6+阅读 · 2019年6月17日
CCF推荐 | 国际会议信息10条
Call4Papers
7+阅读 · 2019年5月27日
已删除
将门创投
6+阅读 · 2019年1月11日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
分布式TensorFlow入门指南
机器学习研究会
4+阅读 · 2017年11月28日
【推荐】自然语言处理(NLP)指南
机器学习研究会
35+阅读 · 2017年11月17日
计算机类 | 国际会议信息7条
Call4Papers
3+阅读 · 2017年11月17日
Capsule Networks解析
机器学习研究会
10+阅读 · 2017年11月12日
Auto-Encoding GAN
CreateAMind
7+阅读 · 2017年8月4日
Arxiv
0+阅读 · 2020年10月14日
Arxiv
0+阅读 · 2020年10月13日
Arxiv
0+阅读 · 2020年10月9日
Arxiv
6+阅读 · 2018年3月28日
VIP会员
相关资讯
计算机 | IUI 2020等国际会议信息4条
Call4Papers
6+阅读 · 2019年6月17日
CCF推荐 | 国际会议信息10条
Call4Papers
7+阅读 · 2019年5月27日
已删除
将门创投
6+阅读 · 2019年1月11日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
分布式TensorFlow入门指南
机器学习研究会
4+阅读 · 2017年11月28日
【推荐】自然语言处理(NLP)指南
机器学习研究会
35+阅读 · 2017年11月17日
计算机类 | 国际会议信息7条
Call4Papers
3+阅读 · 2017年11月17日
Capsule Networks解析
机器学习研究会
10+阅读 · 2017年11月12日
Auto-Encoding GAN
CreateAMind
7+阅读 · 2017年8月4日
Top
微信扫码咨询专知VIP会员