Leo,
I have a remark and a question about inlining. - 1) this inlining mechanism is good, no contest about it. A drawback is that the stack trace is inefficient, hardening the debugging. Thus it is better to set INLINE = 0 in dev phase. 2) Could you be kind enough to point me out the link to your code at Basex repository ? Motivation : I would like to try evaluating whether inlining recursive functions is possible or not. You are welcome to suggestions !
Cheers
2013/11/22 jean-marc Mercier jeanmarc.mercier@gmail.com
Leo, Christian
I fixed the bug, thank you for reporting it. You can get the current
snapshot here: http://files.basex.org/releases/latest/ I just tested it with my lib code, it is now working fine, thx. You guys are reactive !
That only sets the setting for the current GUI session, not permanently.
Ok thx, this explains why I couldn't make it works with my environment.
BaseX inlines all functions (static ones and function items) etc..
That's really interesting. Very close to template programming as expression templating, but without having to write a single line of code. That could be of great utility if I try to write an algebra module.
Cheers,
Jean-Marc
2013/11/22 Leo Wörteler lw@basex.org
Dear Jean-Marc,
I fixed the bug, thank you for reporting it. You can get the current snapshot here: http://files.basex.org/releases/latest/
Am 22.11.2013 15:06, schrieb jean-marc Mercier:
Thx very much for your workaround. I did not succeed using the GUI and
executing »SET INLINELIMIT 0«.
That only sets the setting for the current GUI session, not permanently.
- Edit the file .basex, adding the line "INLINELIMIT = 0" after #Local
Options. I would prefer this method, would you have no objection.
It should be fine, but globally disables all inlining of functions. So just remember to remove it after you have a fixed version of BaseX.
I am not sure to understand well this parameter. Does it means that it
is possible to inline function in XQUERY ? This is quite close to template mechanism programming !
BaseX inlines all functions (static ones and function items) that are
- not recursive (or, for function items, don't contain themself), and
- below a certain size, which can be changed through the `INLINELIIT`.
This means that introducing abstraction by encapsulating code in many small functions should have little to no runtime overhead. Together with higher-order functions, this makes quite general and abstract libraries feasible.
Cheers, Leo