Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/artem/lib-print-fix'
Browse files Browse the repository at this point in the history
  • Loading branch information
mariari committed Nov 22, 2023
2 parents 2fbb628 + 21b4edb commit f3df778
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/vampir/vampir.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@
(make-wire :var :lst))))))))

(defun n-th (lst n)
(make-application :func :nth
(make-application :func :n_th
:arguments (list lst n)))

(defparameter *negative*
Expand All @@ -227,7 +227,7 @@
:inputs (list :n :a)
:body
(list (make-application
:func :nth
:func :n_th
:arguments
(list (range-n
(make-infix :op :+
Expand Down Expand Up @@ -267,7 +267,7 @@
(b-wire (make-wire :var :b))
(q-wire (make-wire :var :q))
(r-wire (make-wire :var :r)))
(make-alias :name :mod32
(make-alias :name :mod_n
:inputs (list :n :a :b)
:body (list
(make-equality
Expand All @@ -278,7 +278,7 @@
:names (list q-wire)
:value (make-application
:func :fresh
:arguments (list (make-infix :op :/
:arguments (list (make-infix :op :\\
:lhs a-wire
:rhs b-wire))))
(make-bind
Expand All @@ -298,7 +298,7 @@
:lhs (make-infix :op :*
:lhs b-wire
:rhs q-wire)
:rhs q-wire))
:rhs r-wire))
(make-equality :lhs (make-application
:func :negative
:arguments
Expand All @@ -310,7 +310,7 @@
r-wire))))

(defun mod-n (n a b)
(make-application :func :mod-n
(make-application :func :mod_n
:arguments (list n a b)))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Expand Down Expand Up @@ -413,7 +413,7 @@

(defparameter *combine-aux*
(make-alias
:name :combine-aux
:name :combine_aux
:inputs (list :x :y)
:body (list (make-infix :op :+
:lhs (make-wire :var :x)
Expand Down Expand Up @@ -462,15 +462,15 @@
(defparameter *drop-ith-rec*
(make-alias
:name :drop_ith_rec
:inputs (list (cons-deconstruct :h :t))
:inputs (list :take (cons-deconstruct :h :t))
:body (list (make-infix :lhs (make-wire :var :h)
:rhs (make-application
:func :take
:arguments (list (make-wire :var :t)))
:op :|:|))))

(defparameter *drop-ith*
(let ((one (make-constant :const 1)))
(let ((l-wire (make-wire :var :l)))
(make-alias
:name :drop_ith
:inputs (list :n)
Expand All @@ -482,9 +482,9 @@
:func :fun
:arguments
(list (make-infix :lhs (make-wire :var :h)
:rhs one
:rhs l-wire
:op :|:|)
(make-curly :value one)))))))))
(make-curly :value l-wire)))))))))

(defun drop-ith (n)
(make-application :func :drop_ith
Expand Down

0 comments on commit f3df778

Please sign in to comment.