当前位置: X-MOL 学术J. Funct. Program. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Explainable dynamic programming
Journal of Functional Programming ( IF 1.1 ) Pub Date : 2021-05-18 , DOI: 10.1017/s0956796821000083
MARTIN ERWIG , PRASHANT KUMAR

In this paper, we present a method for explaining the results produced by dynamic programming (DP) algorithms. Our approach is based on retaining a granular representation of values that are aggregated during program execution. The explanations that are created from the granular representations can answer questions of why one result was obtained instead of another and therefore can increase the confidence in the correctness of program results. Our focus on dynamic programming is motivated by the fact that dynamic programming offers a systematic approach to implementing a large class of optimization algorithms which produce decisions based on aggregated value comparisons. It is those decisions that the granular representation can help explain. Moreover, the fact that dynamic programming can be formalized using semirings supports the creation of a Haskell library for dynamic programming that has two important features. First, it allows programmers to specify programs by recurrence relationships from which efficient implementations are derived automatically. Second, the dynamic programs can be formulated generically (as type classes), which supports the smooth transition from programs that only produce result to programs that can run with granular representation and also produce explanations. Finally, we also demonstrate how to anticipate user questions about program results and how to produce corresponding explanations automatically in advance.

中文翻译:

可解释的动态规划

在本文中,我们提出了一种解释动态规划(DP)算法产生的结果的方法。我们的方法基于保留在程序执行期间聚合的值的精细表示。从粒度表示创建的解释可以回答为什么获得一个结果而不是另一个结果的问题,因此可以增加对程序结果正确性的信心。我们对动态规划的关注是因为动态规划提供了一种系统化的方法来实现一大类优化算法,这些算法基于聚合值比较产生决策。粒度表示可以帮助解释这些决定。而且,动态规划可以使用半环形式化这一事实支持创建用于动态规划的 Haskell 库,该库具有两个重要特性。首先,它允许程序员通过递归关系来指定程序,从这些递归关系中自动派生出有效的实现。其次,动态程序可以被通用地制定(作为类型类),它支持从只产生结果的程序到可以以粒度表示运行并产生解释的程序的平滑过渡。最后,我们还演示了如何预测用户关于程序结果的问题,以及如何提前自动生成相应的解释。它允许程序员通过递归关系指定程序,从中自动派生出有效的实现。其次,动态程序可以被通用地制定(作为类型类),它支持从只产生结果的程序到可以以粒度表示运行并产生解释的程序的平滑过渡。最后,我们还演示了如何预测用户关于程序结果的问题,以及如何提前自动生成相应的解释。它允许程序员通过递归关系指定程序,从中自动派生出有效的实现。其次,动态程序可以被通用地制定(作为类型类),它支持从只产生结果的程序到可以以粒度表示运行并产生解释的程序的平滑过渡。最后,我们还演示了如何预测用户关于程序结果的问题,以及如何提前自动生成相应的解释。
更新日期:2021-05-18
down
wechat
bug