Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

rules mapped to multiple rules that get joined #26

Open
narudocap opened this issue Nov 14, 2019 · 1 comment
Open

rules mapped to multiple rules that get joined #26

narudocap opened this issue Nov 14, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@narudocap
Copy link
Collaborator

The model is wrong, the counter should have a top element which get mapped to the top element of the target model. However, with this definition the completion takes the initialization rule to all remaining rules, which then get joined in one single rule.

pls_joined_rules_bug.zip

@szschaler szschaler added the bug Something isn't working label Nov 14, 2019
@szschaler
Copy link
Member

The problem here is that the interface part of the rule is an empty rule. Auto-completion prefers mapping from an existing rule over creating a new virtual rule. It finds that it can map the (empty) interface part of Initialize to any of the rules for which no completion has been produced and generates that completion despite the fact that it's not a monomorphism over the rule names.

The weaver treats rule composition different from other kinds of composition. There is, I believe, an implicit assumption in that code (or possibly in the code extracting the rule mappings in the first place) that rule name mappings will always be monomorphisms. As a result, the weave actually picks a random existing rule and doesn't copy across any of the other rules.

There are different options for fixing this:

  1. Force auto-completion to only generate monomorphisms.
  2. Continue to allow auto-completion to generate non-monomorphisms, but provide an additional flag that allows users to specify that they don't want such completions.
  3. Fix weaving / conversion so that non-monomorphisms are handled correctly.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants