olcott <NoOne@NoWhere.com>: Mar 22 04:40PM -0500 On 3/22/2021 2:50 PM, Malcolm McLean wrote: > on its call context. If fundamentally you've just passed the global > flag , but disguised it cleverly, then that would also be interesting in its own > right, but as a trick rather than as a contribution to computer theory. A global UTM / x86 emulator derives an execution trace incrementally one simulated instruction at a time that is a pure function of its inputs. No machine descriptions are simulated outside of the scope of this global UTM / x86 emulator. After the simulation of each instruction UTM / x86 emulator invokes a halt decider that derives a return value to the simulator EXECUTING / HALTED / WILL_NOT_HALT as a pure function of its input execution trace. The global UTM / x86 emulator continues simulating its input while this return value from the halt decider is EXECUTING. http://www.liarparadox.org/Halting_problem_undecidability_and_infinite_recursion.pdf -- Copyright 2021 Pete Olcott "Great spirits have always encountered violent opposition from mediocre minds." Einstein |
Bonita Montero <Bonita.Montero@gmail.com>: Mar 22 06:53PM +0100 Java does the same: import java.util.ArrayList; import java.lang.reflect.Field; public class ArrayLIstGrowth { public static void main( String[] args ) { ArrayList<Integer> al = new ArrayList<Integer>(); int cap = getCapacity( al ); for( int i = 0; i != 1000000; ++i ) { al.add( i ); int newCap = getCapacity( al ); if( newCap != cap ) { System.out.printf( "%d - %d\n", i, newCap ); cap = newCap; } } } static int getCapacity( ArrayList<?> al ) { try { if( field == null ) { field = ArrayList.class.getDeclaredField( "elementData" ); field.setAccessible( true ); } return ((Object[])field.get( al )).length; } catch( NoSuchFieldException nsfe ) { return -1; } catch( IllegalAccessException iae ) { return -1; } } static Field field = null; } 0 - 10 10 - 15 15 - 22 22 - 33 33 - 49 49 - 73 73 - 109 109 - 163 163 - 244 244 - 366 366 - 549 549 - 823 823 - 1234 1234 - 1851 1851 - 2776 2776 - 4164 4164 - 6246 6246 - 9369 9369 - 14053 14053 - 21079 21079 - 31618 31618 - 47427 47427 - 71140 71140 - 106710 106710 - 160065 160065 - 240097 240097 - 360145 360145 - 540217 540217 - 810325 810325 - 1215487 |
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com. |
No comments:
Post a Comment