fact stringlengths 6 30.1k | type stringclasses 2
values | library stringclasses 46
values | imports listlengths 0 156 | filename stringlengths 12 117 | symbolic_name stringlengths 1 145 | docstring stringclasses 1
value |
|---|---|---|---|---|---|---|
process-typed-args (l) : (process-typed-args-aux l nil)) ; (process-typed-args nil) ; (process-typed-args '(x :nat y :int)) ; (process-typed-args '(x :nat :int y :int)) ; (process-typed-args '(x u v :nat :int y z :int)) ; (process-typed-args '(x y z)) | function | acl2s | [
"defunc",
"xdoc/top"
] | acl2s/definec.lisp | process-typed-args | |
skip-keywords (l) : (cond ((endp l) l) ((keywordp (car l)) (skip-keywords (cdr l))) (t l))) | function | acl2s | [
"defunc",
"xdoc/top"
] | acl2s/definec.lisp | skip-keywords | |
proper-argsp (l) : (or (endp l) (and (consp (cdr l)) (acl2::legal-variablep (first l)) (if (acl2::keywordp (second l)) (proper-argsp (skip-keywords (cddr l))) (proper-argsp (cdr l)))))) ; (check (proper-argsp nil)) ; (check (! (proper-argsp '(x)))) ; (check (proper-argsp '(x :nat))) ; (check (proper-argsp '(x :nat :int... | function | acl2s | [
"defunc",
"xdoc/top"
] | acl2s/definec.lisp | proper-argsp | |
append-alistp : (implies (and (alistp x) (alistp y)) (alistp (append x y)))) | theorem | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | append-alistp | |
rev-alistp : (implies (alistp x) (alistp (rev x)))) | theorem | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | rev-alistp | |
alistp-extract-keywords : (implies (alistp l) (alistp (mv-nth 0 (extract-keywords ctx k d l b))))) | theorem | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | alistp-extract-keywords | |
acl2-count-append : (<= (acl2-count (append x y)) (+ (acl2-count x) (acl2-count y) 1)) :rule-classes :linear) ; to verify this guard, I need to know more about the shape of tbl, ; atbl, etc. one idea here is to use defdata to speficy types for tbl, ; atbl. | theorem | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | acl2-count-append | |
function-guard-obligation (fun-name state) : (declare (xargs :mode :program :guard (symbolp fun-name) :stobjs (state))) (b* (((mv cl-set &) (guard-clauses-for-clique (list fun-name) T ;debug-p (ens state) (w state) (f-get-global 'safe-mode state) (gc-off state) nil)) (guard-ob (prettyify-clause-set cl-set (let*-abstrac... | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | function-guard-obligation | |
simple-termp (x) : (declare (xargs :guard t)) (cond ((atom x) t) ((eq (car x) 'quote) (and (consp (cdr x)) (null (cdr (cdr x))))) ((not (true-listp x)) nil) ((not (simple-term-listp (cdr x))) nil) (t (or (symbolp (car x)) (and (true-listp (car x)) (equal (length (car x)) 3) (eq (car (car x)) 'lambda) (symbol-listp (cad... | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | simple-termp | |
simple-term-listp (lst) : (declare (xargs :guard t)) (cond ((atom lst) (equal lst nil)) (t (and (simple-termp (car lst)) (simple-term-listp (cdr lst))))))) | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | simple-term-listp | |
xargs-kwd-alist1 (decls keywords ctx al) : (declare (xargs :guard (and (keyword-listp keywords) (no-duplicatesp keywords) (alistp al)))) (if (atom decls) al (if (and (consp (car decls)) (eq 'acl2::declare (caar decls)) (consp (cdr (car decls))) (consp (cadr (car decls))) (eq 'acl2::xargs (first (cadr (car decls))))) (b... | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | xargs-kwd-alist1 | |
xargs-kwd-alist (decls ctx) : "Parse a list of declare forms into a kwd-alist mapping xarg keywords to their values." (xargs-kwd-alist1 decls *our-xargs-keywords* ctx nil)) #!ACL2 (verify-termination find-runed-lemma (declare (xargs :measure (if (null lst) 0 (1+ (acl2-count lst)))))) #| #!ACL2 (verify-guards find-runed... | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | xargs-kwd-alist | |
controller-alist (nm wrld) : (declare (xargs :guard (plist-worldp wrld) :verify-guards nil)) (if (and (not (symbolp nm)) (not (function-symbolp nm wrld))) nil (let ((rl (find-runed-lemma `(:definition ,nm) (getprop nm 'lemmas nil 'current-acl2-world wrld)))) (if rl (let ((ctrl-pocket (cdr (assoc-eq nm (cdr (access rewr... | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | controller-alist | |
c-is-t (c) : (declare (xargs :guard t)) (or (equal c 't) (equal c ''t))) | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | c-is-t | |
unalias-pred (pred ptbl) : (declare (xargs :guard (and (symbolp pred) (sym-aalistp ptbl)))) (let ((apred (assoc-equal :predicate (get-alist pred ptbl)))) (if apred (cdr apred) pred))) | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | unalias-pred | |
pred-of-oc (name formals oc ptbl) : (declare (xargs :guard (and (symbolp name) (symbol-listp formals) (or (atom oc) (symbolp (car oc))) (sym-aalistp ptbl)))) (and (consp oc) (equal (cdr oc) `((,name ,@formals))) (unalias-pred (car oc) ptbl))) | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | pred-of-oc | |
map-force-list (l) : (declare (xargs :guard (true-listp l))) (if (endp l) l (cons `(force ,(car l)) (map-force-list (cdr l))))) | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | map-force-list | |
map-force-ic (ic) : (declare (xargs :guard (or (booleanp ic) (true-listp ic)))) (cond ((equal ic 't) 't) ((and (consp ic) (equal (car ic) 'acl2::and)) (cons 'and (map-force-list (cdr ic)))) (t `(force ,ic)))) | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | map-force-ic | |
wrap-test-skip (skip? x) : (declare (xargs :guard (booleanp skip?))) (if skip? `(test-then-skip-proofs ,x) x)) | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | wrap-test-skip | |
add-output-contract-check (body output-contract fun-name fun-args wrld) : "To body, we insert a runtime check for output-contract." (declare (xargs :mode :program :guard (and (symbolp fun-name) (true-listp fun-args) (plist-worldp wrld)))) (b* (;(ctx 'add-output-contract-check) ((mv ?erp tbody) (acl2::pseudo-translate b... | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | add-output-contract-check | |
get-undef-name (pred d? typed-undef pkg wrld) : (declare (xargs :guard (and (symbolp pred) (booleanp d?) (booleanp typed-undef) (pkgp pkg) (plist-worldp wrld)) :verify-guards nil)) (b* ((tbl (type-metadata-table wrld)) (ptbl (pred-alias-table wrld)) (type (type-of-pred pred tbl ptbl)) (undef-name (if (and type typed-un... | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | get-undef-name | |
make-generic-typed-defunc-events (name formals ic oc decls body kwd-alist make-staticp d? pkg wrld) : "Generate events which simulate a typed ACL2s language." (declare (xargs :guard (and (symbolp name) (symbol-listp formals) (booleanp make-staticp) (booleanp d?) (pkgp pkg) (plist-worldp wrld)))) (declare (ignorable wrl... | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | make-generic-typed-defunc-events | |
make-contract-body (name ic oc formals d? rem-hyps? f-c-thm? typed-undef pkg w) : ; (declare (xargs :mode :program)) (b* ((ptbl (pred-alias-table w)) (pred (pred-of-oc name formals oc ptbl)) (undef-name (get-undef-name pred d? typed-undef pkg w))) (if (or (c-is-t ic) (and rem-hyps? (not (member undef-name '(acl2s-undef... | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | make-contract-body | |
make-contract-defthm (name ic oc kwd-alist formals d? typed-undef pkg w) : (declare (xargs :mode :program)) (b* ((instructions (get1 :instructions kwd-alist)) (otf-flg (get1 :otf-flg kwd-alist)) (hints (get1 :function-contract-hints kwd-alist)) (rule-classes (get1 :rule-classes kwd-alist)) (f-c-thm? (get1 :force-ic-hyp... | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | make-contract-defthm | |
just-type-hyps1 (ic M P) : (cond ((atom ic) nil) ((atom (car ic)) (just-type-hyps1 (cdr ic) M P)) ((symbolp (caar ic)) (b* ((t-pred (type-of-pred (caar ic) M P))) (if t-pred (cons (cons (unalias-pred (caar ic) P) (cdar ic)) (just-type-hyps1 (cdr ic) M P)) (just-type-hyps1 (cdr ic) M P)))) (t (just-type-hyps1 (cdr ic) M... | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | just-type-hyps1 | |
just-type-hyps (ic M P) : (cond ((atom ic) nil) ((equal (car ic) 'and) (remove-dups (just-type-hyps1 (cdr ic) M P))) ((symbolp (car ic)) (b* ((t-pred (type-of-pred (car ic) M P))) (and t-pred (list (cons (unalias-pred (car ic) P) (cdr ic)))))) (t nil))) | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | just-type-hyps | |
subliss (alists tree) : (if (endp alists) nil (cons (acl2::sublis (car alists) tree) (subliss (cdr alists) tree)))) | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | subliss | |
neg-literal (x) : (if (and (consp x) (eq (car x) 'not)) (second x) `(not ,x))) | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | neg-literal | |
neg-hyps (l) : (if (endp l) nil (cons (neg-literal (car l)) (neg-hyps (cdr l))))) | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | neg-hyps | |
exists-subset (X y) : (and (consp X) (or (subsetp-equal (car X) y) (exists-subset (cdr X) y)))) | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | exists-subset | |
make-gen-hint-body (name formals ic contract-gen-name w) : (b* ((M (table-alist 'type-metadata-table w)) (P (table-alist 'pred-alias-table w)) (hyps (just-type-hyps ic M P)) (nhyps (neg-hyps hyps)) (gen-hint-body `(if (and stable-under-simplificationp (member-eq (acl2::access acl2::history-entry (car hist) :processor) ... | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | make-gen-hint-body | |
make-contract-ev (name formals ic oc kwd-alist make-staticp d? pkg w) : (declare (xargs :mode :program)) (b* (((when (c-is-t oc)) nil) ;trivially satisfied (function-contract-strictp (get1 :function-contract-strictp kwd-alist)) (f-c-thm? (get1 :force-ic-hyps-in-contract-thmp kwd-alist)) (instructions (get1 :instruction... | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | make-contract-ev | |
make-verify-guards-ev (name kwd-alist) : (b* ((hints (get1 :body-contracts-hints kwd-alist)) | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | make-verify-guards-ev | |
acl2s-undefined (x y) : (declare (ignorable x y)) nil))) (encapsulate ((acl2s-d-undefined () t :guard t)) (local (defun acl2s-d-undefined () nil))) | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | acl2s-undefined | |
gather-alias1 (alias alist) : (declare (xargs :guard (and (symbol-listp alias) (alistp alist)))) (cond ((endp alist) nil) ((member-equal (caar alist) alias) (cons (cdar alist) (gather-alias1 alias (cdr alist)))) (t (gather-alias1 alias (cdr alist))))) | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | gather-alias1 | |
gather-alias (alias alist) : (remove-dups (gather-alias1 alias alist))) | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | gather-alias | |
make-contract (name args pred) : (declare (xargs :guard (and (symbolp name) (true-listp args) (symbolp pred)))) (cond ((equal pred 'acl2s::allp) t) (t `(,pred ,(cons name args))))) | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | make-contract | |
simplify-constant-types (l acc name formals tbl atbl pkg) : (declare (xargs :guard (and (true-listp l) (true-listp acc) (symbolp name) (symbol-listp formals) (sym-aalistp tbl) (sym-aalistp atbl) (pkgp pkg)) :verify-guards nil :measure (acl2-count l))) (cond ((endp l) (rev acc)) ((member-equal (car l) '(t :all)) (simpli... | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | simplify-constant-types | |
merge-simplify-types (l name formals tbl atbl pkg) : (declare (xargs :guard (and (true-listp l) (symbolp name) (symbol-listp formals) (sym-aalistp tbl) (sym-aalistp atbl) (pkgp pkg)) :verify-guards nil)) (b* ((sct (simplify-constant-types l nil name formals tbl atbl pkg)) (sct (remove-dups sct))) (cond ((null sct) t) (... | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | merge-simplify-types | |
get1-alias (alias alist) : (if (endp alias) nil (or (get1 (car alias) alist) (get1-alias (cdr alias) alist)))) | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | get1-alias | |
show-contract-violations () : (declare (xargs :guard t)) t) | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | show-contract-violations | |
do-not-show-contract-violations () : (declare (xargs :guard t)) nil) ; PETE: ; If you want to see contract violations printed in an ACL2s ; session, you can do that with the following event: ; (defattach show-contract-violations? show-contract-violations) | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | do-not-show-contract-violations | |
acl2s-undefined-attached (name args) : (declare (xargs :guard (and (symbolp name) (true-listp args)))) (prog2$ (cgen::cw? (show-contract-violations?) "~|**Input contract violation**: ~x0 ~%" `(,name ,@args)) nil)) | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | acl2s-undefined-attached | |
acl2s-undefined-attached-base (name args) : (declare (xargs :guard (and (symbolp name) (true-listp args)))) (declare (ignorable name args)) nil) ; If you want to see contract violations printed in an ACL2s ; session, you can do that with the following event: ; (defattach acl2s-undefined acl2s-undefined-attached-base) (... | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | acl2s-undefined-attached-base | |
acl2s-d-undefined-attached () : (declare (xargs :guard t)) (prog2$ (cw "~|**Input contract violation** ~%") nil)) | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | acl2s-d-undefined-attached | |
acl2s-d-undefined-attached-base () : (declare (xargs :guard t)) nil) (make-event (if *print-contract-violations* '(defattach acl2s-d-undefined acl2s-d-undefined-attached) '(defattach acl2s-d-undefined acl2s-d-undefined-attached-base)) :check-expansion t) |# | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | acl2s-d-undefined-attached-base | |
acl2s-d-undefined-attached () : (declare (xargs :guard t)) (prog2$ (cgen::cw? (show-contract-violations?) "~|**Input contract violation** ~%") nil)) | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | acl2s-d-undefined-attached | |
modify-xargs-decl (key val decl) : (b* ((kwd-val-list (cdr (cadr decl))) (kwd-val-list (remove-keyword key kwd-val-list))) (list 'DECLARE (cons 'XARGS (list* key val kwd-val-list))))) #!ACL2 | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | modify-xargs-decl | |
update-xargs-decls-fn (decls guard mode) : "add guard and mode to decls, or create a decl if decls is empty." (b* ((xargs-decl (car (last decls)))) ;PRECONDITION: we know that the xargs declare is at the end (cond (mode (append (butlast decls 1) (list (modify-xargs-decl :mode mode (modify-xargs-decl :guard guard xargs-... | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | update-xargs-decls-fn | |
print-time-taken (start end state) : (declare (xargs :mode :program :stobjs (state))) (b* ((- (cw "~|Elapsed Run Time: "))) (pprogn (acl2::print-rational-as-decimal (rfix (- end start)) (standard-co state) state) (princ$ " seconds" (standard-co state) state) (newline (standard-co state) state) (value :invisible)))) | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | print-time-taken | |
print-summary-ev (name oc kwd-alist pkg) : `(b* ((symbol-class (acl2::symbol-class ',name (w state))) (contract-name (make-sym ',name 'contract ,pkg)) (function-contract-proven-p (or (c-is-t ',oc) (acl2::logical-namep contract-name (w state)))) (print (get1 :print-summary ',kwd-alist)) ((mv end state) (acl2::read-run-t... | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | print-summary-ev | |
print-*-or-space (b) : (if b "*" " ")) | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | print-*-or-space | |
make-defun-no-guard-ev (name formals ic oc decls body kwd-alist make-staticp d? pkg wrld) : (declare (xargs :mode :program)) (b* ((typed-undef (get1 :typed-undef kwd-alist)) (lbody (make-defun-body/logic name formals ic oc body make-staticp d? typed-undef pkg wrld)) (ebody (make-defun-body/exec name formals oc body mak... | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | make-defun-no-guard-ev | |
timeout-abort-fn (start-time timeout-secs debug state) : (declare (xargs :mode :program :stobjs (state))) (b* (((mv end state) (acl2::read-run-time state)) (time-elapsed (- end start-time)) (- (cw? debug "~| Elapsed Time is ~x0 and timeout-secs is ~x1 ~%" time-elapsed timeout-secs)) (- (cw? (> time-elapsed timeout-secs... | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | timeout-abort-fn | |
defunc-events-with-staticp-flag (name formals ic oc decls body kwd-alist make-staticp d? pkg wrld) : "Depending on flag make-staticp, we generate either events with static contracts or with dynamic contracts (contracts checked at runtime)." (declare (xargs :mode :program)) (if (get1 :program-mode-p kwd-alist) '(mv t ni... | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | defunc-events-with-staticp-flag | |
program-mode-defunc-events (name formals ic oc decls body kwd-alist d? pkg wrld) : (declare (xargs :mode :program)) (b* ((typed-undef (get1 :typed-undef kwd-alist)) (dynamic-body (make-defun-body/logic name formals ic oc body nil d? typed-undef pkg wrld)) (decls (update-xargs-decls decls :guard ic :mode :program)) (deb... | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | program-mode-defunc-events | |
car-eq-extra-info (x) : (declare (xargs :guard t)) (and (consp x) (consp (car x)) (eq (car (car x)) 'ACL2::EXTRA-INFO))) | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | car-eq-extra-info | |
extract-extra-info (hyps) : (declare (xargs :guard t)) (cond ((atom hyps) nil) ((car-eq-extra-info hyps) (cons (car hyps) (extract-extra-info (cdr hyps)))) ((atom (car hyps)) (extract-extra-info (cdr hyps))) (t (append (extract-extra-info (car hyps)) (extract-extra-info (cdr hyps)))))) | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | extract-extra-info | |
print-guard-extra-info-hyps-aux (x yesp) : (declare (xargs :guard (booleanp yesp))) (if (atom x) nil (prog2$ (cgen::cw? yesp "~| -- ~x0~%" (car x)) (print-guard-extra-info-hyps-aux (cdr x) yesp)))) | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | print-guard-extra-info-hyps-aux | |
print-guard-extra-info-hyps (hyps yesp) : (declare (xargs :guard (booleanp yesp))) (let ((ei (remove-dups (extract-extra-info hyps)))) (print-guard-extra-info-hyps-aux ei yesp))) | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | print-guard-extra-info-hyps | |
test-body-contracts1 (guards hints override-defaults timeout state) : (declare (xargs :mode :program :stobjs (state))) (if (endp guards) (value nil) (b* ((vl (acl2s-defaults :get verbosity-level)) ((unless (cgen::normal-output-flag vl)) (value nil)) | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | test-body-contracts1 | |
test-body-contracts (guard-obligation hints override-defaults timeout state) : "This is just a looping test?-fn over multiple guards, and on error, printing out the appropriate guard-info." (declare (xargs :mode :program :stobjs (state))) (b* ((guards (if (and (consp guard-obligation) (eq 'ACL2::AND (car guard-obligati... | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | test-body-contracts | |
make-show-failure-msg-ev (start-time kwd-alist events-seen) : `(with-output :off :all :on (error comment) (make-event (b* ((body-contracts-strictp (get1 :body-contracts-strictp ',kwd-alist)) (function-contract-strictp (get1 :function-contract-strictp ',kwd-alist)) (termination-strictp (get1 :termination-strictp ',kwd-a... | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | make-show-failure-msg-ev | |
events-seen-list (parsed make-staticp d? pkg wrld) : (declare (xargs :mode :program)) (b* (((list name formals ic oc decls body kwd-alist) parsed) | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | events-seen-list | |
union-keyword-value-lists (kwd-val-lst1 kwd-val-lst2) : (if (endp kwd-val-lst1) kwd-val-lst2 (b* ((key (car kwd-val-lst1)) (value (cadr kwd-val-lst1)) (rest (cddr kwd-val-lst1))) (union-keyword-value-lists rest (list* key value (acl2::remove-keyword key kwd-val-lst2)))))) #!ACL2 | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | union-keyword-value-lists | |
collect-xargs-into-single-declare (xargs-decls ans-kwd-val-lst) : (if (endp xargs-decls) (list 'DECLARE (cons 'XARGS (list* :VERIFY-GUARDS NIL :NORMALIZE NIL ;o.w definition-rule fails in e.g defunc len (remove-keyword :normalize (remove-keyword :verify-guards ans-kwd-val-lst))))) (b* ((curr-kwd-val-lst (cdr (cadr (car... | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | collect-xargs-into-single-declare | |
squeeze-multiple-xarg-decls (decls) : "collect all xargs decls, squeeze them into one decl and put that at the end." (b* ((xargs-decls (filter-xargs-decls decls)) (xargs-decl (acl2::collect-xargs-into-single-declare xargs-decls '()))) (append (set-difference-equal decls xargs-decls) (list xargs-decl)))) | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | squeeze-multiple-xarg-decls | |
fix-termination-xarg-decls (termination-method decls) : "remove :time-limit xargs if the :termination-method is :measure." (b* ((xargs-decls (filter-xargs-decls decls)) (xargs-decl (car xargs-decls)) (xarg-decls (cdadr xargs-decl)) ((unless xarg-decls) decls) (time-limit (member :time-limit xarg-decls)) (termination-de... | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | fix-termination-xarg-decls | |
defunc-table (wrld) : "api to get the alist representing defun-defaults-table" (declare (xargs :guard (plist-worldp wrld))) (table-alist 'defunc-defaults-table wrld)) | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | defunc-table | |
program-mode-p (name formals body decls wrld) : "Check if :mode :program is declared, or check if current mode is (program), or if body has a program-mode function call" (declare (xargs :mode :program)) (b* ((xargs{} (xargs-kwd-alist decls 'program-mode-p)) (pm? (eq (get1 :mode xargs{}) :program)) ((mv ?erp tbody) (acl... | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | program-mode-p | |
replace-assoc-equal (name alias val alist) : (declare (xargs :guard (and (alistp alist) (true-listp alias)))) (cond ((endp alist) (list (cons name val))) ((or (equal name (caar alist)) (member-equal (caar alist) alias)) (replace-assoc-equal name alias val (cdr alist))) (t (cons (car alist) (replace-assoc-equal name ali... | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | replace-assoc-equal | |
parse-defunc (name args termination-method pkg wrld) : | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | parse-defunc | |
make-undefined-aux (parsed d? do-it pkg w) : (declare (xargs :mode :program)) (b* (((list name formals & oc & & kwd-alist) parsed) (tbl (type-metadata-table w)) (ptbl (pred-alias-table w)) (skip-admissibilityp (get1 :skip-admissibilityp kwd-alist)) (typed-undef (get1 :typed-undef kwd-alist)) (pred (pred-of-oc name form... | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | make-undefined-aux | |
make-undefined (parsed d? pkg w) : (declare (xargs :mode :program)) (make-undefined-aux parsed d? nil pkg w)) | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | make-undefined | |
defunc-events (parsed d? state) : (declare (xargs :mode :program :stobjs (state))) (b* (((list name formals ic oc decls body kwd-alist) parsed) (pkg (current-package state)) (wrld (w state)) | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | defunc-events | |
generate-defunc-definec-macros-fn (l) : (if (endp l) l (b* ((suffix (car l)) (keyword (gen-keyword suffix)) | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | generate-defunc-definec-macros-fn | |
generate-defunc-definec-macros-fns (l) : `(encapsulate () ,@(generate-defunc-definec-macros-fn l))) | function | acl2s | [
"cgen/top",
"utilities",
"kestrel/utilities/system/terms",
"std/lists/top",
"xdoc/top"
] | acl2s/defunc.lisp | generate-defunc-definec-macros-fns | |
chk-common-lisp-compliant-subfunctions-cmp-testing (names0 names terms wrld str
ctx) : ; See chk-common-lisp-compliant-subfunctions and note especially its warning ; about how not all names have been defined in wrld. (cond ((null names) (value-cmp nil)) (t (let*... | function | acl2s | [] | acl2s/guard-obligation-testing.lisp | chk-common-lisp-compliant-subfunctions-cmp-testing | |
chk-acceptable-verify-guards-formula-cmp-testing (name x ctx wrld state-vars) : (mv-let (erp term bindings) (translate1-cmp x :stobjs-out '((:stobjs-out . :stobjs-out)) t ; known-stobjs ctx wrld state-vars) (declare (ignore bindings)) (cond ((and erp (null name)) ; erp is a ctx and val is a msg (mv-let (erp2 term2 bind... | function | acl2s | [] | acl2s/guard-obligation-testing.lisp | chk-acceptable-verify-guards-formula-cmp-testing | |
chk-acceptable-verify-guards-cmp-testing (name rrp guard-simplify ctx wrld
state-vars) : ; We check that name is acceptable input for verify-guards and either cause an ; error or return the list of objects from which guard clauses should be ; generated or (when rrp = t, we ... | function | acl2s | [] | acl2s/guard-obligation-testing.lisp | chk-acceptable-verify-guards-cmp-testing | |
guard-obligation-clauses-testing (x guard-debug ens wrld state) : ; X is of one of three forms: (i) a list of function names and/or well-formed ; lambda object, (ii) a singleton list containing a theorem name, or (iii) ; (:term . y) where y must be a translated term. Returns two results. The ; first is a set of clauses... | function | acl2s | [] | acl2s/guard-obligation-testing.lisp | guard-obligation-clauses-testing | |
guard-obligation-testing (x rrp guard-debug guard-simplify ctx state) : (let* ((wrld (w state)) (namep (and (symbolp x) (not (keywordp x)) (not (defined-constant x wrld))))) (er-let*-cmp ((y (cond (namep (chk-acceptable-verify-guards-cmp-testing x rrp guard-simplify ctx wrld (default-state-vars t))) (t (chk-acceptable-... | function | acl2s | [] | acl2s/guard-obligation-testing.lisp | guard-obligation-testing | |
acl2-count (x) : (declare (xargs :guard t :mode :program)) (if (consp x) (+ 1 (acl2-count (car x)) (acl2-count (cdr x))) (if (rationalp x) (if (integerp x) (integer-abs x) (+ (integer-abs (numerator x)) (denominator x))) (if (complex/complex-rationalp x) (+ 1 (acl2-count (realpart x)) (acl2-count (imagpart x))) (if (st... | function | acl2s | [
"acl2s/custom"
] | acl2s/match-testing.lisp | acl2-count | |
acl2s-size (x) : (declare (xargs :guard t)) (cond ((consp x) (+ 1 (acl2s-size (car x)) (acl2s-size (cdr x)))) ((rationalp x) (integer-abs (numerator x))) ((stringp x) (length x)) (t 0))) |# | function | acl2s | [
"acl2s/custom"
] | acl2s/match-testing.lisp | acl2s-size | |
acl2s-size-consp : (=> (consp x) (< 0 (acl2s-size x))) :rule-classes ((:linear) (:type-prescription))) | theorem | acl2s | [
"acl2s/ccg/ccg",
"definec",
"base-lists",
"base-arithmetic",
"xdoc/top"
] | acl2s/match.lisp | acl2s-size-consp | |
acl2s-size-of-car : (implies (equal (acl2s-size (car x)) (acl2s-size x)) (atom x)) :rule-classes (:forward-chaining)) | theorem | acl2s | [
"acl2s/ccg/ccg",
"definec",
"base-lists",
"base-arithmetic",
"xdoc/top"
] | acl2s/match.lisp | acl2s-size-of-car | |
acl2s-size-cdr : (<= (acl2s-size (cdr x)) (acl2s-size x)) :rule-classes :linear) | theorem | acl2s | [
"acl2s/ccg/ccg",
"definec",
"base-lists",
"base-arithmetic",
"xdoc/top"
] | acl2s/match.lisp | acl2s-size-cdr | |
acl2s-size-car : (<= (acl2s-size (car x)) (acl2s-size x)) :rule-classes :linear) | theorem | acl2s | [
"acl2s/ccg/ccg",
"definec",
"base-lists",
"base-arithmetic",
"xdoc/top"
] | acl2s/match.lisp | acl2s-size-car | |
acl2s-size- : <=-strip-cdrs (<= (acl2s-size (strip-cdrs x)) (acl2s-size x)) :rule-classes :linear) | theorem | acl2s | [
"acl2s/ccg/ccg",
"definec",
"base-lists",
"base-arithmetic",
"xdoc/top"
] | acl2s/match.lisp | acl2s-size- | |
acl2s-size- : <=-strip-cars (<= (acl2s-size (strip-cars x)) (acl2s-size x)) :rule-classes :linear) | theorem | acl2s | [
"acl2s/ccg/ccg",
"definec",
"base-lists",
"base-arithmetic",
"xdoc/top"
] | acl2s/match.lisp | acl2s-size- | |
acl2s-size- : <-strip-cars (=> (consp (car x)) (< (acl2s-size (strip-cars x)) (acl2s-size x))) :rule-classes :linear) | theorem | acl2s | [
"acl2s/ccg/ccg",
"definec",
"base-lists",
"base-arithmetic",
"xdoc/top"
] | acl2s/match.lisp | acl2s-size- | |
acl2s-size- : <-strip-cdrs (=> (consp (car x)) (< (acl2s-size (strip-cdrs x)) (acl2s-size x))) :rule-classes :linear) | theorem | acl2s | [
"acl2s/ccg/ccg",
"definec",
"base-lists",
"base-arithmetic",
"xdoc/top"
] | acl2s/match.lisp | acl2s-size- | |
strip-cars-cdrs- : = (=> (alistp x) (= (+ (acl2s-size (strip-cars x)) (acl2s-size (strip-cdrs x))) (acl2s-size x))) :rule-classes :linear) | theorem | acl2s | [
"acl2s/ccg/ccg",
"definec",
"base-lists",
"base-arithmetic",
"xdoc/top"
] | acl2s/match.lisp | strip-cars-cdrs- | |
march-pats-codes-or : (=> (and (match-pats-codes (cons (list* :or pats5 pats6) pats2) codes) (true-list-listp codes) (tlp pats2)) (match-pats-codes (cons (cons :or pats6) pats2) codes))) | theorem | acl2s | [
"acl2s/ccg/ccg",
"definec",
"base-lists",
"base-arithmetic",
"xdoc/top"
] | acl2s/match.lisp | march-pats-codes-or | |
symbol-doublet-listp-assoc-equal : (implies (and (symbol-doublet-listp bindings) (not (consp (cdr (assoc-equal pat bindings))))) (not (cdr (assoc-equal pat bindings))))) | theorem | acl2s | [
"acl2s/ccg/ccg",
"definec",
"base-lists",
"base-arithmetic",
"xdoc/top"
] | acl2s/match.lisp | symbol-doublet-listp-assoc-equal | |
match-tests-and-bindings-guards1 : (implies (tlp y) (tlp (mv-nth 0 (match-tests-and-bindings x pat y z)))) :rule-classes :type-prescription) | theorem | acl2s | [
"acl2s/ccg/ccg",
"definec",
"base-lists",
"base-arithmetic",
"xdoc/top"
] | acl2s/match.lisp | match-tests-and-bindings-guards1 | |
match-tests-and-bindings-guards3 : (implies (tlp z) (tlp (mv-nth 1 (match-tests-and-bindings x pat y z)))) :rule-classes :type-prescription) | theorem | acl2s | [
"acl2s/ccg/ccg",
"definec",
"base-lists",
"base-arithmetic",
"xdoc/top"
] | acl2s/match.lisp | match-tests-and-bindings-guards3 | |
match-tests-and-bindings-guards2 : (implies (symbol-doublet-listp z) (symbol-doublet-listp (mv-nth 1 (match-tests-and-bindings x pat y z))))) (verify-guards match-tests-and-bindings) | theorem | acl2s | [
"acl2s/ccg/ccg",
"definec",
"base-lists",
"base-arithmetic",
"xdoc/top"
] | acl2s/match.lisp | match-tests-and-bindings-guards2 | |
match-tests-and-bindings (x pat tests bindings) : ; Modified from basis-a.lisp ; We return two results. The first is a list of tests, in reverse ; order, that determine whether x matches the structure pat. We ; describe the language of pat below. The tests are accumulated onto ; tests, which should be nil initially. Th... | function | acl2s | [
"acl2s/ccg/ccg",
"definec",
"base-lists",
"base-arithmetic",
"xdoc/top"
] | acl2s/match.lisp | match-tests-and-bindings | |
match-clause (x pat forms) : (declare (xargs :guard t)) (mv-let (tests bindings) (match-tests-and-bindings x pat nil nil) (list (if (null tests) t (cons 'and (reverse tests))) (cons 'let (cons (reverse bindings) forms))))) | function | acl2s | [
"acl2s/ccg/ccg",
"definec",
"base-lists",
"base-arithmetic",
"xdoc/top"
] | acl2s/match.lisp | match-clause |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.