-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds support for `defalias`, along with various valid and invalid tests. The algorithm for resolving aliases requires a fixpoint iteration to allow for aliases of aliases, etc. This also fixes issues related to parsing of invalid identifiers (e.g. for constraint handles, column names, aliases, etc).
- Loading branch information
1 parent
13af9a0
commit cb86307
Showing
26 changed files
with
335 additions
and
4 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
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
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{"X": [], "Y": []} | ||
{"X": [-1], "Y": [1]} | ||
{"X": [0], "Y": [0]} | ||
{"X": [1], "Y": [-1]} | ||
{"X": [0,-1], "Y": [0,1]} | ||
{"X": [0,0], "Y": [0,0]} | ||
{"X": [0,1], "Y": [0,-1]} |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
(defcolumns X Y) | ||
(defalias | ||
X' X | ||
Y' Y) | ||
|
||
(defconstraint c1 () (+ X' Y')) | ||
(defconstraint c2 () (+ Y' X')) | ||
(defconstraint c3 () (+ X Y')) | ||
(defconstraint c4 () (+ Y X')) | ||
(defconstraint c5 () (+ X' Y)) | ||
(defconstraint c6 () (+ Y' X)) | ||
(defconstraint c7 () (+ X Y)) | ||
(defconstraint c8 () (+ Y X)) |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{"X": [1], "Y": [0]} | ||
{"X": [-1], "Y": [0]} | ||
{"X": [0], "Y": [1]} | ||
{"X": [0], "Y": [-1]} | ||
{"X": [2], "Y": [-1]} | ||
{"X": [-2], "Y": [1]} |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{"X": [], "Y": []} | ||
{"X": [-4], "Y": [2]} | ||
{"X": [-2], "Y": [1]} | ||
{"X": [0], "Y": [0]} | ||
{"X": [2], "Y": [-1]} | ||
{"X": [4], "Y": [-2]} | ||
{"X": [0,-4], "Y": [0,2]} | ||
{"X": [0,-2], "Y": [0,1]} | ||
{"X": [0,0], "Y": [0,0]} | ||
{"X": [0,2], "Y": [0,-1]} | ||
{"X": [0,4], "Y": [0,-2]} |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
(defconst | ||
ONE 1 | ||
TWO 2 | ||
) | ||
|
||
(defalias | ||
one ONE | ||
two TWO) | ||
|
||
(defcolumns X Y) | ||
(defconstraint c1 () (+ X (* two Y))) | ||
(defconstraint c2 () (+ (* two Y) X)) | ||
(defconstraint c3 () (+ X Y Y)) | ||
(defconstraint c4 () (+ Y X Y)) | ||
(defconstraint c5 () (+ Y Y X)) | ||
(defconstraint c6 () (+ (* one X) Y Y)) | ||
(defconstraint c7 () (+ Y (* one X) Y)) | ||
(defconstraint c8 () (+ Y Y (* one X))) |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{"X": [-2], "Y": [-2]} | ||
{"X": [-2], "Y": [-1]} | ||
{"X": [-2], "Y": [0]} | ||
{"X": [-2], "Y": [2]} | ||
{"X": [-2], "Y": [3]} | ||
{"X": [0,1], "Y": [0,1]} | ||
{"X": [-2,1], "Y": [1,1]} |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{"COUNTER": [0]} | ||
{"COUNTER": [0,0]} | ||
{"COUNTER": [0,0,0]} |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
(defcolumns COUNTER) | ||
(defalias CT1 COUNTER) | ||
(defalias CT2 CT1) | ||
(defconstraint heartbeat () CT2) |
Oops, something went wrong.