-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Input of rule attributes from the user #748
Comments
Original comment by: rensink |
I've added a grammar property "oracleValue" with a setting "dialog" (next to "default" and "random") that does pretty much what you want, although not quite:
Let met know what you think of this solution: is it usable, (how) should it be improved? Original comment by: rensink |
I've just tried the new feature but unfortunately it is quite cumbersome to use. I was thinking something in the lines of the description of your hard-to-implement solution: to provide the attribute value only after the rule is selected for application. My main interest in this is by inserting a kind of "documentation" in the graphs. In this sense, I don't expect these input attributes to have any impact in the grammar behaviour. (Probably this is too simple of a test case but it's the one I'm facing now.) Wouldn't it be possible to ask for the value as a post-rule application wrap-up? Here's my current scenario. I want to create a new node with "type:Kind" and assign it a "string:name" attribute, so I plan to have as a rule: new: par: I see two use cases with such a rule:
Currently, using 2), as soon as the grammar is loaded, the rule is enabled and the dialog pops up and locks the Simulator. Most of the time I didn't want to do any rule application in the first place, but this new dialog gets in the way. I'm most probably wrong but I was thinking that since the input node is an attribute node that is isolated in the LHS, it should not the part of the search plan, no? Original comment by: zambon |
Regarding your use case 1) certainly the oracle will not be used any more as soon as the value is bound by a control program. That is automatic. Regarding use case 2) I quite see that your scenario is preferable, for the reason that you give; but it requires late binding of the node, and that is counter to how things currently work. Indeed all LHS elements are part of the search plan, the idea is that after matching all nondeterminism has been resolved. After finishing the current implementation I thought about it some more; maybe it is possible to introduce the concept of a "don't know" value in every algebra to which such an attribute value can be bound during matching, and which is substituted by a real value only when the target graph of the rule is computed. Original comment by: rensink |
It would be nice if we could enter the input parameter of a rule from a dialog in the Simulator. The idea is to associate parin:x tags to attribute nodes in a rule and when a rule is applied a dialog pops up asking for the value.
In a automatic exploration, such rules would have to assume a default value for the inputs (or take them from some where else).
Reported by: zambon
The text was updated successfully, but these errors were encountered: