aclai-lab / aclai-lab/SoleData.jl
It's all about graphs, right?
- 主要語言
- Julia
- 星號
- 13
- 分支
- 4
- 平均合併
- 14 分鐘
- 30 天內合併 PR
- 1
描述
Hi guys,
Do you see any differences between graph theory and *modal* symbolic learning?
I don't, maybe I am being quite superficial?
I am writing this issue to anticipate the refactoring/simplification work are going to do in the next months.
This is a fragment of code I just wrote in ModalAssociationRules.jl, to fit my experiments with generic `AbstractDataset` types rather than `UniformFullDimensionalDataset`s. It is inspired by some code I read from @alberto-paparella.
Do you think this is garbage? The underlying philosophy is: please, gimme my graph, gimme my coloured edges, and let me fix which symbol holds on every node.
No jungle types. Stick to Graphs.jl as much as possible, and keep it simple. No strongly-coupled code enabling heavy optimizations.
```julia
struct Logiset <: SoleData.AbstractLogiset
instances::Vector{KripkeStructure}
end
```
After the above, we could implement the standard Vector interface via @forward macro (Lazy.jl package). Something like:
```julia
@forward Logiset.instances Logiset begin
length
getindex
setindex!
push!
pop!
iterate
end
```
The rest could be something like:
```julia
# this is not the complete interface, but only a few dispatches I needed in ModalAssociationRules.jl
function instances(logiset::Logiset)
return logiset.instances
end
function ninstances(logiset::Logiset)
return logiset |> length # and this is a renaming for length(::Vector{KripkeStructure}), because of @forward
end
function getinstance(
logiset::Logiset,
i::Int64
)::SoleLogics.LogicalInstance
return SoleLogics.LogicalInstance(
SoleLogics.InterpretationVector(logiset |> instances), i)
end
function frame(logiset::Logiset, i::Int64)
instances(logiset)[i] |> frame
end
```
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
No files or tests are explicitly named; only a proposed `Logiset` layout and references to `ModalAssociationRules.jl`. First, locate where `AbstractLogiset`, `KripkeStructure`, and existing `instances`/`ninstances`/`getinstance`/`frame` methods are defined in the repository, then trace their call sites in `ModalAssociationRules.jl`. Compare current interfaces to the proposed Vector-backed one and identify compatibility impacts. Done means a maintainer-agreed decision and concrete plan for whether to proceed with this refactor.
由索引模型根據 Issue 內容生成。
評估
- 領域
- data
- Issue 類型
- 重構
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 22/100