paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Bottom-up computation using trees of sublists

使用子列表树的自底向上计算
JFP vol.342024匹配度 1/10 · 该论文属于函数式编程与算法推导,讨论列表自底向上计算及 Pascal 三角对角线性质,与用户关注的面向 ML/Agentic 程序的静态分析、LLM 辅助静态分析/形式化验证、浮点程序分析、贝叶斯程序分析均无直接交集。引用 0 inbox
SHIN-CHENG MU
crossref: 2026-09-10

AI 速览

一句话:为 Bird 的列表自底向上计算算法给出形式推导,并揭示其依赖的 Pascal 三角对角线性质。

某些自顶向下的问题规约在直接执行时会反复计算相同子问题。为支持自底向上算法,需要将子问题的解存入表格复用,但表格的表示与高效维护往往并不简单。本文研究一个特殊情形:函数 h 以列表为输入,且 h xs 由 xs 的所有直接子列表定义。Bird 在 2008 年给出过一个简洁但晦涩的算法,本文重新给出清晰的推导,并发现使该算法成立的关键性质。所导出的算法构造具有特定形状的树,其左脊上的大小对应 Pascal 三角中某条对角线的前缀;核心函数则把一条对角线变换到下一条。

问题
直接执行自顶向下规约会重复计算子问题;如何表示并高效维护子问题解表,以对由所有直接子列表定义的列表函数实现自底向上计算。
方法
以形式推导重新分析 Bird 2008 算法,发现关键性质,并构造左脊大小对应 Pascal 三角对角线前缀的树,核心变换将一条对角线推进到下一条。
评估
通过算法推导和关键性质分析论证正确性与机制,属于理论工作,未涉及实验评估。
原文摘要(Abstract)

Abstract Some top-down problem specifications, if executed, may compute sub-problems repeatedly. Instead, we may want a bottom-up algorithm that stores solutions of sub-problems in a table to be reused. How the table can be represented and efficiently maintained, however, can be tricky. We study a special case: computing a function ${\mathit{h}}$ taking lists as inputs such that ${\mathit{h}\;\mathit{xs}}$ is defined in terms of all immediate sublists of ${\mathit{xs}}$ . Richard Bird studied this problem in 2008 and presented a concise but cryptic algorithm without much explanation. We give this algorithm a proper derivation and discovered a key property that allows it to work. The algorithm builds trees that have certain shapes—the sizes along the left spine is a prefix of a diagonal in Pascal’s triangle. The crucial function we derive transforms one diagonal to the next.

链接与引用

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

BibTeX
@article{paperbot2691,
  title = {Bottom-up computation using trees of sublists},
  author = {SHIN-CHENG MU},
  journal = {Journal of Functional Programming},
  volume = {34},
  year = {2024},
  doi = {10.1017/s0956796824000145}
}