任何现实世界的体验调试生产功能程序? [英] Any real world experience debugging a production functional program?

查看:114
本文介绍了任何现实世界的体验调试生产功能程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很感兴趣的是在大规模功能程序中用于诊断缺陷的工具和方法。什么工具有用?我目前的理解是,printf调试(例如添加日志记录和重新部署)是通常使用的。



如果您完成了对功能系统的调试,那么有什么不同之处呢?然后调试用OO或程序语言构建的系统?

解决方案

可悲的是, printf 调试似乎是标准ML,Objective Caml和Haskell的实践状态。在交互式读取评估打印循环中有一点调试,但是一旦您的应用程序命中25,000或50,000行,这不太有用。



如果你很幸运要使用Haskell,有一个例外 QuickCheck 不可或缺的,用于测试和删除。 QuickCheck可以用于Haskell和C代码的组合,如 Xmonad窗口管理器的体验所证明的。



值得注意的是,在1990年左右,安德鲁·托马赫(Andrew Tolmach)为新泽西州的标准ML建立了一个非常漂亮的时差调试器,但不被认为值得维护。值得注意的是,OCaml调试器(也是时差调试器)在某种程度上仅仅使用字节码,这是不方便的,并且拒绝违反抽象障碍,这使得它变得无用。这是3.07左右的版本也许事情有所改善。



同样在20世纪90年代初,Henrik Nilsson为Haskell建立了一个有趣的调试器,但主要是它阻止调试器意外改变评估行为的程序。这是有趣的,但只是对于奢侈评估的挑战。



作为在所有这三种语言中构建或工作于大型应用程序的人,我发现


I'm interested in what tools and methods are used for diagnosing flaws in large scale functional programs. What tools are useful? My current understanding is that 'printf' debugging (e.g. add logging and redeploy) is what is typically used.

If you've done debugging of a functional system what was different about it then debugging a system built with an OO or procedural language?

解决方案

Sadly, printf debugging seems to be the state of practice for Standard ML, Objective Caml, and Haskell. There's a little bit of debugging at the interactive read-eval-print loop, but once your app hits 25,000 or 50,000 lines that's less useful.

If you're lucky enough to be using Haskell, there's an exception: QuickCheck is indispensible for testing and deubgging. QuickCheck can be used even on combinations of Haskell and C code, as demonstrated by experience with the Xmonad window manager.

It's worth noting that around 1990 Andrew Tolmach built a very nice time-travel debugger for Standard ML of New Jersey, but that it was not considered worth maintaining. It's also worth noting that at one point the OCaml debugger (also a time-travel debugger) worked only on bytecode, which was inconvneient, and refused to violate abstraction barriers, which made it useless. This was around release 3.07 or so; perhaps things have improved.

Also in the early 1990s, Henrik Nilsson built an interesting debugger for Haskell, but mostly what it did was prevent the debugger from accidentally changing the evaluation behavior of the program. This was interesting, but only to lavzy-evaluation weenies.

As someone who has built or worked on large applications in all three of these languages, I find the state of play depressing.

这篇关于任何现实世界的体验调试生产功能程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆