Check if an expression has formal dynamic semantics, as a call expression.
These are the expressions supported by c::exec-expr-call. The expression must be a function call, the function sub-expression must be an identifier, and the arguments must be supported pure expressions.
Function:
(defun expr-call-formalp (expr) (declare (xargs :guard (exprp expr))) (declare (xargs :guard (expr-unambp expr))) (let ((__function__ 'expr-call-formalp)) (declare (ignorable __function__)) (and (expr-case expr :funcall) (expr-case (expr-funcall->fun expr) :ident) (expr-list-pure-formalp (expr-funcall->args expr)))))
Theorem:
(defthm booleanp-of-expr-call-formalp (b* ((yes/no (expr-call-formalp expr))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm expr-call-formalp-of-expr-fix-expr (equal (expr-call-formalp (expr-fix expr)) (expr-call-formalp expr)))
Theorem:
(defthm expr-call-formalp-expr-equiv-congruence-on-expr (implies (expr-equiv expr expr-equiv) (equal (expr-call-formalp expr) (expr-call-formalp expr-equiv))) :rule-classes :congruence)