-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ead1e59
commit 52ede9f
Showing
1 changed file
with
11 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,13 @@ | ||
Terminating Expansion | ||
=== | ||
|
||
A formalization of a strategy to compile general recursive functions into “equivalent” non-recursive ones. | ||
It features a transformation algorithm and some interpreters. | ||
|
||
## Desired Properties | ||
1. The transformation is a total function, i.e., the function always halts with a value for every valid input. | ||
2. The programs obtained with transformation always halt, even if with the out-of-fuel error. | ||
3. If a program M is transformed into M' and the execution of M' yields a value, then the execution of M yields the same value. | ||
4. If the execution of a program M halts with a value using at most f recursive calls and M is transformed into M' using f as the expansion factor, then the execution of M' yields the same value. | ||
|
||
These properties, if proven, ensure the strategy transform any function into a non-recursive function with the same semantics, as long as the expanding factor is high enough. Non-terminating programs will always compile into "out-of-fuel" no matter how high the expanding factor is, but a transformed program answering the "out-of-fuel" doesn't mean the original won't terminate, it could just need a higher factor. This strategy does not solve the halting problem. |