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 |
|---|---|---|---|---|---|---|
get-rs2-of-asm-sra : (equal (get-rs2 (asm-sra rs1 rs2 rd)) (n05 rs2)) :hints (("Goal" :in-theory (enable asm-sra )))) (gl::def-gl-thm get-rd-of-asm-sra-gl :hyp (and (n05p i) (n05p j) (n05p k)) :concl (equal (get-rd (+ 1073762355 (ash k 7) (ash i 15) (ash j 20))) k) :g-bindings (gl::auto-bindings (:nat i 5) (:nat j 5) (... | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/r-type.lisp | get-rs2-of-asm-sra | |
get-rd-of-asm-sra : (equal (get-rd (asm-sra rs1 rs2 rd)) (n05 rd)) :hints (("Goal" :in-theory (enable asm-sra)))) | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/r-type.lisp | get-rd-of-asm-sra | |
n32p-of-asm-slt : (n32p (asm-slt rs1 rs2 rd)) :hints (("Goal" :in-theory (enable asm-slt) :use ((:instance n32p-of-asm-slt-gl (i (n05 rs1)) (j (n05 rs2)) (k (n05 rd))))))) (gl::def-gl-thm get-opcode-of-asm-slt-gl :hyp (and (n05p i) (n05p j) (n05p k)) :concl (equal (get-opcode (logand (+ 8243 (ash k 7) (ash i 15) (ash j... | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/r-type.lisp | n32p-of-asm-slt | |
get-opcode-of-asm-slt : (equal (get-opcode (asm-slt i j k)) #b0110011) :hints (("Goal" :in-theory (enable asm-slt) :use ((:instance get-opcode-of-asm-slt-gl (i (n05 i)) (j (n05 j)) (k (n05 k))))))) | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/r-type.lisp | get-opcode-of-asm-slt | |
get-funct3-of-asm-slt : (equal (get-funct3 (asm-slt i j k)) #x2) :hints (("Goal" :in-theory (enable asm-slt) :use ((:instance get-funct3-of-asm-slt-gl (i (n05 i)) (j (n05 j)) (k (n05 k))))))) | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/r-type.lisp | get-funct3-of-asm-slt | |
get-funct7-of-asm-slt : (equal (get-funct7 (asm-slt i j k)) #x00) :hints (("Goal" :in-theory (enable asm-slt) :use ((:instance get-funct7-of-asm-slt-gl (i (n05 i)) (j (n05 j)) (k (n05 k))))))) (gl::def-gl-thm get-rs1-of-asm-slt-gl :hyp (and (n05p i) (n05p j) (n05p k)) :concl (equal (get-rs1 (+ 8243 (ash k 7) (ash i 15)... | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/r-type.lisp | get-funct7-of-asm-slt | |
get-rs1-of-asm-slt : (equal (get-rs1 (asm-slt rs1 rs2 rd)) (n05 rs1)) :hints (("Goal" :in-theory (enable asm-slt)))) (gl::def-gl-thm get-rs2-of-asm-slt-gl :hyp (and (n05p i) (n05p j) (n05p k)) :concl (equal (get-rs2 (+ 8243 (ash k 7) (ash i 15) (ash j 20))) j) :g-bindings (gl::auto-bindings (:nat i 5) (:nat j 5) (:nat ... | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/r-type.lisp | get-rs1-of-asm-slt | |
get-rs2-of-asm-slt : (equal (get-rs2 (asm-slt rs1 rs2 rd)) (n05 rs2)) :hints (("Goal" :in-theory (enable asm-slt )))) (gl::def-gl-thm get-rd-of-asm-slt-gl :hyp (and (n05p i) (n05p j) (n05p k)) :concl (equal (get-rd (+ 8243 (ash k 7) (ash i 15) (ash j 20))) k) :g-bindings (gl::auto-bindings (:nat i 5) (:nat j 5) (:nat k... | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/r-type.lisp | get-rs2-of-asm-slt | |
get-rd-of-asm-slt : (equal (get-rd (asm-slt rs1 rs2 rd)) (n05 rd)) :hints (("Goal" :in-theory (enable asm-slt)))) | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/r-type.lisp | get-rd-of-asm-slt | |
n32p-of-asm-sltu : (n32p (asm-sltu rs1 rs2 rd)) :hints (("Goal" :in-theory (enable asm-sltu) :use ((:instance n32p-of-asm-sltu-gl (i (n05 rs1)) (j (n05 rs2)) (k (n05 rd))))))) (gl::def-gl-thm get-opcode-of-asm-sltu-gl :hyp (and (n05p i) (n05p j) (n05p k)) :concl (equal (get-opcode (logand (+ 12339 (ash k 7) (ash i 15) ... | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/r-type.lisp | n32p-of-asm-sltu | |
get-opcode-of-asm-sltu : (equal (get-opcode (asm-sltu i j k)) #b0110011) :hints (("Goal" :in-theory (enable asm-sltu) :use ((:instance get-opcode-of-asm-sltu-gl (i (n05 i)) (j (n05 j)) (k (n05 k))))))) | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/r-type.lisp | get-opcode-of-asm-sltu | |
get-funct3-of-asm-sltu : (equal (get-funct3 (asm-sltu i j k)) #x3) :hints (("Goal" :in-theory (enable asm-sltu) :use ((:instance get-funct3-of-asm-sltu-gl (i (n05 i)) (j (n05 j)) (k (n05 k))))))) | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/r-type.lisp | get-funct3-of-asm-sltu | |
get-funct7-of-asm-sltu : (equal (get-funct7 (asm-sltu i j k)) #x00) :hints (("Goal" :in-theory (enable asm-sltu) :use ((:instance get-funct7-of-asm-sltu-gl (i (n05 i)) (j (n05 j)) (k (n05 k))))))) (gl::def-gl-thm get-rs1-of-asm-sltu-gl :hyp (and (n05p i) (n05p j) (n05p k)) :concl (equal (get-rs1 (+ 12339 (ash k 7) (ash... | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/r-type.lisp | get-funct7-of-asm-sltu | |
get-rs1-of-asm-sltu : (equal (get-rs1 (asm-sltu rs1 rs2 rd)) (n05 rs1)) :hints (("Goal" :in-theory (enable asm-sltu)))) (gl::def-gl-thm get-rs2-of-asm-sltu-gl :hyp (and (n05p i) (n05p j) (n05p k)) :concl (equal (get-rs2 (+ 12339 (ash k 7) (ash i 15) (ash j 20))) j) :g-bindings (gl::auto-bindings (:nat i 5) (:nat j 5) (... | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/r-type.lisp | get-rs1-of-asm-sltu | |
get-rs2-of-asm-sltu : (equal (get-rs2 (asm-sltu rs1 rs2 rd)) (n05 rs2)) :hints (("Goal" :in-theory (enable asm-sltu )))) (gl::def-gl-thm get-rd-of-asm-sltu-gl :hyp (and (n05p i) (n05p j) (n05p k)) :concl (equal (get-rd (+ 12339 (ash k 7) (ash i 15) (ash j 20))) k) :g-bindings (gl::auto-bindings (:nat i 5) (:nat j 5) (:... | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/r-type.lisp | get-rs2-of-asm-sltu | |
get-rd-of-asm-sltu : (equal (get-rd (asm-sltu rs1 rs2 rd)) (n05 rd)) :hints (("Goal" :in-theory (enable asm-sltu)))) | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/r-type.lisp | get-rd-of-asm-sltu | |
rv32-SH-guard-lemma : (n08p (n08 x)))) | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"models/y86/y86-basic/common/operations",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/s-type.lisp | rv32-SH-guard-lemma | |
n32p-of-asm-sb : (n32p (asm-sb rs1 rs2 imm)) :hints (("Goal" :in-theory (enable asm-sb) :use ((:instance n32p-of-asm-sb-gl (i (n05 rs1)) (k (n05 (n12 imm))) (l (n07 (ash (n12 imm) -5))) (j (n05 rs2))))))) (gl::def-gl-thm get-opcode-of-asm-sb-gl :hyp (and (n05p i) (n05p k) (n05p j) (n07p l)) :concl (equal (get-opcode (+... | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"models/y86/y86-basic/common/operations",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/s-type.lisp | n32p-of-asm-sb | |
get-opcode-of-asm-sb : (equal (get-opcode (asm-sb rs1 rs2 imm)) *sb-opcode*) :hints (("Goal" :in-theory (enable asm-sb) :use ((:instance get-opcode-of-asm-sb-gl (i (n05 rs1)) (k (n05 (n12 imm))) (l (n07 (ash (n12 imm) -5))) (j (n05 rs2))))))) (gl::def-gl-thm get-funct3-of-asm-sb-gl :hyp (and (n05p i) (n05p k) (n05p j) ... | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"models/y86/y86-basic/common/operations",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/s-type.lisp | get-opcode-of-asm-sb | |
get-funct3-of-asm-sb : (equal (get-funct3 (asm-sb rs1 rs2 imm)) *sb-funct3*) :hints (("Goal" :in-theory (enable asm-sb) :use ((:instance get-funct3-of-asm-sb-gl (i (n05 rs1)) (k (n05 (n12 imm))) (l (n07 (ash (n12 imm) -5))) (j (n05 rs2))))))) (gl::def-gl-thm get-rd-of-asm-sb-gl :hyp (and (n05p i) (n05p k) (n05p j) (n07... | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"models/y86/y86-basic/common/operations",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/s-type.lisp | get-funct3-of-asm-sb | |
get-rd-of-asm-sb : (equal (get-rd (asm-sb rs1 rs2 imm)) (n05 (n12 imm))) :hints (("Goal" :in-theory (enable asm-sb) :use ((:instance get-rd-of-asm-sb-gl (i (n05 rs1)) (k (n05 (n12 imm))) (l (n07 (ash (n12 imm) -5))) (j (n05 rs2))))))) (gl::def-gl-thm get-s-imm-of-asm-sb-gl :hyp (and (n05p i) (n05p k) (n05p j) (n07p l))... | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"models/y86/y86-basic/common/operations",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/s-type.lisp | get-rd-of-asm-sb | |
get-s-imm-of-asm-sb : (equal (get-s-imm (asm-sb rs1 rs2 imm)) (n12 imm)) :hints (("Goal" :expand (asm-sb rs1 rs2 imm) :in-theory (e/d () (get-s-imm)) :use ((:instance get-s-imm-of-asm-sb-gl (i (n05 rs1)) (k (n05 (n12 imm))) (l (n07 (ash (n12 imm) -5))) (j (n05 rs2))))))) (gl::def-gl-thm get-rs1-of-asm-sb-gl :hyp (and (... | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"models/y86/y86-basic/common/operations",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/s-type.lisp | get-s-imm-of-asm-sb | |
get-rs1-of-asm-sb : (equal (get-rs1 (asm-sb rs1 rs2 imm)) (n05 rs1)) :hints (("Goal" :in-theory (e/d (asm-sb)) :use ((:instance get-rs1-of-asm-sb-gl (i (n05 rs1)) (k (n05 (n12 imm))) (l (n07 (ash (n12 imm) -5))) (j (n05 rs2))))))) (gl::def-gl-thm get-rs2-of-asm-sb-gl :hyp (and (n05p i) (n05p k) (n05p j) (n07p l)) :conc... | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"models/y86/y86-basic/common/operations",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/s-type.lisp | get-rs1-of-asm-sb | |
get-rs2-of-asm-sb : (equal (get-rs2 (asm-sb rs1 rs2 imm)) (n05 rs2)) :hints (("Goal" :in-theory (e/d (asm-sb)) :use ((:instance get-rs2-of-asm-sb-gl (i (n05 rs1)) (k (n05 (n12 imm))) (l (n07 (ash (n12 imm) -5))) (j (n05 rs2))))))) | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"models/y86/y86-basic/common/operations",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/s-type.lisp | get-rs2-of-asm-sb | |
n32p-of-asm-sh : (n32p (asm-sh rs1 rs2 imm)) :hints (("Goal" :in-theory (enable asm-sh) :use ((:instance n32p-of-asm-sh-gl (i (n05 rs1)) (k (n05 (n12 imm))) (l (n07 (ash (n12 imm) -5))) (j (n05 rs2))))))) (gl::def-gl-thm get-opcode-of-asm-sh-gl :hyp (and (n05p i) (n05p k) (n05p j) (n07p l)) :concl (equal (get-opcode (+... | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"models/y86/y86-basic/common/operations",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/s-type.lisp | n32p-of-asm-sh | |
get-opcode-of-asm-sh : (equal (get-opcode (asm-sh rs1 rs2 imm)) *sh-opcode*) :hints (("Goal" :in-theory (enable asm-sh) :use ((:instance get-opcode-of-asm-sh-gl (i (n05 rs1)) (k (n05 (n12 imm))) (l (n07 (ash (n12 imm) -5))) (j (n05 rs2))))))) (gl::def-gl-thm get-funct3-of-asm-sh-gl :hyp (and (n05p i) (n05p k) (n05p j) ... | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"models/y86/y86-basic/common/operations",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/s-type.lisp | get-opcode-of-asm-sh | |
get-funct3-of-asm-sh : (equal (get-funct3 (asm-sh rs1 rs2 imm)) *sh-funct3*) :hints (("Goal" :in-theory (enable asm-sh) :use ((:instance get-funct3-of-asm-sh-gl (i (n05 rs1)) (k (n05 (n12 imm))) (l (n07 (ash (n12 imm) -5))) (j (n05 rs2))))))) (gl::def-gl-thm get-rd-of-asm-sh-gl :hyp (and (n05p i) (n05p k) (n05p j) (n07... | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"models/y86/y86-basic/common/operations",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/s-type.lisp | get-funct3-of-asm-sh | |
get-rd-of-asm-sh : (equal (get-rd (asm-sh rs1 rs2 imm)) (n05 (n12 imm))) :hints (("Goal" :in-theory (enable asm-sh) :use ((:instance get-rd-of-asm-sh-gl (i (n05 rs1)) (k (n05 (n12 imm))) (l (n07 (ash (n12 imm) -5))) (j (n05 rs2))))))) (gl::def-gl-thm get-s-imm-of-asm-sh-gl :hyp (and (n05p i) (n05p k) (n05p j) (n07p l))... | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"models/y86/y86-basic/common/operations",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/s-type.lisp | get-rd-of-asm-sh | |
get-s-imm-of-asm-sh : (equal (get-s-imm (asm-sh rs1 rs2 imm)) (n12 imm)) :hints (("Goal" :expand (asm-sh rs1 rs2 imm) :in-theory (e/d () (get-s-imm)) :use ((:instance get-s-imm-of-asm-sh-gl (i (n05 rs1)) (k (n05 (n12 imm))) (l (n07 (ash (n12 imm) -5))) (j (n05 rs2))))))) (gl::def-gl-thm get-rs1-of-asm-sh-gl :hyp (and (... | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"models/y86/y86-basic/common/operations",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/s-type.lisp | get-s-imm-of-asm-sh | |
get-rs1-of-asm-sh : (equal (get-rs1 (asm-sh rs1 rs2 imm)) (n05 rs1)) :hints (("Goal" :in-theory (e/d (asm-sh)) :use ((:instance get-rs1-of-asm-sh-gl (i (n05 rs1)) (k (n05 (n12 imm))) (l (n07 (ash (n12 imm) -5))) (j (n05 rs2))))))) (gl::def-gl-thm get-rs2-of-asm-sh-gl :hyp (and (n05p i) (n05p k) (n05p j) (n07p l)) :conc... | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"models/y86/y86-basic/common/operations",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/s-type.lisp | get-rs1-of-asm-sh | |
get-rs2-of-asm-sh : (equal (get-rs2 (asm-sh rs1 rs2 imm)) (n05 rs2)) :hints (("Goal" :in-theory (e/d (asm-sh)) :use ((:instance get-rs2-of-asm-sh-gl (i (n05 rs1)) (k (n05 (n12 imm))) (l (n07 (ash (n12 imm) -5))) (j (n05 rs2))))))) | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"models/y86/y86-basic/common/operations",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/s-type.lisp | get-rs2-of-asm-sh | |
n32p-of-asm-sw : (n32p (asm-sw rs1 rs2 imm)) :hints (("Goal" :in-theory (enable asm-sw) :use ((:instance n32p-of-asm-sw-gl (i (n05 rs1)) (k (n05 (n12 imm))) (l (n07 (ash (n12 imm) -5))) (j (n05 rs2))))))) (gl::def-gl-thm get-opcode-of-asm-sw-gl :hyp (and (n05p i) (n05p k) (n05p j) (n07p l)) :concl (equal (get-opcode (+... | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"models/y86/y86-basic/common/operations",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/s-type.lisp | n32p-of-asm-sw | |
get-opcode-of-asm-sw : (equal (get-opcode (asm-sw rs1 rs2 imm)) *sw-opcode*) :hints (("Goal" :in-theory (enable asm-sw) :use ((:instance get-opcode-of-asm-sw-gl (i (n05 rs1)) (k (n05 (n12 imm))) (l (n07 (ash (n12 imm) -5))) (j (n05 rs2))))))) (gl::def-gl-thm get-funct3-of-asm-sw-gl :hyp (and (n05p i) (n05p k) (n05p j) ... | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"models/y86/y86-basic/common/operations",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/s-type.lisp | get-opcode-of-asm-sw | |
get-funct3-of-asm-sw : (equal (get-funct3 (asm-sw rs1 rs2 imm)) *sw-funct3*) :hints (("Goal" :in-theory (enable asm-sw) :use ((:instance get-funct3-of-asm-sw-gl (i (n05 rs1)) (k (n05 (n12 imm))) (l (n07 (ash (n12 imm) -5))) (j (n05 rs2))))))) (gl::def-gl-thm get-rd-of-asm-sw-gl :hyp (and (n05p i) (n05p k) (n05p j) (n07... | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"models/y86/y86-basic/common/operations",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/s-type.lisp | get-funct3-of-asm-sw | |
get-rd-of-asm-sw : (equal (get-rd (asm-sw rs1 rs2 imm)) (n05 (n12 imm))) :hints (("Goal" :in-theory (enable asm-sw) :use ((:instance get-rd-of-asm-sw-gl (i (n05 rs1)) (k (n05 (n12 imm))) (l (n07 (ash (n12 imm) -5))) (j (n05 rs2))))))) (gl::def-gl-thm get-s-imm-of-asm-sw-gl :hyp (and (n05p i) (n05p k) (n05p j) (n07p l))... | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"models/y86/y86-basic/common/operations",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/s-type.lisp | get-rd-of-asm-sw | |
get-s-imm-of-asm-sw : (equal (get-s-imm (asm-sw rs1 rs2 imm)) (n12 imm)) :hints (("Goal" :expand (asm-sw rs1 rs2 imm) :in-theory (e/d () (get-s-imm)) :use ((:instance get-s-imm-of-asm-sw-gl (i (n05 rs1)) (k (n05 (n12 imm))) (l (n07 (ash (n12 imm) -5))) (j (n05 rs2))))))) (gl::def-gl-thm get-rs1-of-asm-sw-gl :hyp (and (... | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"models/y86/y86-basic/common/operations",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/s-type.lisp | get-s-imm-of-asm-sw | |
get-rs1-of-asm-sw : (equal (get-rs1 (asm-sw rs1 rs2 imm)) (n05 rs1)) :hints (("Goal" :in-theory (e/d (asm-sw)) :use ((:instance get-rs1-of-asm-sw-gl (i (n05 rs1)) (k (n05 (n12 imm))) (l (n07 (ash (n12 imm) -5))) (j (n05 rs2))))))) (gl::def-gl-thm get-rs2-of-asm-sw-gl :hyp (and (n05p i) (n05p k) (n05p j) (n07p l)) :conc... | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"models/y86/y86-basic/common/operations",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/s-type.lisp | get-rs1-of-asm-sw | |
get-rs2-of-asm-sw : (equal (get-rs2 (asm-sw rs1 rs2 imm)) (n05 rs2)) :hints (("Goal" :in-theory (e/d (asm-sw)) :use ((:instance get-rs2-of-asm-sw-gl (i (n05 rs1)) (k (n05 (n12 imm))) (l (n07 (ash (n12 imm) -5))) (j (n05 rs2))))))) | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"models/y86/y86-basic/common/operations",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/s-type.lisp | get-rs2-of-asm-sw | |
n32p-of-ash-get-u-imm-12 : (n32p (ash (get-u-imm instr) 12))) | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/u-type.lisp | n32p-of-ash-get-u-imm-12 | |
rv32p-of-rv32-lui-when-rv32p : (implies (rv32p rv32) (rv32p (rv32-lui rv32))) :hints (("Goal" :in-theory (enable rv32-lui)))) (verify-guards rv32-lui) | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/u-type.lisp | rv32p-of-rv32-lui-when-rv32p | |
rv32p-of-rv32-auipc-when-rv32p : (implies (rv32p rv32) (rv32p (rv32-auipc rv32))) :hints (("Goal" :in-theory (enable rv32-auipc)))) (verify-guards rv32-auipc) | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/u-type.lisp | rv32p-of-rv32-auipc-when-rv32p | |
n32p-of-asm-lui : (n32p (asm-lui imm rd)) :hints (("Goal" :in-theory (enable asm-lui) :use ((:instance n32p-of-asm-lui-gl (j (n20 imm)) (k (n05 rd))))))) (gl::def-gl-thm get-opcode-of-asm-lui-gl :hyp (and (n20p j) (n05p k)) :concl (equal (get-opcode (+ (ash j 12) (ash k 7) *lui-opcode*)) *lui-opcode*) :g-bindings (gl::... | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/u-type.lisp | n32p-of-asm-lui | |
get-opcode-of-asm-lui : (equal (get-opcode (asm-lui imm rd)) *lui-opcode*) :hints (("Goal" :in-theory (enable asm-lui) :use ((:instance get-opcode-of-asm-lui-gl (j (n20 imm)) (k (n05 rd))))))) (gl::def-gl-thm get-u-imm-of-asm-lui-gl :hyp (and (n20p j) (n05p k)) :concl (equal (get-u-imm (+ (ash j 12) (ash k 7) *lui-opco... | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/u-type.lisp | get-opcode-of-asm-lui | |
get-u-imm-of-asm-lui : (equal (get-u-imm (asm-lui imm rd)) (n20 imm)) :hints (("Goal" :in-theory (enable asm-lui) :use ((:instance get-u-imm-of-asm-lui-gl (j (n20 imm)) (k (n05 rd))))))) (gl::def-gl-thm get-rd-of-asm-lui-gl :hyp (and (n20p j) (n05p k)) :concl (equal (get-rd (+ (ash j 12) (ash k 7) *lui-opcode*)) k) :g-... | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/u-type.lisp | get-u-imm-of-asm-lui | |
get-rd-of-asm-lui : (equal (get-rd (asm-lui imm rd)) (n05 rd)) :hints (("Goal" :in-theory (enable asm-lui) :use ((:instance get-rd-of-asm-lui-gl (j (n20 imm)) (k (n05 rd))))))) | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/u-type.lisp | get-rd-of-asm-lui | |
n32p-of-asm-auipc : (n32p (asm-auipc imm rd)) :hints (("Goal" :in-theory (enable asm-auipc) :use ((:instance n32p-of-asm-auipc-gl (j (n20 imm)) (k (n05 rd))))))) (gl::def-gl-thm get-opcode-of-asm-auipc-gl :hyp (and (n20p j) (n05p k)) :concl (equal (get-opcode (+ (ash j 12) (ash k 7) *auipc-opcode*)) *auipc-opcode*) :g-... | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/u-type.lisp | n32p-of-asm-auipc | |
get-opcode-of-asm-auipc : (equal (get-opcode (asm-auipc imm rd)) *auipc-opcode*) :hints (("Goal" :in-theory (enable asm-auipc) :use ((:instance get-opcode-of-asm-auipc-gl (j (n20 imm)) (k (n05 rd))))))) (gl::def-gl-thm get-u-imm-of-asm-auipc-gl :hyp (and (n20p j) (n05p k)) :concl (equal (get-u-imm (+ (ash j 12) (ash k ... | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/u-type.lisp | get-opcode-of-asm-auipc | |
get-u-imm-of-asm-auipc : (equal (get-u-imm (asm-auipc imm rd)) (n20 imm)) :hints (("Goal" :in-theory (enable asm-auipc) :use ((:instance get-u-imm-of-asm-auipc-gl (j (n20 imm)) (k (n05 rd))))))) (gl::def-gl-thm get-rd-of-asm-auipc-gl :hyp (and (n20p j) (n05p k)) :concl (equal (get-rd (+ (ash j 12) (ash k 7) *auipc-opco... | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/u-type.lisp | get-u-imm-of-asm-auipc | |
get-rd-of-asm-auipc : (equal (get-rd (asm-auipc imm rd)) (n05 rd)) :hints (("Goal" :in-theory (enable asm-auipc) :use ((:instance get-rd-of-asm-auipc-gl (j (n20 imm)) (k (n05 rd))))))) | theorem | workshops | [
"std/util/bstar",
"std/util/define",
"ihs/basic-definitions",
"../operations",
"../rv-state",
"../decode",
"centaur/gl/gl"
] | workshops/2025/kwan/instructions/u-type.lisp | get-rd-of-asm-auipc | |
aux-1 : (implies (and (natp i) (< i j)) (equal (ag i (imul-loop-0 j y x pp)) (ag i pp))) :hints (("Goal" :in-theory (e/d (imul-loop-0) (bits-bits bits-cat-constants acl2::default-lognot acl2::default-less-than-1 bvecp-bitn-1 bits-tail-gen)))))) (local | theorem | workshops | [
"imul64",
"../../ctv-cp",
"projects/rac/lisp/alt-const-fns-gen"
] | workshops/2025/manjrekar/examples/imul64/imul64-proof.lisp | aux-1 | |
aux-2a : (and (implies (integerp i) (equal (bitn (* 2 x) i) (bitn x (1- i)))) (implies (integerp x) (and (equal (bits (+ y (* *2^54* x)) 53 0) (bits y 53 0)) (equal (bits (+ y (* *2^55* x)) 54 0) (bits y 54 0))))) :hints (("Goal" :in-theory (e/d (bitn-def bits fl mod) (acl2::default-floor-1 acl2::default-times-1 acl2::... | theorem | workshops | [
"imul64",
"../../ctv-cp",
"projects/rac/lisp/alt-const-fns-gen"
] | workshops/2025/manjrekar/examples/imul64/imul64-proof.lisp | aux-2a | |
aux-3 : (equal (ag 26 (imul-loop-0 25 y x pp)) (ag 26 (imul-loop-0 26 y x pp))) :hints (("Goal" :expand (:free (i pp) (imul-loop-0 i y x pp)) :in-theory (e/d (imul-loop-0) (bits-bits bits-cat-constants acl2::default-lognot acl2::default-less-than-1 bvecp-bitn-1 bits-tail-gen)))))) (local | theorem | workshops | [
"imul64",
"../../ctv-cp",
"projects/rac/lisp/alt-const-fns-gen"
] | workshops/2025/manjrekar/examples/imul64/imul64-proof.lisp | aux-3 | |
computeprod-correct : (implies (and (bvecp mana 52) (bvecp manb 52) (bitp expazero) (bitp expbzero)) (equal (imul mana manb expazero expbzero) (* (+ (if1 expazero 0 (expt 2 52)) mana) (+ (if1 expbzero 0 (expt 2 52)) manb)))) :hints (("Goal" :in-theory (e/d () ()) :use ((:functional-instance lemma-to-be-instantiated (ma... | theorem | workshops | [
"imul64",
"../../ctv-cp",
"projects/rac/lisp/alt-const-fns-gen"
] | workshops/2025/manjrekar/examples/imul64/imul64-proof.lisp | computeprod-correct | |
IMUL (MANA MANB EXPAZERO EXPBZERO) : (LET* ((PP NIL) (MULTIPLIER MANB) (MULTIPLIER (BITS (ASH MULTIPLIER 1) 52 0)) (:PP (IMUL-LOOP-0 0 MULTIPLIER MANA PP)) (:IA (IF1 EXPAZERO 0 MANB)) (IB (IF1 EXPBZERO 0 MANA)) (:IB (SETBITN IB 53 52 (LOGAND1 (LOGNOT1 EXPAZERO) (LOGNOT1 EXPBZERO)))) (SUM 0)) (COMPRESS (AG 0 PP) (AG 1 P... | function | workshops | [
"imul64",
"../../ctv-cp",
"projects/rac/lisp/alt-const-fns-gen"
] | workshops/2025/manjrekar/examples/imul64/imul64-proof.lisp | IMUL | |
sum-pp (m) : (if (zp m) 0 (if (= m 1) (ag 0 (pp)) (+ (* (expt 2 (* 2 (- m 2))) (ag (1- m) (pp))) (sum-pp (1- m))))))) (local (in-theory (disable (sum-pp)))) (local | function | workshops | [
"imul64",
"../../ctv-cp",
"projects/rac/lisp/alt-const-fns-gen"
] | workshops/2025/manjrekar/examples/imul64/imul64-proof.lisp | sum-pp | |
find-k (n) : (b* ((n (unquote n))) (if (= n (expt 2 (expo n))) `((k . ,(kwote (expo n)))) nil)))) (local-defthm bits-shift-up-1-const (implies (and (integerp i) (syntaxp (quotep n)) (bind-free (find-k n) (k)) (integerp k) (integerp j) (equal n (expt 2 k))) (equal (bits (* n x) i j) (bits x (- i k) (- j k)))) :hints (("... | function | workshops | [
"imul64",
"../../ctv-cp",
"projects/rac/lisp/alt-const-fns-gen"
] | workshops/2025/manjrekar/examples/imul64/imul64-proof.lisp | find-k | |
convert-ast-to-list (ast &optional context) : (let ((ctx (or context *default-context*))) (if (not (equal (z3-get-ast-kind ctx ast) :APP_AST)) (ast-to-value ast ctx) (let* ((decl (z3-get-app-decl ctx ast)) (decl-kind (z3-get-decl-kind ctx decl))) (match decl-kind (:OP_UNINTERPRETED (if (zerop (z3-get-app-num-args ctx a... | function | workshops | [] | workshops/2025/walter-manolios/examples/ast-introspection.lisp | convert-ast-to-list | |
cell-idx (n row col) : (+ col (* row n n))) | function | workshops | [] | workshops/2025/walter-manolios/examples/sudoku-arbitrary-size.lisp | cell-idx | |
idx-to-cell-var (idx) : (intern (concatenate 'string "C" (write-to-string idx)))) | function | workshops | [] | workshops/2025/walter-manolios/examples/sudoku-arbitrary-size.lisp | idx-to-cell-var | |
val-to-cell-value (val) : `(enumval :cell ,val)) | function | workshops | [] | workshops/2025/walter-manolios/examples/sudoku-arbitrary-size.lisp | val-to-cell-value | |
cell-vars (n) : (loop for idx below (* n n n n) append (list (idx-to-cell-var idx) :cell))) | function | workshops | [] | workshops/2025/walter-manolios/examples/sudoku-arbitrary-size.lisp | cell-vars | |
row-distinct-constraints (n) : (loop for row below (* n n) collect (cons 'distinct (loop for col below (* n n) collect (idx-to-cell-var (cell-idx n row col)))))) | function | workshops | [] | workshops/2025/walter-manolios/examples/sudoku-arbitrary-size.lisp | row-distinct-constraints | |
col-distinct-constraints (n) : (loop for col below (* n n) collect (cons 'distinct (loop for row below (* n n) collect (idx-to-cell-var (cell-idx n row col)))))) | function | workshops | [] | workshops/2025/walter-manolios/examples/sudoku-arbitrary-size.lisp | col-distinct-constraints | |
box-cell-offsets (n) : (loop for col below n append (loop for row below n collect (cell-idx n row col)))) | function | workshops | [] | workshops/2025/walter-manolios/examples/sudoku-arbitrary-size.lisp | box-cell-offsets | |
box-starts (n) : (mapcar (lambda (offset) (* n offset)) (box-cell-offsets n))) | function | workshops | [] | workshops/2025/walter-manolios/examples/sudoku-arbitrary-size.lisp | box-starts | |
box-distinct-constraints (n) : | function | workshops | [] | workshops/2025/walter-manolios/examples/sudoku-arbitrary-size.lisp | box-distinct-constraints | |
input-grid-constraints (n grid) : (assert (eq (length grid) (* n n n n))) (loop for entry in grid for idx below (* n n n n) when (not (equal entry '_)) collect `(= ,(idx-to-cell-var idx) ,(val-to-cell-value entry)))) | function | workshops | [] | workshops/2025/walter-manolios/examples/sudoku-arbitrary-size.lisp | input-grid-constraints | |
solve-grid (n input-grid) : | function | workshops | [] | workshops/2025/walter-manolios/examples/sudoku-arbitrary-size.lisp | solve-grid | |
get-square-value (soln idx) : (let ((v (assoc (idx-to-cell-var idx) soln :test #'equal))) (if v (second v) nil))) | function | workshops | [] | workshops/2025/walter-manolios/examples/sudoku-arbitrary-size.lisp | get-square-value | |
pretty-print-sudoku-solution (n soln) : | function | workshops | [] | workshops/2025/walter-manolios/examples/sudoku-arbitrary-size.lisp | pretty-print-sudoku-solution | |
blank-grid (n) : (loop for i below (* n n n n) collect '_)) | function | workshops | [] | workshops/2025/walter-manolios/examples/sudoku-arbitrary-size.lisp | blank-grid | |
pretty-print-board (n board) : (assert (equal (length board) (* n n n n))) (terpri) (let* ((n-spaces (ceiling (log (* n n) 10))) (value-format-spec (concatenate 'string "~" (write-to-string n-spaces) "a"))) (loop for val in board for i below (* n n n n) do (progn | function | workshops | [] | workshops/2025/walter-manolios/examples/sudoku-arbitrary-size.lisp | pretty-print-board | |
idx-to-cell-var (idx) : (assert (and (>= idx 0) (<= idx 81))) (intern (concatenate 'string "C" (write-to-string idx)))) | function | workshops | [] | workshops/2025/walter-manolios/examples/sudoku.lisp | idx-to-cell-var | |
init () : (solver-init) (z3-assert-fn +cell-vars+ (cons 'and cell-range-constraints)) (z3-assert-fn +cell-vars+ (cons 'and row-distinct-constraints)) (z3-assert-fn +cell-vars+ (cons 'and col-distinct-constraints)) (z3-assert-fn +cell-vars+ (cons 'and box-distinct-constraints))) | function | workshops | [] | workshops/2025/walter-manolios/examples/sudoku.lisp | init | |
input-grid-constraints (grid) : (assert (eq (length grid) 81)) (loop for entry in grid for idx below 81 when (not (equal entry '_)) collect `(= ,(idx-to-cell-var idx) ,entry))) | function | workshops | [] | workshops/2025/walter-manolios/examples/sudoku.lisp | input-grid-constraints | |
solve-grid (input-grid) : (solver-push) (z3-assert-fn +cell-vars+ (cons 'and (input-grid-constraints input-grid))) (let* ((sat-res (check-sat)) (res (if (equal sat-res :sat) (get-model-as-assignment) sat-res))) (progn (solver-pop) res))) | function | workshops | [] | workshops/2025/walter-manolios/examples/sudoku.lisp | solve-grid | |
pretty-print-grid-edge () : (format t "+-------+-------+-------+")) | function | workshops | [] | workshops/2025/walter-manolios/examples/sudoku.lisp | pretty-print-grid-edge | |
pretty-print-sudoku-solution (assignment) : (loop for row below 9 do (progn (when (equal (mod row 3) 0) (terpri) (pretty-print-grid-edge)) (terpri) (format t "| ") (loop for col below 9 do (progn (format t "~A " (cadr (assoc (idx-to-cell-var (+ col (* 9 row))) assignment))) (when (equal (mod col 3) 2) (format t "| ")))... | function | workshops | [] | workshops/2025/walter-manolios/examples/sudoku.lisp | pretty-print-sudoku-solution | |
idx-to-cell-var (idx) : (assert (and (>= idx 0) (<= idx 81))) (intern (concatenate 'string "C" (write-to-string idx)))) | function | workshops | [] | workshops/2025/walter-manolios/examples/sudoku_mk2.lisp | idx-to-cell-var | |
val-to-cell-value (val) : `(enumval :cell ,val)) | function | workshops | [] | workshops/2025/walter-manolios/examples/sudoku_mk2.lisp | val-to-cell-value | |
input-grid-constraints (grid) : (assert (eq (length grid) 81)) (loop for entry in grid for idx below 81 when (not (equal entry '_)) collect `(= ,(idx-to-cell-var idx) ,(val-to-cell-value entry)))) | function | workshops | [] | workshops/2025/walter-manolios/examples/sudoku_mk2.lisp | input-grid-constraints | |
init () : (z3-assert-fn +cell-vars+ (cons 'and row-distinct-constraints)) (z3-assert-fn +cell-vars+ (cons 'and col-distinct-constraints)) (z3-assert-fn +cell-vars+ (cons 'and box-distinct-constraints))) | function | workshops | [] | workshops/2025/walter-manolios/examples/sudoku_mk2.lisp | init | |
solve-grid (input-grid) : (solver-push) | function | workshops | [] | workshops/2025/walter-manolios/examples/sudoku_mk2.lisp | solve-grid | |
pretty-print-grid-edge () : (format t "+-------+-------+-------+")) | function | workshops | [] | workshops/2025/walter-manolios/examples/sudoku_mk2.lisp | pretty-print-grid-edge | |
pretty-print-sudoku-solution (assignment) : (loop for row below 9 do (progn (when (equal (mod row 3) 0) (terpri) (pretty-print-grid-edge)) (terpri) (format t "| ") (loop for col below 9 do (progn (format t "~A " (cadr (assoc (idx-to-cell-var (+ col (* 9 row))) assignment))) (when (equal (mod col 3) 2) (format t "| ")))... | function | workshops | [] | workshops/2025/walter-manolios/examples/sudoku_mk2.lisp | pretty-print-sudoku-solution | |
error-no-ql () : (error "Quicklisp not found. Either it is not installed, or you have not set it to load automatically. Either set the QUICKLISP_SETUP environment variable to the path to your system's quicklisp/setup.lisp file, or modify build-server.lsp so that it is loaded.")) | function | workshops | [] | workshops/2025/walter-manolios/examples/try-load-quicklisp.lisp | error-no-ql | |
error-load-failed () : (error "Tried to load Quicklisp from either the user-provided QUICKLISP_SETUP file or from the default Quicklisp setup location but this failed.")) | function | workshops | [] | workshops/2025/walter-manolios/examples/try-load-quicklisp.lisp | error-load-failed | |
portable-getenv (name) : #+sbcl (sb-unix::posix-getenv name) #+ccl (ccl::getenv name)) (let ((ql-load-attempted (cond ((member :quicklisp *features*) t) ((portable-getenv "QUICKLISP_SETUP") (load (portable-getenv "QUICKLISP_SETUP")) t) ((probe-file "~/quicklisp/setup.lisp") (load "~/quicklisp/setup.lisp") t) (t nil))))... | function | workshops | [] | workshops/2025/walter-manolios/examples/try-load-quicklisp.lisp | portable-getenv | |
make-var-decls (decls context) : "Translate a user-provided list of variable and function declarations into a variable sort alist for internal use." (loop for (var ty) on decls by #'cddr unless (and (consp ty) (equal (car ty) :fn)) collect (cons var (make-instance 'z3-sort :handle (get-sort ty context) :context context... | function | workshops | [] | workshops/2025/walter-manolios/src/z3/api.lisp | make-var-decls | |
make-fn-decls (decls context) : "Translate a user-provided list of variable and function declarations into a function declaration alist for internal use." (loop for (var ty) on decls by #'cddr when (and (consp ty) (equal (car ty) :fn)) collect (list var (make-fn-decl var (second ty) (third ty) context) ty))) | function | workshops | [] | workshops/2025/walter-manolios/src/z3/api.lisp | make-fn-decls | |
make-fn-decl (name domain range context) : "Given a name, a list of domain sort specifiers, and a range sort specifier, create an uninterpreted func-decl with that name and signature." (with-foreign-array (domain-sorts-array z3-c-types::Z3_sort domain :elt-fn #'(lambda (arg) (get-sort arg context))) (make-instance 'fun... | function | workshops | [] | workshops/2025/walter-manolios/src/z3/api.lisp | make-fn-decl | |
solver-init () : "Initialize the Z3 interface with a context and a solver." (setf *default-context* (make-instance 'context)) (z3-set-error-handler *default-context* (cffi:callback error-handler)) (setf *default-solver* (make-simple-solver *default-context*))) | function | workshops | [] | workshops/2025/walter-manolios/src/z3/api.lisp | solver-init | |
solver-push (&optional solver) : "Create a new scope. This is useful for incremental solving." (solver-push-fn (or solver *default-solver*))) | function | workshops | [] | workshops/2025/walter-manolios/src/z3/api.lisp | solver-push | |
solver-pop (&key (solver nil) : (n 1)) "Pop one or more scopes off the Z3 stack. This essentially undoes any Z3 declarations or assertions that occurred between the relevant 'push' operation and this 'pop' operation." (solver-pop-fn (or solver *default-solver*) n)) | function | workshops | [] | workshops/2025/walter-manolios/src/z3/api.lisp | solver-pop | |
solver-reset (&optional solver) : "Reset the solver, removing any assertions and emptying the stack." (solver-reset-fn (or solver *default-solver*))) | function | workshops | [] | workshops/2025/walter-manolios/src/z3/api.lisp | solver-reset | |
print-solver (&optional solver) : (let* ((slv (or solver *default-solver*))) (terpri) (print-scopes slv) nil)) | function | workshops | [] | workshops/2025/walter-manolios/src/z3/api.lisp | print-solver | |
print-scopes (solver) : (let ((*print-case* :downcase)) (loop for scope in (solver-assertion-stack solver) do (loop for assertion in scope do (format t "~S~%" assertion))))) | function | workshops | [] | workshops/2025/walter-manolios/src/z3/api.lisp | print-scopes | |
process-var-specs (var-specs) : (let ((res nil) (acc nil)) (loop for elt in var-specs do (cond ((and (or (keywordp elt) (consp elt)) (consp acc)) (setf res (append (mapcar #'(lambda (n) (cons n elt)) acc) res)) (setf acc nil)) ((or (keywordp elt) (consp elt)) (error "Type ~a given without without any variables to apply... | function | workshops | [] | workshops/2025/walter-manolios/src/z3/api.lisp | process-var-specs | |
check-processed-var-specs (processed-var-specs) : (let ((ht (make-hash-table))) (loop for (var-name . nil) in processed-var-specs do (multiple-value-bind (entry exists?) (gethash var-name ht) (declare (ignore entry)) (when exists? (error "Variable ~a specified multiple times in the same assert form!" var-name)) (setf (... | function | workshops | [] | workshops/2025/walter-manolios/src/z3/api.lisp | check-processed-var-specs | |
convert-type-spec (name ty context) : (if (and (consp ty) (equal (car ty) :fn)) (make-fn-decl name (second ty) (third ty) context) (make-instance 'z3-sort :handle (get-sort ty context) :context context))) | function | workshops | [] | workshops/2025/walter-manolios/src/z3/api.lisp | convert-type-spec |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.