Skip to content
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

feat: update shf test #491

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions pkg/test/valid_corset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -805,11 +805,10 @@ func TestSlow_Mxp(t *testing.T) {
Check(t, true, "mxp")
}

/*
func TestSlow_Shf(t *testing.T) {
Check(t, true, "shf")
}
*/
func TestSlow_Shf(t *testing.T) {
Check(t, true, "shf")
}

func TestSlow_Euc(t *testing.T) {
Check(t, true, "euc")
}
Expand Down
4 changes: 2 additions & 2 deletions testdata/shf.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@
;; 2.5 shifting constraints ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun (left-shift-by k ct bit_b bit_n B1_init B2_init B1_shft B2_shft)
(defun (left-shift-by k ct bit_b (bit_n :binary) B1_init B2_init B1_shft B2_shft)
(begin (plateau-constraint ct bit_n (- LLARGE k))
(if-zero bit_b
(begin (= B1_shft B1_init)
Expand All @@ -278,7 +278,7 @@
(shift B2_init (- k LLARGE)))
(vanishes! B2_shft))))))

(defun (right-shift-by k ct neg inst bit_b bit_n B1_init B2_init B1_shft B2_shft)
(defun (right-shift-by k ct neg inst bit_b (bit_n :binary) B1_init B2_init B1_shft B2_shft)
(begin (plateau-constraint ct bit_n k)
(if-zero bit_b
(begin (= B1_shft B1_init)
Expand Down
Loading