Execute the bottom_up enumerator by executing the following:
python3 bottom_up/bottom_up.py
Below is the bottom_up output when executed on test cases 1-10:
==================================================
Executing test case 1 with size bound 20...
Input:
Desired Output:
Test case passed! Number of programs generated: 9
Synthesized program: RemoveAttribute( XMLVariable('input'), ConstantString('visibility') )
Execution time: 0.0004 seconds
==================================================
Executing test case 2 with size bound 20...
Input:
Desired Output:
Test case passed! Number of programs generated: 14
Synthesized program: SetAttribute( XMLVariable('input'), ConstantString('visibility'), ConstantString('public') )
Execution time: 0.0007 seconds
==================================================
Executing test case 3 with size bound 20...
Input: This is body.
Desired Output:
Test case passed! Number of programs generated: 119
Synthesized program: SetAttribute( RemoveChild( XMLVariable('input') ), ConstantString('body'), ExtractText( ExtractChild( XMLVariable('input') ) ) )
Execution time: 0.0112 seconds
==================================================
Executing test case 4 with size bound 20...
Input:
Desired Output: This is body.
Test case passed! Number of programs generated: 11574
Synthesized program: SetChild( RemoveAttribute( XMLVariable('input'), ConstantString('body') ), ConstantString('body'), SetTag( SetText( RemoveAttribute( XMLVariable('input'), ConstantString('body') ), ExtractAttribute( XMLVariable('input'), ConstantString('body') ) ), ConstantString('body') ) )
Execution time: 1.0701 seconds
==================================================
Executing test case 5 with size bound 20...
Input: This is body.
Desired Output:
Test case passed! Number of programs generated: 85475
Synthesized program: SetChild( XMLVariable('input'), ConstantString('id'), SetAttribute( RemoveChild( ExtractChild( XMLVariable('input') ) ), ConstantString('body'), ExtractText( ExtractChild( ExtractChild( XMLVariable('input') ) ) ) ) )
Execution time: 8.8303 seconds
==================================================
Executing test case 6 with size bound 20...
Input:
Desired Output:
Test case passed! Number of programs generated: 12
Synthesized program: RemoveAttribute( XMLVariable('input'), ConstantString('visibility') )
Execution time: 0.0004 seconds
==================================================
Executing test case 7 with size bound 20...
Input:
Desired Output:
Test case passed! Number of programs generated: 20
Synthesized program: SetAttribute( XMLVariable('input'), ConstantString('visibility'), ConstantString('public') )
Execution time: 0.0008 seconds
==================================================
Executing test case 8 with size bound 20...
Input:
Desired Output:
Test case passed! Number of programs generated: 47
Synthesized program: SetAttribute( XMLVariable('input'), ConstantString('visibility'), ConstantString('public') )
Execution time: 0.0015 seconds
==================================================
Executing test case 9 with size bound 20...
Input: This is body.
Desired Output:
Test case passed! Number of programs generated: 326
Synthesized program: SetAttribute( RemoveChild( XMLVariable('input') ), ConstantString('body'), ExtractText( ExtractChild( XMLVariable('input') ) ) )
Execution time: 0.0254 seconds
==================================================
Executing test case 10 with size bound 20...
Input: This is body.
Desired Output:
Test case passed! Number of programs generated: 661855
Synthesized program: SetChild( XMLVariable('input'), ConstantString('id'), SetAttribute( RemoveChild( ExtractChild( XMLVariable('input') ) ), ConstantString('body'), ExtractText( ExtractChild( ExtractChild( XMLVariable('input') ) ) ) ) )
Execution time: 64.7667 seconds
==================================================
[+] XML Bottom-Up Synthesis: +10/10 points