-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds a number of additional tests for arrays, and fixes a few bugs uncovered by them.
- Loading branch information
1 parent
44631ad
commit 8e0ff3d
Showing
15 changed files
with
380 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ "ARG": [], "BIT_4": [], "BIT_3": [], "BIT_2": [], "BIT_1": [] } | ||
;; | ||
{ "ARG": [0], "BIT_4": [0], "BIT_3": [0], "BIT_2": [0], "BIT_1": [0] } | ||
{ "ARG": [1], "BIT_4": [0], "BIT_3": [0], "BIT_2": [0], "BIT_1": [1] } | ||
{ "ARG": [2], "BIT_4": [0], "BIT_3": [0], "BIT_2": [1], "BIT_1": [0] } | ||
{ "ARG": [3], "BIT_4": [0], "BIT_3": [0], "BIT_2": [1], "BIT_1": [1] } | ||
{ "ARG": [4], "BIT_4": [0], "BIT_3": [1], "BIT_2": [0], "BIT_1": [0] } | ||
{ "ARG": [5], "BIT_4": [0], "BIT_3": [1], "BIT_2": [0], "BIT_1": [1] } | ||
{ "ARG": [6], "BIT_4": [0], "BIT_3": [1], "BIT_2": [1], "BIT_1": [0] } | ||
{ "ARG": [7], "BIT_4": [0], "BIT_3": [1], "BIT_2": [1], "BIT_1": [1] } | ||
{ "ARG": [8], "BIT_4": [1], "BIT_3": [0], "BIT_2": [0], "BIT_1": [0] } | ||
{ "ARG": [9], "BIT_4": [1], "BIT_3": [0], "BIT_2": [0], "BIT_1": [1] } | ||
{ "ARG": [10], "BIT_4": [1], "BIT_3": [0], "BIT_2": [1], "BIT_1": [0] } | ||
{ "ARG": [11], "BIT_4": [1], "BIT_3": [0], "BIT_2": [1], "BIT_1": [1] } | ||
{ "ARG": [12], "BIT_4": [1], "BIT_3": [1], "BIT_2": [0], "BIT_1": [0] } | ||
{ "ARG": [13], "BIT_4": [1], "BIT_3": [1], "BIT_2": [0], "BIT_1": [1] } | ||
{ "ARG": [14], "BIT_4": [1], "BIT_3": [1], "BIT_2": [1], "BIT_1": [0] } | ||
{ "ARG": [15], "BIT_4": [1], "BIT_3": [1], "BIT_2": [1], "BIT_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,8 @@ | ||
(defcolumns | ||
(BIT :binary@prove :array [4]) | ||
(ARG :i16@loob)) | ||
|
||
(defconstraint bits () | ||
(- ARG | ||
(reduce + | ||
(for i [0:3] (* (^ 2 i) [BIT (+ 1 i)]))))) |
Large diffs are not rendered by default.
Oops, something went wrong.
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 @@ | ||
{"ARR_1": [], "ARR_2": []} | ||
{"ARR_1": [-1], "ARR_2": [1]} | ||
{"ARR_1": [0], "ARR_2": [0]} | ||
{"ARR_1": [1], "ARR_2": [-1]} | ||
{"ARR_1": [0,-1], "ARR_2": [0,1]} | ||
{"ARR_1": [0,0], "ARR_2": [0,0]} | ||
{"ARR_1": [0,1], "ARR_2": [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,3 @@ | ||
(defcolumns (ARR :@loob :array [2])) | ||
(defconstraint c1 () (+ [ARR 1] [ARR 2])) | ||
(defconstraint c2 () (+ [ARR 2] [ARR 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,6 @@ | ||
{"ARR_1": [1], "ARR_2": [0]} | ||
{"ARR_1": [-1], "ARR_2": [0]} | ||
{"ARR_1": [0], "ARR_2": [1]} | ||
{"ARR_1": [0], "ARR_2": [-1]} | ||
{"ARR_1": [2], "ARR_2": [-1]} | ||
{"ARR_1": [-2], "ARR_2": [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,4 @@ | ||
;;error:4:24-30:not an array column | ||
(defcolumns (BIT :@loob)) | ||
|
||
(defconstraint bits () [BIT 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,4 @@ | ||
;;error:4:24-25:expected loobean constraint (found (𝔽@loob)[4]) | ||
(defcolumns (BIT :@loob :array [4])) | ||
|
||
(defconstraint bits () BIT) |
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 @@ | ||
;;error:4:24-30:expected constant array index | ||
(defcolumns X (BIT :@loob :array [4])) | ||
|
||
(defconstraint bits () [BIT 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,12 @@ | ||
;;error:12:12-18:out-of-bounds array access | ||
(defcolumns | ||
(BIT :binary@prove :array [3]) | ||
(ARG :i16@loob)) | ||
|
||
(defconstraint bits () | ||
(- ARG | ||
(+ | ||
(* 1 [BIT 1]) | ||
(* 2 [BIT 2]) | ||
(* 4 [BIT 3]) | ||
(* 8 [BIT 4])))) |
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,12 @@ | ||
;;error:12:12-18:out-of-bounds array access | ||
(defcolumns | ||
(BIT :binary@prove :array [4]) | ||
(ARG :i16@loob)) | ||
|
||
(defconstraint bits () | ||
(- ARG | ||
(+ | ||
(* 1 [BIT 0]) | ||
(* 2 [BIT 1]) | ||
(* 4 [BIT 2]) | ||
(* 8 [BIT 3])))) |