In the last meeting, Prof. laughed at me when I was presenting about how to calculate the rpp element in the g' production. At that time, I just have a strong belief about the correctness of my algorithm. However, it was not enough only with belief, I have to think more about the reasonable and unreasonable points in the algorithm. Those Prof. may be know very well about that but the most important is my own discovery which means that I have to find out by myself.
During this week, I reconstruct and test my algorithm with many different test cases, on the other hand, I continue developing the other cases with the input expressions. Then I recognize that there are some misunderstand about the matching expression and updating values.
First, choosing the right pair of element to compare is very important. Last time, I chose to compare tf with (rg.t1g), that is one of the bad case. This time, I choose to compare pf with (rg.t1g), because the changes will directly depend on the pf.
Second, I have to consider about the case that I need to execute the updating function and when is not necessary.
If the g-expression path-value points to other places in the source graph which is not selected in pf, so we don't need to update. (just return {})
In the other case, when the pf_len is longer than rt1g_len then we don't need to update. (just return {})
When pf_len is shorter than rt1g_len then we just consider the path, we must select the values in need by this formula: (rg . t1g) \ {pf}
An important case which is used in case select-expression just has one element as {view:$db1} and {db:$db1}, we have to base on the length of template-pf, if pf_len is equal to 0 then we just need to return the whole template values in g-expression.
Finally, I have to upgrade the VMF with the multi-variables and multi-values in both f-expression and g-expression.
Cheers.
Không có nhận xét nào:
Đăng nhận xét