AlgebraicJulia / AlgebraicJulia/GATlab.jl
Checking if a model implements a theory leads to MethodNotFound error
- Linguagem predominante
- Julia
- Estrelas
- 43
- Forks
- 4
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
GATlab's approach to runtime checking if a model implements a theory is to use dispatch on `ScopeTag`s.
```julia
F = FinMatC{Float64}()
implements(F, ThCategory) # true
implements(F, ThNat) # MethodNotFound error
```
A method is created by `@instance` to return something (not `true`, but something that's not `nothing`) for a given model type + ScopeTag (wrapped in a `Val`) for each scope of the theory.
I believe the line
```julia
implements(m::Module, ::Type{Val{tag}}) where {tag} = nothing
```
was intended to be the catch-all case for when a scope is *not* implemented. However, this line never gets called (perhaps `Module` was meant to be `Model`?) Trying to make a simple fix there causes other problems which will need to be debugged.
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Avaliação
Esta issue ainda não foi avaliada.