论文标题
从证据中产生收集转换
Generating collection transformations from proofs
论文作者
论文摘要
通过产品和集合类型从原子类型中建立的嵌套关系形成了丰富的数据模型。在过去的几十年中,嵌套的关系演算NRC已成为一种标准语言,用于定义嵌套集合的转换。 NRC是一种强大的功能性语言,允许使用脱衣舞和预测,单顿形式和地图操作来构建转换,可将元素上的转换升至集合的转换。 在这项工作中,我们描述了描述逻辑转换的另一种声明性方法。具有杰出输入和输出的公式给出一个隐式定义,如果一个人可以证明每个输入只有一个输出可以满足它。我们的主要结果表明,一个人可以从公式提供隐含的定义的证据中综合转换,其中证明是在直觉的演算中,可以捕获有关嵌套集合的自然推理风格。我们的多项式时间合成过程基于Craig插值引理的类似物,从代表嵌套集合的术语之间的可证明的遏制开始,并生成在它们之间插值的NRC表达式。 我们进一步表明,在有经典的功能证明时,可以找到实现隐式定义的NRC表达式,而不仅仅是有直觉的词。也就是说,每当公式隐式定义转换时,就会存在一个实现它的NRC表达式。
Nested relations, built up from atomic types via product and set types, form a rich data model. Over the last decades the nested relational calculus, NRC, has emerged as a standard language for defining transformations on nested collections. NRC is a strongly-typed functional language which allows building up transformations using tupling and projections, a singleton-former, and a map operation that lifts transformations on tuples to transformations on sets. In this work we describe an alternative declarative method of describing transformations in logic. A formula with distinguished inputs and outputs gives an implicit definition if one can prove that for each input there is only one output that satisfies it. Our main result shows that one can synthesize transformations from proofs that a formula provides an implicit definition, where the proof is in an intuitionistic calculus that captures a natural style of reasoning about nested collections. Our polynomial time synthesis procedure is based on an analog of Craig's interpolation lemma, starting with a provable containment between terms representing nested collections and generating an NRC expression that interpolates between them. We further show that NRC expressions that implement an implicit definition can be found when there is a classical proof of functionality, not just when there is an intuitionistic one. That is, whenever a formula implicitly defines a transformation, there is an NRC expression that implements it.