-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch from MM to MMA #161
base: coq-8.15
Are you sure you want to change the base?
Conversation
- BSM n halting to MMA (1+n) halting - MMA (1+n) halting to MMA (1+n) halting on zero Notice than the reduction MMA 0 halting to MMA 0 halting on zero does not hold because the only program in MMA 0 is the empty list which stop immediatly.
Apparently, we still need to avoid loops in
would be encoded by the fractions |
self-loops in MMA programs ...
The previous commit fails because for the moment I have not decided how to remove self loops in
For 1. above, we would need to add (to |
So ideas to remember how to proceed for 1. above.
|
Would it possibly help to have a slightly different compiler to FRACTRAN instead? |
@mrhaandi ,yes indeed that was a possibility that we discussed early on with @yforster while proving This legacy choice also allowed pointing out that notion of self-loop, and split the work in half. The alternate option you point out, splitting FRACTRAN instructions in half instead and introducing a third idea, displaces the complications into the proof of correctness of the FRACTRAN compiler, but I agree that this is a possibility. The legacy idea to remove self-loops for However, for The idea is then to replace any
which has no self-loop but for this we need to show that |
… the implemented compiler satisfies this generic interface
Now it remains to establish that the
|
…actic properties Now I need to get the semantic properties (correctness) out of the interface out syntatic properties only, ie any compiler_syntactic is sound and complete semantically as soon as the instruction compiler is itself sound
Reminder: do not forget to modify the concrete compilers because now, one needs to establish that instructions are always compiled into at least one instruction in the target language. This property is harmless, trivial to prove and always holds in the current compilers, but the corresponding code proving it should be added. After considering the pros and cons, even if that "at least length 1 property" can be derived from the other syntactic property and a semantic one, this mixes syntactic and semantic conditions and somehow blocks the separation between the syntactic properties and the semantic properties of the generic compiler. |
…ric compiler is much easier now than it was for MM !! Getting boundedness properties for jump addresses may require some more work though !
Completed the direct reduction from |
FYI, I am currently writing an |
…he generic compiler with a different algorithm, ie self loops are inlined into length 2 cycles instead of jumping to a shared length 2 cycle
The result mm_remove_self_loops_strong' is slightly weekened to j <= 1+length Q instead of j < 1+length Q. If the < is needed, Q could be appended with [ DEC pos0 0 ] with augments the length of Q by one, while safely keeping termination properties
(FYI) I have now written fast, compact, alternative proofs of |
@mrhaandi Does this comprises the input-output relation as well as the termination predicate ? |
It follows exactly the definitions of @yforster, so it is about the input/output relations on natural number encodings. |
This is a draft PR for switching from
MM n
toMMA n
to putMMA
upfront in place ofMM
.The list of included reduction so far:
BSM n
halting toMMA (1+n)
halting;MMA (1+n) halting
toMMA (1+n)
halting on zero (see remark below);MMA n halting
toFRACTRAN (regular) halting
MM n
toMM (1+n)
also using the syntactic compiler instead of the previous handwritten 1-1 compiler/linker.Remark: notice than the reduction
MMA 0
halting toMMA 0
halting on zero does not hold because the only program inMMA 0
is the empty list which stops immediately and thus cannot always be redirected to the zero state.