Skip to content

Commit

Permalink
Make the constraints compile again (#503)
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierBBB authored Nov 6, 2024
1 parent 5f9fdb2 commit 528d295
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions hub/constraints/instruction-handling/jump.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
;; TODO: remove ugly hack
(defconstraint jump-instruction---allowable-exceptions (:guard (jump-instruction---no-stack-exception))
(begin
(debug (eq! XAHOY (+ stack/OOGX stack/JUMPX)))))
(eq! XAHOY (+ stack/OOGX stack/JUMPX))))


(defconstraint jump-instruction---setting-the-gas-cost (:guard (jump-instruction---no-stack-exception))
Expand All @@ -69,8 +69,8 @@
(defconstraint jump-instruction---setting-NSR (:guard (jump-instruction---no-stack-exception))
(if-not-zero (force-bin stack/OOGX)
;; OOGX = 1
(begin (eq! NSR CMC)
(debug (eq! NSR 1)))
(begin (eq! NSR CMC)
(debug (eq! NSR 1 )))
;; OOGX = 0
(eq! NSR (+ 3 CMC))))

Expand Down
7 changes: 3 additions & 4 deletions hub/constraints/instruction-handling/log.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,9 @@
[ stack/DEC_FLAG 4 ])) ;; ""

(defconstraint log-instruction---allowable-exceptions (:guard (log-instruction---standard-hypothesis)) ;; TODO: solo debug constraint plz
(begin
(debug (eq! XAHOY (+ stack/STATICX
stack/MXPX
stack/OOGX)))))
(eq! XAHOY (+ stack/STATICX
stack/MXPX
stack/OOGX)))

(defconstraint log-instruction---setting-NSR (:guard (log-instruction---standard-hypothesis))
(if-zero (force-bin stack/STATICX)
Expand Down

0 comments on commit 528d295

Please sign in to comment.