Basic constructor macro for expr-binary structures.
(make-expr-binary [:op <op>]
[:arg1 <arg1>]
[:arg2 <arg2>]
[:info <info>])
This is the usual way to construct expr-binary structures. It simply conses together a structure with the specified fields.
This macro generates a new expr-binary structure from scratch. See also change-expr-binary, which can "change" an existing structure, instead.
This is an ordinary
Macro:
(defmacro make-expr-binary (&rest args) (std::make-aggregate 'expr-binary args '((:op) (:arg1) (:arg2) (:info)) 'make-expr-binary nil))
Function:
(defun expr-binary (op arg1 arg2 info) (declare (xargs :guard (and (binopp op) (exprp arg1) (exprp arg2) (acl2::any-p info)))) (declare (xargs :guard t)) (b* ((op (mbe :logic (binop-fix op) :exec op)) (arg1 (mbe :logic (expr-fix arg1) :exec arg1)) (arg2 (mbe :logic (expr-fix arg2) :exec arg2)) (info (mbe :logic (identity info) :exec info))) (cons :binary (cons (cons op arg1) (cons arg2 info)))))