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

Sequence functions should be removed from code for computing discriminating functions #184

Open
robert-strandh opened this issue Nov 2, 2020 · 2 comments

Comments

@robert-strandh
Copy link
Owner

robert-strandh commented Nov 2, 2020

Currently, the code for computing discriminating functions calls some sequence functions, and some other functions (like EVERY) that may be implemented as generic functions in SICL. It would not be a problem if the user could not add methods on any of those functions (because then satiation would fix the problem), but now I am thinking that it ought to be possible to add methods on some of these functions. If such a function is used in computing discriminating functions, then its discriminating function could not be computed. The solution is to replace the use of these functions in code for computing discriminating functions by simpler functions that are not likely to be implemented as generic functions. For example MEMBER could be used in place of FIND.

@marcoheisig
Copy link
Collaborator

This problem shouldn't occur because the sequence functions are sealable generic functions that have been sealed on the domain of lists and vectors. New methods can only be added, modified, or removed if their domain doesn't intersect with any of the sealed domains.

The only potentially problematic step is loading the library into SICL in the first place. I haven't given that much thought so far.

@Bike
Copy link
Collaborator

Bike commented Nov 2, 2020

Edited your comment to fix the linebreaks, hope you don't mind.

Given that in the context of computing discriminating functions, the arguments to sequence functions should be of known type (probably all lists), it would seem more elegant to me to just use versions that won't be affected by further method definition. Like, have the compiler replace calls to the generic function in the source with calls to specific versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants