Runtime checking for whether a model implements a theory, special distinguished models for each theory #189
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR changes how GATlab tracks whether a model implements a theory. It removes the static typechecking which was often too underpowered to handle things which were morally correct.
Before we had
implements
methods generated during@instance
for each model type + scopetag. it would return some documentation if, e.g.,FinSetC
implementscompose
and otherwise aMethodError
would be thrown as the method doesn't exist. In this new approach, animpl_type(::FinSetC, x::Ident)
method gets generated which ....(TBD more description to come later)
This removes the need for
@import
when defining an extension of a model.This PR also adds special models (Dispatch, Initial, Terminal) which can be made sense of in any theory.