-
Notifications
You must be signed in to change notification settings - Fork 4
WIP: Cellular Sheaf Macro #38
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
WIP: Cellular Sheaf Macro #38
Conversation
Current Issue: Only multiple parameters are accepted into the macro. I need to fix this, but I'm too sleepy right now to make it work. Will fix when I am awake. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks great! Just see my comment about the test at the very end. It would also be nice to add a few more tests for other graph topologies, e.g. path graph or star graph.
Added var declaration parsing functions to impliment. Move branch to fork Expr: Tuple correctly feeds into lower level parse function now... MLStyle dep added. Created an ADT file in which stores the Sheaf ADT using MLStyle and StructTypes. Wrote documentation for module identifier. Added complete documentation for the AST abstract type. Reordered file to run top-bottom. Resolved minor issues. Split product into two structs: restriction map and vertex stalk. Started building test file. Simplified ADT to structs and proved creation of first ADT cellular sheaf expression in tests. Created look up table for constructor. Tested Var Redeclaration Exception. Created helper function for throwing error when a linear relation contains an undefined var. Created test for exceptions when var is undeclared in relation. Modified dimension types to be integers. Edge stalk inference WIP. Tested that inconsistent edge stalks throw exceptions. Added error message for attempts to map wrong vertex stalk dimension. Created test for wrong mapping. created method for gathering vertex stalk dimensions. Created system to gather vertex and edge stalks Empty cellular sheaf can now be constructed. Created method of storing vertex + edge dimensions for construction. Starting on the parsing macro. Currently has errors Modified Judgements into declarations that can hold data. Modified minor test errors after judgement change. Completed parse declaration function and added parse equation to do. Fixed minor declaration parsing errors. Removed declaration debugging prints. Parse cellular sheaf now passes in escaped local vars and their names. Modified parse_cellular_sheaf signature to accept multiple local args. Cleaned up some error throwing. Local parameters are now added to the AST. Added root construction and constructor function. Added type checking to constructor. Moved Macro into seperate file that depends on ADT and CellularSheaves files. First sheaf construction via macro complete! Removed Debug statement. Seperated construct into cleaner functions. Added documentation to ADT file. Added documentation to macro function. Tested all exceptions in ADT testing file. Added more tests. Need to fix an error where you need to pass more than one arg into macro. Added exception for non matrices. Adjusted minor teesting errors within ADT file. Replaced accidental "Throws" w/ correct "Error" in Parser code. Modified isEqual Func Added support for singular arguments in macro. Added error exceprtion for using macro without arguments. Made minor test changes. Removed unneeded StructTypes. Literate File Created for Cellular Sheaf Macro Renamed Sheaf Macro Guide Literate/Generated. Modified Literate to remove unneeded example. Added CFG to parser API docs. Added Sheaf Error Types to the parser + constructor.
985765a
to
e2e5cb8
Compare
I have graduation tomorrow so I'll be pretty busy, but I'm trying to figure out how to fix the conflicts now. Not sure how to view this within VSCode. Looking up tutorials. |
Ok, should be good! @jpfairbanks |
This macro abstracts functions such as:
CellularSheaf(vertex_stalks::Vector{Int}, edge_stalks::Vector{Int})
set_edge_maps!(s::AbstractCellularSheaf, v1::Int, v2::Int, e::Int, rm1::AbstractMatrix, rm2::AbstractMatrix)
It accepts restriction map matrices as argument parameters and allows a user to declare vertex stalks and linear relations
representing edges in the cellular sheaf. For instance, a user can represent a triangular sheaf using the following julia code:
The previous code is the same as writing:
While the first example may appear like more lines of code, it is far easier to understand the pattern that is occuring, making it easier for developers
to quickly construct cellular sheaves. Likewise, because edge stalk dimensions are inferred, this provides a more disciplined approach to building sheaves,
leaving less room for errors.