Hi. I spent some time this week re-implementing some features from WQL to mrs-sparql from WSI, aiming to better understand the meaning of some pieces code, and as a beginning for our purpose of implementing this query generator.
For now, we have two main processes that (1 - in _to_tree) expresses the query as an optimized tree whose leaves are atomic expressions, and (2 - in _to_sparql) parses the tree into sparql, adding auxiliary variables, types and other features. The second process isn't completely implemented yet.
There are some modifications and comments made from the original code that could be discussed further, such as: using regular expressions, pushing some methods to classes, trying some code reuse, etc.
Hi. I spent some time this week re-implementing some features from WQL to mrs-sparql from WSI, aiming to better understand the meaning of some pieces code, and as a beginning for our purpose of implementing this query generator.
For now, we have two main processes that (1 - in
_to_tree
) expresses the query as an optimized tree whose leaves are atomic expressions, and (2 - in_to_sparql
) parses the tree into sparql, adding auxiliary variables, types and other features. The second process isn't completely implemented yet.One may be able to run the code, for instance, as
There are some modifications and comments made from the original code that could be discussed further, such as: using regular expressions, pushing some methods to classes, trying some code reuse, etc.