-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: simplify naive rewriter using
Biplate<Expr>
Simplify the naive rewriter logic by implementing `Biplate<Expression>` for `Model`. Currently, we have two similar functions to rewrite expressions in value lettings and the expression tree. By implementing `Biplate<Expression>` in this commit, the constraints tree and expressions inside the symbol table can be traversed using the same operation. This makes it possible to use a single rewriting loop for both value lettings and the constraints tree. Due to limitations in Uniplate derive (documented in code comments), this commit uses manual implementations for the Uniplate / Biplate traits for `Model` and `SymbolTable`; however, the features needed to make derive work here have been added to the Uniplate issue tracker, so we should be able to remove these in the future.
- Loading branch information
1 parent
ea840fb
commit b06c967
Showing
16 changed files
with
217 additions
and
282 deletions.
There are no files selected for viewing
This file contains 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -143,7 +143,7 @@ | |
} | ||
], | ||
"symbols": { | ||
"next_machine_name": 1, | ||
"next_machine_name": 0, | ||
"table": [ | ||
[ | ||
{ | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -143,7 +143,7 @@ | |
} | ||
], | ||
"symbols": { | ||
"next_machine_name": 1, | ||
"next_machine_name": 0, | ||
"table": [ | ||
[ | ||
{ | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -143,7 +143,7 @@ | |
} | ||
], | ||
"symbols": { | ||
"next_machine_name": 1, | ||
"next_machine_name": 0, | ||
"table": [ | ||
[ | ||
{ | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -143,7 +143,7 @@ | |
} | ||
], | ||
"symbols": { | ||
"next_machine_name": 1, | ||
"next_machine_name": 0, | ||
"table": [ | ||
[ | ||
{ | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -143,7 +143,7 @@ | |
} | ||
], | ||
"symbols": { | ||
"next_machine_name": 1, | ||
"next_machine_name": 0, | ||
"table": [ | ||
[ | ||
{ | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -143,7 +143,7 @@ | |
} | ||
], | ||
"symbols": { | ||
"next_machine_name": 1, | ||
"next_machine_name": 0, | ||
"table": [ | ||
[ | ||
{ | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -147,7 +147,7 @@ | |
} | ||
], | ||
"symbols": { | ||
"next_machine_name": 1, | ||
"next_machine_name": 0, | ||
"table": [ | ||
[ | ||
{ | ||
|
This file contains 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.