Skip to content
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

Handle embeddings more restrictively in GUI #61

Open
SReichelt opened this issue May 17, 2020 · 0 comments
Open

Handle embeddings more restrictively in GUI #61

SReichelt opened this issue May 17, 2020 · 0 comments
Assignees
Labels
component: gui Issue concerns the web-based user interface component: hlm logic Issue concerns the HLM logic enhancement New feature or request

Comments

@SReichelt
Copy link
Owner

SReichelt commented May 17, 2020

Architecturally, embeddings essentially "fuse" two types. Since the natural numbers are embedded into several other number systems, all of these number systems are treated as one, resulting in lots of options that do not really make much sense (although they are technically valid).

This should be handled more restrictively in two ways:

  • When determining valid options for an argument placeholder, embeddings of a possible option should not be followed by default, as described in More explicit type constraints for arguments #60. In the library tree dialog, there needs to be an option to "also consider embedded subsets", i.e. to turn off this restriction. The restriction should never be applied to variables, as no such option is available there.
  • In addition, a more general restriction should always be applied: Placeholders should never be filled in a way that forces both the placeholder and all other terms that are type-checked together with it to follow embeddings. However, since following embeddings is a crucial part of type checking, this restriction probably needs to be checked after embeddings have already been followed in all terms that are type-checked together. One way to accomplish this would be to record and compare the list of constructions encountered when following embeddings: The list containing the checked placeholder should either contain or be contained in one of the other lists.

Somewhat related to #64, as that issue also deals with more restrictive type checking of placeholders.

@SReichelt SReichelt added enhancement New feature or request component: hlm logic Issue concerns the HLM logic component: gui Issue concerns the web-based user interface labels May 17, 2020
@SReichelt SReichelt self-assigned this May 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: gui Issue concerns the web-based user interface component: hlm logic Issue concerns the HLM logic enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant