Here is a simple test program I wrote as an example of my bootstrapping algorithm. I have some examples of code below.
For the "Do Nothing" button:
return new TreeNode(NodeValue.GET, new TreeNode(NodeValue.VALUE));
For the "Just Round" button:
return new TreeNode(NodeValue.GET,
new TreeNode(NodeValue.ROUNDEDTOTHEFOLLOWINGDECIMALPLACE,
new TreeNode(NodeValue.VALUE),
new TreeNode(NodeValue.VARIABLE)));
For the "Add then Round" button:
return new TreeNode(NodeValue.GET,
new TreeNode(NodeValue.ROUNDEDTOTHEFOLLOWINGDECIMALPLACE,
new TreeNode(NodeValue.MODNOUN,
new TreeNode(NodeValue.VALUE),
new TreeNode(NodeValue.ADDEDTO,
new TreeNode(NodeValue.VARIABLE))),
new TreeNode(NodeValue.VARIABLE)));
For the "Round then Add" button:
return new TreeNode(NodeValue.GET,
new TreeNode(NodeValue.MODNOUN,
new TreeNode(NodeValue.ADDEDTO,
new TreeNode(NodeValue.VARIABLE)),
new TreeNode(NodeValue.ROUNDEDTOTHEFOLLOWINGDECIMALPLACE,
new TreeNode(NodeValue.VALUE),
new TreeNode(NodeValue.VARIABLE))));