-
Notifications
You must be signed in to change notification settings - Fork 122
Refactor BasicSymbolic
struct to separate metadata from hash consing
#704
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
Draft
bowenszhu
wants to merge
26
commits into
master
Choose a base branch
from
b/struct-refactor
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 20 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
2ab70b3
Create `BasicSymbolicImpl` struct to separate metadata from hash consing
bowenszhu 17408e8
Rename `BasicSymbolicImpl` field from `impl` to `expr`
bowenszhu 295a1df
Adapt `BasicSymbolic` hash consing constructor
bowenszhu 1fe09e5
Adapt `setproperties` with new `BasicSymbolic` struct
bowenszhu b4932e6
Call custom constructor of `Mul` in `maybe_intcoeff`
bowenszhu 9da1a9e
Fix: `hash2` of `BasicSymbolic` equals its `BasicSymbolicImpl`
bowenszhu 56c990c
Operate CSE `topological_sort` `dfs` on `BasicSymbolicImpl`
bowenszhu 4fadeab
Add `isexpr` & `iscall` methods for `BasicSymbolicImpl`
bowenszhu d7737dd
Remove `metadata` from `hash2`
bowenszhu 65cc88f
Change `Base.isequal` for `BasicSymbolicImpl`
bowenszhu df49641
Modify flyweight factory for `BasicSymbolicImpl`
bowenszhu db30dc8
Create `MetadataImpl` struct to keep track of metadata tree
bowenszhu 580ad33
Modify `getproperty(::BasicSymbolic)` for metadata
bowenszhu 831f8fc
Add `isequal` method for `MetadataImpl`
bowenszhu 29a6eb4
Modify `isequal_with_metadata` with new `BasicSymbolic` structure
bowenszhu f8d0e78
Add `getmetadata` methods bc `metadata` kwarg takes outer-scope function
bowenszhu e9f4ff8
Modify `BasicSymbolic` constructors with new struct structure
bowenszhu 5293e98
Add `metadata_children` function for accessing metadata tree
bowenszhu 4373146
Modify hash consing tests with new `BasicSymbolic` struct
bowenszhu 4a99619
Modify rewrite metadata tests
bowenszhu 440c17b
Refactor `-(::SN, ::SN)` for easier debugging
bowenszhu 4d00726
Make `BasicSymbolicImpl` children `BasicSymbolicImpl`
bowenszhu 2fcac04
Make `getproperty` return `BasicSymbolic` if applicable
bowenszhu d03e0ef
`arguments` wraps `BasicSymbolicImpl` and `MetadataImpl`
bowenszhu 2eae851
Revert "Add `metadata_children` function for accessing metadata tree"
bowenszhu cc5e273
Revert "Modify rewrite metadata tests"
bowenszhu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.