了解MagicHaskeller如何生成函数

时间:2016-08-16 11:09:02

标签: haskell

我偶然发现了这个产品:http://nautilus.cs.miyazaki-u.ac.jp/~skata/MagicHaskeller.html并且非常感动它可以通过提供规范来生成函数。

阅读关于MagicHaskeller的论文:https://www.haskell.org/haskell-symposium/2013/magichaskeller.pdf提供了一个如何运作的线索:

The backend server does the actual program synthesis. The synthesis
algorithm takes a generate-and-test approach: it generates an
infinite stream of all the expressions having the same type as f;
then, they are tested against the given predicate. The implementation
is based on [2] which discusses how to efficiently generate a
stream of expressions with the given type using memoization, and
[3] which discusses how to remove semantically equivalent expressions.
There are also new devices to reduce heap usage further.

我目前正在学习Haskell,我认为学习基本类似的MagicHaskeller是学习语言的一种非常有趣的方式。

我可以利用MagicHaskeller背后的特定概念来执行类似的操作吗?

0 个答案:

没有答案