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

Developer documentation #114

Closed
slwu89 opened this issue Feb 16, 2024 · 2 comments
Closed

Developer documentation #114

slwu89 opened this issue Feb 16, 2024 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@slwu89
Copy link
Member

slwu89 commented Feb 16, 2024

While cleaning up some of my abandoned branches (namely #74, abandoned due to upstream work in GATLab that will make everything easier), I found a mmd diagram I made to help myself figure out how all the machinery in ACSets works. There's enough parameteric types in this package that it is somewhat daunting when one opens up a file, without some sort of guide as to how everything is organized. I am posting an issue here to see if it would be helpful to use it or something similar for a dev docs for users looking to contribute.

There are a few problems though:

  1. the diagram must be manually updated when things change
  2. I am not sure how best to indicate files/lines that each type is defined at, in the diagram
  3. the diagram must be manually updated when things change

What do other think?

classDiagram
namespace ACSetInterface {
    class PartsType ["abstract PartsType{S,T}"]
    class DenseParts ["abstract DenseParts{S,T}"]
    class MarkAsDeleted ["abstract MarkAsDeleted{S,T}"]
    class UnionFind ["abstract UnionFind{S,T}"]
    class MarkAsDeletedUnionFind ["MarkAsDeletedUnionFind UnionFind{S,T}"]
    class ACSet ["abstract ACSet{PT}"] {
        PT <: PartsType
    }
}
PartsType <|-- DenseParts : PartsType{S,T}
PartsType <|-- MarkAsDeleted : PartsType{S,T}
PartsType <|-- UnionFind : PartsType{S,T}
PartsType <|-- MarkAsDeletedUnionFind : PartsType{S,T}
namespace DenseACSets {
    class SimpleACSet ["abstract SimpleACSet{PT}"]
    class StructACSet ["abstract StructACSet{S,Ts,PT}"] {
        S <: TypeLevelSchema&lcub;Symbol&rcub; : schema
        Ts <: Tuple : types of attributes
    }
    class StructCSet ["StructCSet{S,PT}"]
}
ACSet <|-- SimpleACSet : ACSet{PT}
SimpleACSet <|-- StructACSet : SimpleACSet{PT}
StructACSet <|-- StructCSet : StructACSet{S,Tuple{},PT}
namespace Columns {
    class Column ["abstract Column{S,T}"]
}
namespace ColumnImplementations {
    class DenseFinColumn ["DenseFinColumn{V}"] {
        m <: VecMap&lcub;Int,V&rcub;
        pc <: TrivialCache&lcub;Int,Int&rcub;
    }
}
Column <|-- DenseFinColumn : Column{Int,Int}
namespace PreimageCaches {
    class PreimageCache ["abstract PreimageCache{S,T}"] {
    }
    class TrivialCache ["TrivialCache{S,T}"]
    class StoredPreimageCache ["StoredPreimageCache{S,T,Preimage,Storage}"] {
        Preimage <: AbstractSet&lcub;S&rcub;
        Storage <: Mapping&lcub;T,Preimage&rcub;: preimage for non injective maps
    }
    class InjectiveCache ["InjectiveCache{S,T,Storage}"] {
        Storage <: Mapping&lcub;T,S&rcub;: inverse
    }
}
PreimageCache <|-- TrivialCache : PreimageCache{S,T}
PreimageCache <|-- StoredPreimageCache : PreimageCache{S,T}
PreimageCache <|-- InjectiveCache : PreimageCache{S,T}
namespace Mappings {
    class AbstractDict ["abstract AbstractDict{S,T}"]
    class Mapping ["abstract Mapping{S,T}"] {   
        S: type of parts in source
        T: type of parts in target
    }
    class VecMap ["VecMap{T,V}"] {
        V <: AbstractVector&lcub;T&rcub;: container type
    }
    class DictMap ["DictMap{K,V,D}"] {
        D <: AbstractDict&lcub;K,V&rcub;: container type
    }
    %% views are not included here
}
AbstractDict <|-- Mapping
Mapping <|-- VecMap : Mapping{Int,T}
Mapping <|-- DictMap : Mapping{K,V}
Loading
@slwu89
Copy link
Member Author

slwu89 commented Feb 16, 2024

And of course the GitHub mermaid diagram integration appears to not be working at the moment. Pasted here:
Screenshot 2024-02-16 at 7 29 33 AM

@epatters epatters added the documentation Improvements or additions to documentation label Feb 27, 2024
@epatters epatters changed the title developer documentation Developer documentation Feb 27, 2024
@slwu89
Copy link
Member Author

slwu89 commented Aug 15, 2024

Closing. It looks nice but would require too much effort to maintain.

@slwu89 slwu89 closed this as completed Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants