We describe a learning-based approach for verifying recursive functions. The Boolean formula learning algorithm CDNF is used to automatically infer function summaries for recursive functions. In contrast to traditiona...
详细信息
Reversible Primitive Permutations (RPP) are recursively defined functions designed to model Reversible Computation. We illustrate a proof, fully developed with the proof-assistant Lean, certifying that: "RPP can ...
详细信息
ISBN:
(纸本)9783031090059;9783031090042
Reversible Primitive Permutations (RPP) are recursively defined functions designed to model Reversible Computation. We illustrate a proof, fully developed with the proof-assistant Lean, certifying that: "RPP can encode every Primitive recursive Function". Our reworking of the original proof of that statement is conceptually simpler, fixes some bugs, suggests a new more primitive reversible iteration scheme for RPP, and, in order to keep formalization and semi-automatic proofs simple, led us to identify a single pattern that can generate some useful reversible algorithms in RPP: Cantor Pairing, Quotient/Reminder of integer division, truncated Square Root. Our Lean source code is available for experiments on Reversible Computation whose properties can be certified.
In classic program synthesis algorithms, such as counter-example-guided inductive synthesis (CEGIS), the algorithms alternate between a synthesis phase and an oracle (verification) phase. Many synthesis algorithms use...
详细信息
ISBN:
(数字)9783030945831
ISBN:
(纸本)9783030945824;9783030945831
In classic program synthesis algorithms, such as counter-example-guided inductive synthesis (CEGIS), the algorithms alternate between a synthesis phase and an oracle (verification) phase. Many synthesis algorithms use a white-box oracle based on satisfiability modulo theory (SMT) solvers to provide counter examples. But what if a white box oracle is either not available or not easy to work with? We present a framework for solving a general class of oracle-guided synthesis problems which we term synthesis modulo oracles (SyMo). In this setting, oracles are black boxes with a query-response interface defined by the synthesis problem. As a necessary component of this framework, we also formalize the problem of satisfiability modulo theories and oracles (SMTO), and present an algorithm for solving this problem. We implement a prototype solver for satisfiability and synthesis modulo oracles and demonstrate that, by using oracles that execute functions not easily modeled in SMT-constraints, such as recursive functions or oracles that incorporate compilation and execution of code, SMTO and SyMO can solve problems beyond the abilities of standard SMT and synthesis solvers.
The equivalence of folding left and right over Peano numbers and lists makes it possible to minimalistically inter-derive (1) structurally recursive functions in direct style, (2) structurally tail-recursive functions...
详细信息
The equivalence of folding left and right over Peano numbers and lists makes it possible to minimalistically inter-derive (1) structurally recursive functions in direct style, (2) structurally tail-recursive functions that use an accumulator, and (3) structurally tail-recursive functions in delimited continuation-passing style, using Ohori and Sasano's lightweight fusion by fixed-point promotion. When the fold-left and the fold-right functions account for primitive iteration for Peano numbers, this equivalence is unconditional. When they account for primitive recursion for Peano numbers, this equivalence is modulo left permutativity of their induction-step parameter - a property which is more general than associativity and commutativity. And when they account for primitive iteration or for primitive recursion over lists, this equivalence is modulo left permutativity of their induction-step parameter if these two fold functions have the same type. Since the 1980s, however, the two fold functions for lists do not have the same type: the arguments for their induction-step parameter are swapped, a re-ordering that complicated Bird and Wadler's duality theorems and whose history is reviewed in an appendix. Without this re-ordering, Bird and Wadler's second duality theorem more visibly accounts for "re-bracketing," which is a key step to make recursive programs tail recursive in the general area of program development, from Cooper in the 1960s and onwards.
Hofstadter’s G function is recursively defined via G(0) = 0 and then G(n) = n − G(G(n − 1)). Following Hofstadter, a family (Fk) of similar functions is obtained by varying the number k of nested recursive calls in t...
详细信息
This study examines how the Gödel phenomena are to be treated in core logic. We show in formal detail how one can use core logic in the metalanguage to prove Gödel’s incompleteness theorems for arithmetic e...
详细信息
This study examines how the Gödel phenomena are to be treated in core logic. We show in formal detail how one can use core logic in the metalanguage to prove Gödel’s incompleteness theorems for arithmetic even when classical logic is used for logical closure in the object language.
Let (Un)n≥0 be a non-degenerate linear recurrence sequence with order at least two defined over a function field and OS∗ be the set of S-units. In this paper, we use a result of Brownawell and Masser to prove effecti...
详细信息
Constant-recursive sequences are those which satisfy a linear recurrence, so that later terms can be obtained as a linear combination of the previous ones. The rank of a constant-recursive sequence is the minimal numb...
详细信息
The decidability of the reachability problem for finitary PCF has been used as a theoretical basis for fully automated verification tools for functional programs. The reachability problem, however, often becomes undec...
详细信息
We reconstruct some of the development in Richard Bird’s [2008] paper Zippy Tabulations of recursive functions, using dependent types and string diagrams rather than mere simple types. This paper serves as an intuiti...
详细信息
暂无评论