1 / 13

Output

Output. 05 / 15 / 2013. Agenda. Modularized Coding Approach Generated Examples. 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.

garry
Download Presentation

Output

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

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

More Related