Skip to content

Commit

Permalink
Remove relation diagram type imference stub
Browse files Browse the repository at this point in the history
  • Loading branch information
lukem12345 committed Jun 24, 2024
1 parent 49499e8 commit dff9b94
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions src/composition.jl
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ Throw an error if any individual Decapode already contains a repeated name (exce
If `only_states_terminals` is `true`, only expose state and terminal variables. Defaults to `false`.
Note that composing immediately with [`oapply`](@ref) will fail if types do not match (e.g. (:infer, :Form0) or (:Form0, :Form1)). So, use the function [`infer_types_from_diagram!`](@ref) after this if needed.
Note that composing immediately with [`oapply`](@ref) will fail if types do not match (e.g. (:infer, :Form0) or (:Form0, :Form1)).
"""
function default_composition_diagram(podes::Vector{D}, names::Vector{Symbol}, only_states_terminals=false) where {D<:SummationDecapode}
non_lit_names = map(podes) do pode
Expand All @@ -257,18 +257,3 @@ function default_composition_diagram(podes::Vector{D}, names::Vector{Symbol}, on
construct_relation_diagram(names, non_lit_names)
end

""" function infer_types_from_diagram!(r::RelationDiagram, podes::Vector{D}) where {D<:SummationDecapode}
Infer that variables sharing a name should have the same type.
If [`oapply`](@ref) fails due to types not matching (e.g. :infer and :Form0), then this is a useful pre-processing step.
"""
function infer_types_from_diagram!(r::RelationDiagram, podes::Vector{D}) where {D<:SummationDecapode}
for j in parts(r, :Junction)
vbl = r[j, :variable]
boxes = r[incident(r, j, :junction), :box]
# TODO
end
podes
end

0 comments on commit dff9b94

Please sign in to comment.