Output - PowerPoint PPT Presentation

garry
output n.
Skip this Video
Loading SlideShow in 5 Seconds..
Output PowerPoint Presentation
play fullscreen
1 / 13
Download Presentation
Output
123 Views
Download Presentation

Output

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Output 05/15/2013

  2. Agenda • Modularized Coding Approach • Generated Examples

  3. Modularized Coding Approach • Coded subset of overall goals • Sumit’s role transformations • Generation of tree with atomic strategies and roles • Fitness functions • Traversal performance • Code generation

  4. Modularized Coding Approach • Broken into simplified modules to ensure proper functionality • For example: • Code generation was not working well based on codebase from last week’s presentation • May have been an issue with the tree setup, data structure implementation, or other • Solution: scale back complexity and ensure that proper data is being passed • Build up a simple string of operations and post-process

  5. Modularized Coding Approach • Intent is to merge modules into unified codebase after proving correctness of functionality • Merge current code generation module into previous setup • What I learned: • Post-processing may be easier than building code output • Gives concept of location • Easier to separate wrapper functions out of main • Please note: • Terminals are not currently participating in code assignment

  6. Examples • (WRAPPER int* buffer int low-index) Create Wrapper int* buffer int low-index

  7. (WRAPPER int* buffer int low-index) void main() { function_1(int* buffer, int low-index, int high-index); return; } void function_1(int* buffer, int low-index, int high-index) { call_sort(buffer); }

  8. Examples • (START_INDEX (WRAPPER int high-index int* buffer)) void main() { startIndex_xform(int* buffer); function_1(int* buffer, int low-index, int high-index); return; } 1: void function_1(int* buffer, int low-index, int high-index) { call_sort(buffer); }

  9. Examples • (START_INDEX (WRAPPER int high-index int* buffer)) void main() { startIndex_xform(int* buffer); function_1(int* buffer, int low-index, int high-index); return; } void function_1(int* buffer, int low-index, int high-index) { call_sort(buffer); }

  10. Code Examples void main() { endIndex_xform(int* buffer); return; } void main() { return; } void main() { buffer_xform(int* buffer); endIndex_xform(int* buffer); function_1(int* buffer, int low-index, int high-index); return; } void function_1(int* buffer, int low-index, int high-index) { call_sort(buffer); }

  11. Code Examples void main() { startIndex_xform(int* buffer); endIndex_xform(int* buffer); endIndex_xform(int* buffer); function_1(int* buffer, int low-index, int high-index); return; } void function_1(int* buffer, int low-index, int high-index) { call_sort(buffer); endIndex_xform(int* buffer); function_2(int* buffer, int low-index, int high-index); buffer_xform(int* buffer); startIndex_xform(int* buffer); startIndex_xform(int* buffer); startIndex_xform(int* buffer); } void function_2(int* buffer, int low-index, int high-index) { call_sort(buffer); function_3(int* buffer, int low-index, int high-index); startIndex_xform(int* buffer); startIndex_xform(int* buffer); startIndex_xform(int* buffer); endIndex_xform(int* buffer); } void function_3(int* buffer, int low-index, int high-index) { call_sort(buffer); endIndex_xform(int* buffer); startIndex_xform(int* buffer); }

  12. Code Examples • (WRAPPER (FN_PTR int high-index int high-index) (WRAPPER int low-index int* buffer)) void main() { function_1(int* buffer, int low-index, int high-index); return; } void function_1(int* buffer, int low-index, int high-index) { call_sort(buffer); void (*csort_0)(int*) = call_sort; (*csort0)(buffer); function_2(int* buffer, int low-index, int high-index); } void function_2(int* buffer, int low-index, int high-index) { call_sort(buffer); }

  13. Next Steps • Merge into previous codebase • Terminals do not really affect output currently (hardcoding to ensure proper output) • Implement pre-condition matching between source and target modules