udb 0.1.14 → 0.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.data/cfgs/example_rv64_with_overlay.yaml +5 -6
- data/.data/cfgs/mc100-32-full-example.yaml +2 -2
- data/.data/cfgs/qc_iu.yaml +2 -2
- data/.data/cfgs/rv32-riscv-tests.yaml +4 -4
- data/.data/cfgs/rv32-vector.yaml +4 -4
- data/.data/cfgs/rv64-riscv-tests.yaml +4 -4
- data/.data/cfgs/rv64-vector.yaml +4 -4
- data/.data/spec/schemas/README.adoc +3 -0
- data/.data/spec/schemas/schema_defs.json +3 -3
- data/.data/spec/std/isa/csr/H/hcounteren.layout +3 -3
- data/.data/spec/std/isa/csr/H/hcounteren.yaml +31 -31
- data/.data/spec/std/isa/csr/H/htinst.yaml +3 -3
- data/.data/spec/std/isa/csr/H/htval.yaml +3 -3
- data/.data/spec/std/isa/csr/H/mtinst.yaml +1 -1
- data/.data/spec/std/isa/csr/Smcntrpmf/mcyclecfg.yaml +1 -1
- data/.data/spec/std/isa/csr/Smcntrpmf/mcyclecfgh.yaml +1 -1
- data/.data/spec/std/isa/csr/Smcntrpmf/minstretcfg.yaml +1 -1
- data/.data/spec/std/isa/csr/Smcntrpmf/minstretcfgh.yaml +1 -1
- data/.data/spec/std/isa/csr/Sscofpmf/scountovf.layout +1 -1
- data/.data/spec/std/isa/csr/Sscofpmf/scountovf.yaml +29 -29
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter10.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter10h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter11.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter11h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter12.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter12h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter13.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter13h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter14.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter14h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter15.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter15h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter16.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter16h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter17.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter17h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter18.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter18h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter19.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter19h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter20.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter20h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter21.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter21h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter22.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter22h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter23.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter23h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter24.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter24h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter25.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter25h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter26.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter26h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter27.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter27h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter28.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter28h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter29.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter29h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter3.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter30.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter30h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter31.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter31h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter3h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter4.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter4h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter5.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter5h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter6.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter6h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter7.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter7h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter8.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter8h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter9.yaml +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounter9h.yaml +1 -1
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounterN.layout +4 -4
- data/.data/spec/std/isa/csr/Zihpm/mhpmcounterNh.layout +1 -1
- data/.data/spec/std/isa/csr/hstatus.yaml +1 -1
- data/.data/spec/std/isa/csr/mcycle.yaml +6 -6
- data/.data/spec/std/isa/csr/minstret.yaml +3 -3
- data/.data/spec/std/isa/csr/minstreth.yaml +1 -1
- data/.data/spec/std/isa/csr/mstatus.yaml +13 -19
- data/.data/spec/std/isa/csr/mtvec.yaml +16 -57
- data/.data/spec/std/isa/csr/sie.yaml +30 -4
- data/.data/spec/std/isa/csr/sip.yaml +16 -2
- data/.data/spec/std/isa/csr/stvec.yaml +11 -12
- data/.data/spec/std/isa/csr/vstval.yaml +1 -1
- data/.data/spec/std/isa/csr/vstvec.yaml +14 -15
- data/.data/spec/std/isa/ext/Q.yaml +1 -1
- data/.data/spec/std/isa/ext/Shlcofideleg.yaml +24 -0
- data/.data/spec/std/isa/ext/Shvstvecd.yaml +2 -2
- data/.data/spec/std/isa/ext/Sspm.yaml +5 -0
- data/.data/spec/std/isa/ext/Sstvecd.yaml +2 -2
- data/.data/spec/std/isa/ext/Sstvecv.yaml +2 -2
- data/.data/spec/std/isa/ext/Supm.yaml +17 -0
- data/.data/spec/std/isa/ext/Zcb.yaml +3 -0
- data/.data/spec/std/isa/ext/Zfbfmin.yaml +3 -5
- data/.data/spec/std/isa/ext/Ziccid.yaml +29 -0
- data/.data/spec/std/isa/ext/Zicfilp.yaml +5 -1
- data/.data/spec/std/isa/ext/Zicfiss.yaml +20 -1
- data/.data/spec/std/isa/ext/Zihpm.yaml +3 -0
- data/.data/spec/std/isa/ext/Zilx.yaml +58 -0
- data/.data/spec/std/isa/ext/Zkt.yaml +33 -1
- data/.data/spec/std/isa/ext/Zvabd.yaml +21 -0
- data/.data/spec/std/isa/ext/Zvbc.yaml +3 -0
- data/.data/spec/std/isa/ext/Zvkb.yaml +3 -0
- data/.data/spec/std/isa/ext/Zvkg.yaml +3 -0
- data/.data/spec/std/isa/ext/Zvkned.yaml +3 -0
- data/.data/spec/std/isa/ext/Zvknha.yaml +3 -0
- data/.data/spec/std/isa/ext/Zvknhb.yaml +4 -2
- data/.data/spec/std/isa/ext/Zvksed.yaml +3 -0
- data/.data/spec/std/isa/ext/Zvksh.yaml +3 -0
- data/.data/spec/std/isa/ext/Zvkt.yaml +3 -0
- data/.data/spec/std/isa/inst/C/c.add.yaml +1 -0
- data/.data/spec/std/isa/inst/C/c.addi.yaml +1 -0
- data/.data/spec/std/isa/inst/C/c.addiw.yaml +1 -0
- data/.data/spec/std/isa/inst/C/c.addw.yaml +1 -0
- data/.data/spec/std/isa/inst/C/c.and.yaml +1 -0
- data/.data/spec/std/isa/inst/C/c.andi.yaml +1 -0
- data/.data/spec/std/isa/inst/C/c.lui.yaml +1 -0
- data/.data/spec/std/isa/inst/C/c.mv.yaml +1 -0
- data/.data/spec/std/isa/inst/C/c.nop.yaml +13 -2
- data/.data/spec/std/isa/inst/C/c.or.yaml +1 -0
- data/.data/spec/std/isa/inst/C/c.slli.yaml +1 -0
- data/.data/spec/std/isa/inst/C/c.srai.yaml +1 -0
- data/.data/spec/std/isa/inst/C/c.srli.yaml +1 -0
- data/.data/spec/std/isa/inst/C/c.sub.yaml +1 -0
- data/.data/spec/std/isa/inst/C/c.subw.yaml +1 -0
- data/.data/spec/std/isa/inst/C/c.xor.yaml +1 -0
- data/.data/spec/std/isa/inst/D/fld.yaml +1 -0
- data/.data/spec/std/isa/inst/D/fsd.yaml +1 -0
- data/.data/spec/std/isa/inst/F/fadd.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fcvt.l.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fcvt.lu.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fcvt.s.l.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fcvt.s.lu.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fcvt.s.wu.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fcvt.w.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fcvt.wu.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fdiv.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/feq.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fle.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fleq.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/flt.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fltq.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/flw.yaml +2 -1
- data/.data/spec/std/isa/inst/F/fmadd.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fmax.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fmin.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fmsub.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fmul.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fmv.w.x.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fmv.x.w.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fnmadd.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fnmsub.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fsgnj.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fsgnjn.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fsgnjx.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fsqrt.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fsub.s.yaml +1 -1
- data/.data/spec/std/isa/inst/F/fsw.yaml +2 -1
- data/.data/spec/std/isa/inst/I/sd.yaml +1 -1
- data/.data/spec/std/isa/inst/Q/fadd.q.yaml +2 -2
- data/.data/spec/std/isa/inst/Q/fclass.q.yaml +5 -5
- data/.data/spec/std/isa/inst/Q/fleq.q.yaml +0 -1
- data/.data/spec/std/isa/inst/Q/fli.q.yaml +1 -1
- data/.data/spec/std/isa/inst/Q/flq.yaml +1 -0
- data/.data/spec/std/isa/inst/Q/fltq.q.yaml +0 -1
- data/.data/spec/std/isa/inst/Q/fmaxm.q.yaml +0 -1
- data/.data/spec/std/isa/inst/Q/fminm.q.yaml +0 -1
- data/.data/spec/std/isa/inst/Q/fmvp.q.x.yaml +1 -1
- data/.data/spec/std/isa/inst/Q/fsq.yaml +1 -0
- data/.data/spec/std/isa/inst/V/vmv.v.i.yaml +1 -0
- data/.data/spec/std/isa/inst/Zcb/c.mul.yaml +1 -0
- data/.data/spec/std/isa/inst/Zcb/c.not.yaml +1 -0
- data/.data/spec/std/isa/inst/Zcb/c.zext.b.yaml +2 -7
- data/.data/spec/std/isa/inst/Zcb/c.zext.w.yaml +1 -1
- data/.data/spec/std/isa/inst/Zcmop/c.mop.1.yaml +2 -0
- data/.data/spec/std/isa/inst/Zcmop/c.mop.5.yaml +2 -0
- data/.data/spec/std/isa/inst/Zcmop/c.mop.N.layout +7 -0
- data/.data/spec/std/isa/inst/Zfa/fli.s.yaml +1 -1
- data/.data/spec/std/isa/inst/Zfa/fmaxm.s.yaml +1 -1
- data/.data/spec/std/isa/inst/Zfa/fminm.s.yaml +1 -1
- data/.data/spec/std/isa/inst/Zfa/fround.s.yaml +1 -1
- data/.data/spec/std/isa/inst/Zfa/froundnx.s.yaml +1 -1
- data/.data/spec/std/isa/inst/Zfh/flh.yaml +5 -2
- data/.data/spec/std/isa/inst/Zfh/fmv.h.x.yaml +3 -1
- data/.data/spec/std/isa/inst/Zfh/fmv.x.h.yaml +3 -1
- data/.data/spec/std/isa/inst/Zfh/fsh.yaml +4 -1
- data/.data/spec/std/isa/inst/Zicfiss/c.sspopchk.yaml +30 -0
- data/.data/spec/std/isa/inst/Zicfiss/c.sspush.yaml +29 -0
- data/.data/spec/std/isa/inst/Zicond/czero.eqz.yaml +1 -1
- data/.data/spec/std/isa/inst/Zicond/czero.nez.yaml +1 -1
- data/.data/spec/std/isa/inst/Zicsr/csrrw.yaml +12 -0
- data/.data/spec/std/isa/inst/Zilx/lxd.yaml +38 -0
- data/.data/spec/std/isa/inst/Zilx/lxh.yaml +35 -0
- data/.data/spec/std/isa/inst/Zilx/lxhu.yaml +35 -0
- data/.data/spec/std/isa/inst/Zilx/lxsb.yaml +40 -0
- data/.data/spec/std/isa/inst/Zilx/lxsbu.yaml +40 -0
- data/.data/spec/std/isa/inst/Zilx/lxsd.yaml +38 -0
- data/.data/spec/std/isa/inst/Zilx/lxsh.yaml +35 -0
- data/.data/spec/std/isa/inst/Zilx/lxshu.yaml +35 -0
- data/.data/spec/std/isa/inst/Zilx/lxsuwb.yaml +40 -0
- data/.data/spec/std/isa/inst/Zilx/lxsuwbu.yaml +40 -0
- data/.data/spec/std/isa/inst/Zilx/lxsuwd.yaml +39 -0
- data/.data/spec/std/isa/inst/Zilx/lxsuwh.yaml +40 -0
- data/.data/spec/std/isa/inst/Zilx/lxsuwhu.yaml +40 -0
- data/.data/spec/std/isa/inst/Zilx/lxsuww.yaml +40 -0
- data/.data/spec/std/isa/inst/Zilx/lxsuwwu.yaml +40 -0
- data/.data/spec/std/isa/inst/Zilx/lxsw.yaml +35 -0
- data/.data/spec/std/isa/inst/Zilx/lxswu.yaml +39 -0
- data/.data/spec/std/isa/inst/Zilx/lxw.yaml +35 -0
- data/.data/spec/std/isa/inst/Zilx/lxwu.yaml +39 -0
- data/.data/spec/std/isa/inst/Zvabd/vabd.vv.yaml +67 -0
- data/.data/spec/std/isa/inst/Zvabd/vabdu.vv.yaml +67 -0
- data/.data/spec/std/isa/inst/Zvabd/vabs.v.yaml +61 -0
- data/.data/spec/std/isa/inst/Zvabd/vwabda.vv.yaml +72 -0
- data/.data/spec/std/isa/inst/Zvabd/vwabdau.vv.yaml +72 -0
- data/.data/spec/std/isa/isa/fp.idl +42 -18
- data/.data/spec/std/isa/param/CACHE_BLOCK_SIZE.yaml +70 -6
- data/.data/spec/std/isa/param/ELEN.yaml +27 -5
- data/.data/spec/std/isa/param/HCOUNTENABLE_EN.yaml +13 -0
- data/.data/spec/std/isa/param/HPM_COUNTER_EN.yaml +13 -3
- data/.data/spec/std/isa/param/HPM_EVENTS.yaml +0 -3
- data/.data/spec/std/isa/param/MCOUNTENABLE_EN.yaml +8 -0
- data/.data/spec/std/isa/param/MTVEC_BASE_ALIGNMENT_DIRECT.yaml +71 -65
- data/.data/spec/std/isa/param/MTVEC_BASE_ALIGNMENT_VECTORED.yaml +71 -65
- data/.data/spec/std/isa/param/STVAL_WIDTH.yaml +3 -2
- data/.data/spec/std/isa/param/STVEC_BASE_ALIGNMENT_VECTORED.yaml +100 -0
- data/.data/spec/std/isa/param/STVEC_MODES.yaml +31 -0
- data/.data/spec/std/isa/param/SV32_VSMODE_TRANSLATION.yaml +1 -1
- data/.data/spec/std/isa/param/SXLEN.yaml +2 -2
- data/.data/spec/std/isa/param/TINST_VALUE_ON_FINAL_INSTRUCTION_GUEST_PAGE_FAULT.yaml +1 -1
- data/.data/spec/std/isa/param/TINST_VALUE_ON_FINAL_LOAD_GUEST_PAGE_FAULT.yaml +1 -1
- data/.data/spec/std/isa/param/TINST_VALUE_ON_FINAL_STORE_AMO_GUEST_PAGE_FAULT.yaml +1 -1
- data/.data/spec/std/isa/param/TINST_VALUE_ON_LOAD_ADDRESS_MISALIGNED.yaml +1 -1
- data/.data/spec/std/isa/param/TINST_VALUE_ON_STORE_AMO_ADDRESS_MISALIGNED.yaml +1 -1
- data/.data/spec/std/isa/param/UXLEN.yaml +1 -1
- data/.data/spec/std/isa/param/VLEN.yaml +16 -7
- data/.data/spec/std/isa/param/VSTVEC_MODES.yaml +31 -0
- data/lib/udb/Z3_VERSION +1 -1
- data/lib/udb/obj/csr.rb +1 -1
- data/lib/udb/obj/csr_field.rb +1 -1
- data/lib/udb/obj/extension.rb +1 -1
- data/lib/udb/version.rb +1 -1
- data/lib/udb/version_spec.rb +1 -1
- data/lib/udb/z3.rb +29 -7
- metadata +37 -8
- data/.data/spec/std/isa/param/STVEC_MODE_DIRECT.yaml +0 -21
- data/.data/spec/std/isa/param/STVEC_MODE_VECTORED.yaml +0 -19
- data/.data/spec/std/isa/param/VSTVEC_MODE_DIRECT.yaml +0 -21
- data/.data/spec/std/isa/param/VSTVEC_MODE_VECTORED.yaml +0 -21
|
@@ -25,73 +25,79 @@ description: |
|
|
|
25
25
|
the base, the minimum alignment cannot be less than 4.
|
|
26
26
|
schema:
|
|
27
27
|
description: An unsigned power of 2 greater than or equal to 4 that fits in 64 bits
|
|
28
|
-
default:
|
|
28
|
+
default: 0x4
|
|
29
29
|
enum:
|
|
30
30
|
[
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
31
|
+
0x4,
|
|
32
|
+
0x8,
|
|
33
|
+
0x10,
|
|
34
|
+
0x20,
|
|
35
|
+
0x40,
|
|
36
|
+
0x80,
|
|
37
|
+
0x100,
|
|
38
|
+
0x200,
|
|
39
|
+
0x400,
|
|
40
|
+
0x800,
|
|
41
|
+
0x1000,
|
|
42
|
+
0x2000,
|
|
43
|
+
0x4000,
|
|
44
|
+
0x8000,
|
|
45
|
+
0x10000,
|
|
46
|
+
0x20000,
|
|
47
|
+
0x40000,
|
|
48
|
+
0x80000,
|
|
49
|
+
0x100000,
|
|
50
|
+
0x200000,
|
|
51
|
+
0x400000,
|
|
52
|
+
0x800000,
|
|
53
|
+
0x1000000,
|
|
54
|
+
0x2000000,
|
|
55
|
+
0x4000000,
|
|
56
|
+
0x8000000,
|
|
57
|
+
0x10000000,
|
|
58
|
+
0x20000000,
|
|
59
|
+
0x40000000,
|
|
60
|
+
0x80000000,
|
|
61
|
+
0x100000000,
|
|
62
|
+
0x200000000,
|
|
63
|
+
0x400000000,
|
|
64
|
+
0x800000000,
|
|
65
|
+
0x1000000000,
|
|
66
|
+
0x2000000000,
|
|
67
|
+
0x4000000000,
|
|
68
|
+
0x8000000000,
|
|
69
|
+
0x10000000000,
|
|
70
|
+
0x20000000000,
|
|
71
|
+
0x40000000000,
|
|
72
|
+
0x80000000000,
|
|
73
|
+
0x100000000000,
|
|
74
|
+
0x200000000000,
|
|
75
|
+
0x400000000000,
|
|
76
|
+
0x800000000000,
|
|
77
|
+
0x1000000000000,
|
|
78
|
+
0x2000000000000,
|
|
79
|
+
0x4000000000000,
|
|
80
|
+
0x8000000000000,
|
|
81
|
+
0x10000000000000,
|
|
82
|
+
0x20000000000000,
|
|
83
|
+
0x40000000000000,
|
|
84
|
+
0x80000000000000,
|
|
85
|
+
0x100000000000000,
|
|
86
|
+
0x200000000000000,
|
|
87
|
+
0x400000000000000,
|
|
88
|
+
0x800000000000000,
|
|
89
|
+
0x1000000000000000,
|
|
90
|
+
0x2000000000000000,
|
|
91
|
+
0x4000000000000000,
|
|
92
|
+
0x8000000000000000,
|
|
93
93
|
]
|
|
94
94
|
|
|
95
95
|
requirements:
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
if:
|
|
97
|
+
param:
|
|
98
|
+
name: MXLEN
|
|
99
|
+
equal: 32
|
|
100
|
+
then:
|
|
101
|
+
param:
|
|
102
|
+
name: MTVEC_BASE_ALIGNMENT_VECTORED
|
|
103
|
+
lessThanOrEqual: 0x80000000
|
|
@@ -10,10 +10,11 @@ description: |
|
|
|
10
10
|
The number of implemented bits in `stval`.
|
|
11
11
|
|
|
12
12
|
Must be greater than or equal to _max_(`PHYS_ADDR_WIDTH`, `VA_SIZE`)
|
|
13
|
-
long_name:
|
|
13
|
+
long_name: "`stval` implemented bits"
|
|
14
14
|
schema:
|
|
15
15
|
type: integer
|
|
16
|
-
|
|
16
|
+
minimum: 0
|
|
17
|
+
maximum: 64
|
|
17
18
|
definedBy:
|
|
18
19
|
extension:
|
|
19
20
|
name: S
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
|
|
2
|
+
# SPDX-License-Identifier: BSD-3-Clause-Clear
|
|
3
|
+
|
|
4
|
+
# yaml-language-server: $schema=../../../schemas/param_schema.json
|
|
5
|
+
|
|
6
|
+
$schema: param_schema.json#
|
|
7
|
+
kind: parameter
|
|
8
|
+
name: STVEC_BASE_ALIGNMENT_VECTORED
|
|
9
|
+
long_name: |
|
|
10
|
+
Minimum alignment of `stvec.BASE` when `stvec.MODE` is 1 (Vectored)
|
|
11
|
+
definedBy:
|
|
12
|
+
allOf:
|
|
13
|
+
- extension:
|
|
14
|
+
name: S
|
|
15
|
+
- param:
|
|
16
|
+
name: STVEC_MODES
|
|
17
|
+
includes: 1
|
|
18
|
+
reason: Only relevant when vectored mode is supported
|
|
19
|
+
description: |
|
|
20
|
+
Minimum alignment of the base pointer when `stvec.MODE` is Vectored. Because
|
|
21
|
+
`stvec` excludes the two least-significant bits of the base, the minimum
|
|
22
|
+
alignment cannot be less than 4 bytes.
|
|
23
|
+
schema:
|
|
24
|
+
description: An unsigned power of 2 greater than or equal to 4 that fits in 64 bits
|
|
25
|
+
default: 0x4
|
|
26
|
+
enum:
|
|
27
|
+
[
|
|
28
|
+
0x4,
|
|
29
|
+
0x8,
|
|
30
|
+
0x10,
|
|
31
|
+
0x20,
|
|
32
|
+
0x40,
|
|
33
|
+
0x80,
|
|
34
|
+
0x100,
|
|
35
|
+
0x200,
|
|
36
|
+
0x400,
|
|
37
|
+
0x800,
|
|
38
|
+
0x1000,
|
|
39
|
+
0x2000,
|
|
40
|
+
0x4000,
|
|
41
|
+
0x8000,
|
|
42
|
+
0x10000,
|
|
43
|
+
0x20000,
|
|
44
|
+
0x40000,
|
|
45
|
+
0x80000,
|
|
46
|
+
0x100000,
|
|
47
|
+
0x200000,
|
|
48
|
+
0x400000,
|
|
49
|
+
0x800000,
|
|
50
|
+
0x1000000,
|
|
51
|
+
0x2000000,
|
|
52
|
+
0x4000000,
|
|
53
|
+
0x8000000,
|
|
54
|
+
0x10000000,
|
|
55
|
+
0x20000000,
|
|
56
|
+
0x40000000,
|
|
57
|
+
0x80000000,
|
|
58
|
+
0x100000000,
|
|
59
|
+
0x200000000,
|
|
60
|
+
0x400000000,
|
|
61
|
+
0x800000000,
|
|
62
|
+
0x1000000000,
|
|
63
|
+
0x2000000000,
|
|
64
|
+
0x4000000000,
|
|
65
|
+
0x8000000000,
|
|
66
|
+
0x10000000000,
|
|
67
|
+
0x20000000000,
|
|
68
|
+
0x40000000000,
|
|
69
|
+
0x80000000000,
|
|
70
|
+
0x100000000000,
|
|
71
|
+
0x200000000000,
|
|
72
|
+
0x400000000000,
|
|
73
|
+
0x800000000000,
|
|
74
|
+
0x1000000000000,
|
|
75
|
+
0x2000000000000,
|
|
76
|
+
0x4000000000000,
|
|
77
|
+
0x8000000000000,
|
|
78
|
+
0x10000000000000,
|
|
79
|
+
0x20000000000000,
|
|
80
|
+
0x40000000000000,
|
|
81
|
+
0x80000000000000,
|
|
82
|
+
0x100000000000000,
|
|
83
|
+
0x200000000000000,
|
|
84
|
+
0x400000000000000,
|
|
85
|
+
0x800000000000000,
|
|
86
|
+
0x1000000000000000,
|
|
87
|
+
0x2000000000000000,
|
|
88
|
+
0x4000000000000000,
|
|
89
|
+
0x8000000000000000,
|
|
90
|
+
]
|
|
91
|
+
|
|
92
|
+
requirements:
|
|
93
|
+
if:
|
|
94
|
+
param:
|
|
95
|
+
name: SXLEN
|
|
96
|
+
includes: 32
|
|
97
|
+
then:
|
|
98
|
+
param:
|
|
99
|
+
name: STVEC_BASE_ALIGNMENT_VECTORED
|
|
100
|
+
lessThanOrEqual: 0x80000000
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
|
|
2
|
+
# SPDX-License-Identifier: BSD-3-Clause-Clear
|
|
3
|
+
|
|
4
|
+
# yaml-language-server: $schema=../../../schemas/param_schema.json
|
|
5
|
+
|
|
6
|
+
$schema: param_schema.json#
|
|
7
|
+
kind: parameter
|
|
8
|
+
name: STVEC_MODES
|
|
9
|
+
long_name: |
|
|
10
|
+
Modes supported by `stvec.MODE`
|
|
11
|
+
definedBy:
|
|
12
|
+
extension:
|
|
13
|
+
name: S
|
|
14
|
+
description: |
|
|
15
|
+
Options:
|
|
16
|
+
|
|
17
|
+
0::
|
|
18
|
+
Direct; All traps set `pc` to `stvec.BASE`
|
|
19
|
+
1::
|
|
20
|
+
Vectored; Asynchronous interrupts set `pc` to `stvec.BASE` + 4 x cause.
|
|
21
|
+
|
|
22
|
+
If only one mode is given, `stvec.MODE` is assumed to be read-only with that value.
|
|
23
|
+
Otherwise, `stvec.MODE` is read-write.
|
|
24
|
+
schema:
|
|
25
|
+
type: array
|
|
26
|
+
items:
|
|
27
|
+
type: integer
|
|
28
|
+
enum: [0, 1]
|
|
29
|
+
minItems: 1
|
|
30
|
+
maxItems: 2
|
|
31
|
+
uniqueItems: true
|
|
@@ -9,8 +9,8 @@ name: SXLEN
|
|
|
9
9
|
description: |
|
|
10
10
|
Set of XLENs supported in S-mode. Can be one of:
|
|
11
11
|
|
|
12
|
-
* 32:
|
|
13
|
-
* 64:
|
|
12
|
+
* [32]: SXLEN is always 32
|
|
13
|
+
* [64]: SXLEN is always 64
|
|
14
14
|
* [32, 64]: SXLEN can be changed (via mstatus.SXL) between 32 and 64
|
|
15
15
|
long_name: TODO
|
|
16
16
|
schema:
|
|
@@ -7,7 +7,7 @@ $schema: param_schema.json#
|
|
|
7
7
|
kind: parameter
|
|
8
8
|
name: TINST_VALUE_ON_FINAL_INSTRUCTION_GUEST_PAGE_FAULT
|
|
9
9
|
description: |
|
|
10
|
-
Value
|
|
10
|
+
Value written into htinst/mtinst when there is an instruction guest-page fault on a final translation.
|
|
11
11
|
|
|
12
12
|
Possible values:
|
|
13
13
|
* "always zero": Always write the value zero
|
|
@@ -7,7 +7,7 @@ $schema: param_schema.json#
|
|
|
7
7
|
kind: parameter
|
|
8
8
|
name: TINST_VALUE_ON_FINAL_LOAD_GUEST_PAGE_FAULT
|
|
9
9
|
description: |
|
|
10
|
-
Value
|
|
10
|
+
Value written into htinst/mtinst when there is a load guest-page fault on a final translation.
|
|
11
11
|
|
|
12
12
|
Possible values:
|
|
13
13
|
* "always zero": Always write the value zero
|
|
@@ -7,7 +7,7 @@ $schema: param_schema.json#
|
|
|
7
7
|
kind: parameter
|
|
8
8
|
name: TINST_VALUE_ON_FINAL_STORE_AMO_GUEST_PAGE_FAULT
|
|
9
9
|
description: |
|
|
10
|
-
Value
|
|
10
|
+
Value written into htinst/mtinst when there is a store/AMO guest-page fault on a final translation.
|
|
11
11
|
|
|
12
12
|
Possible values:
|
|
13
13
|
* "always zero": Always write the value zero
|
|
@@ -7,7 +7,7 @@ $schema: param_schema.json#
|
|
|
7
7
|
kind: parameter
|
|
8
8
|
name: TINST_VALUE_ON_LOAD_ADDRESS_MISALIGNED
|
|
9
9
|
description: |
|
|
10
|
-
Value written into htinst/mtinst on a
|
|
10
|
+
Value written into htinst/mtinst on a LoadAddressMisaligned exception from VU/VS-mode.
|
|
11
11
|
|
|
12
12
|
Possible values:
|
|
13
13
|
* "always zero": Always write the value zero
|
|
@@ -7,7 +7,7 @@ $schema: param_schema.json#
|
|
|
7
7
|
kind: parameter
|
|
8
8
|
name: TINST_VALUE_ON_STORE_AMO_ADDRESS_MISALIGNED
|
|
9
9
|
description: |
|
|
10
|
-
Value written into htinst/mtinst on a
|
|
10
|
+
Value written into htinst/mtinst on a StoreAmoAddressMisaligned exception from VU/VS-mode.
|
|
11
11
|
|
|
12
12
|
Possible values:
|
|
13
13
|
* "always zero": Always write the value zero
|
|
@@ -7,7 +7,7 @@ $schema: param_schema.json#
|
|
|
7
7
|
kind: parameter
|
|
8
8
|
name: UXLEN
|
|
9
9
|
description: |
|
|
10
|
-
Set of XLENs supported in U-mode. When both 32 and 64 are supported,
|
|
10
|
+
Set of XLENs supported in U-mode. When both 32 and 64 are supported, UXLEN can be changed,
|
|
11
11
|
via mstatus.UXL, between 32 and 64.
|
|
12
12
|
long_name: TODO
|
|
13
13
|
schema:
|
|
@@ -8,15 +8,24 @@ kind: parameter
|
|
|
8
8
|
name: VLEN
|
|
9
9
|
description: |
|
|
10
10
|
The number of bits in a single vector register.
|
|
11
|
-
long_name:
|
|
11
|
+
long_name: vector register bit width
|
|
12
12
|
schema:
|
|
13
13
|
type: integer
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
enum:
|
|
15
|
+
[
|
|
16
|
+
0x20,
|
|
17
|
+
0x40,
|
|
18
|
+
0x80,
|
|
19
|
+
0x100,
|
|
20
|
+
0x200,
|
|
21
|
+
0x400,
|
|
22
|
+
0x800,
|
|
23
|
+
0x1000,
|
|
24
|
+
0x2000,
|
|
25
|
+
0x4000,
|
|
26
|
+
0x8000,
|
|
27
|
+
0x10000,
|
|
28
|
+
]
|
|
20
29
|
definedBy:
|
|
21
30
|
extension:
|
|
22
31
|
name: Zvl32b
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
|
|
2
|
+
# SPDX-License-Identifier: BSD-3-Clause-Clear
|
|
3
|
+
|
|
4
|
+
# yaml-language-server: $schema=../../../schemas/param_schema.json
|
|
5
|
+
|
|
6
|
+
$schema: param_schema.json#
|
|
7
|
+
kind: parameter
|
|
8
|
+
name: VSTVEC_MODES
|
|
9
|
+
long_name: |
|
|
10
|
+
Modes supported by `vstvec.MODE`
|
|
11
|
+
definedBy:
|
|
12
|
+
extension:
|
|
13
|
+
name: H
|
|
14
|
+
description: |
|
|
15
|
+
Options:
|
|
16
|
+
|
|
17
|
+
0::
|
|
18
|
+
Direct; All traps set `pc` to `vstvec.BASE`
|
|
19
|
+
1::
|
|
20
|
+
Vectored; Asynchronous interrupts set `pc` to `vstvec.BASE` + 4 x cause.
|
|
21
|
+
|
|
22
|
+
If only one mode is given, `vstvec.MODE` is assumed to be read-only with that value.
|
|
23
|
+
Otherwise, `vstvec.MODE` is read-write.
|
|
24
|
+
schema:
|
|
25
|
+
type: array
|
|
26
|
+
items:
|
|
27
|
+
type: integer
|
|
28
|
+
enum: [0, 1]
|
|
29
|
+
minItems: 1
|
|
30
|
+
maxItems: 2
|
|
31
|
+
uniqueItems: true
|
data/lib/udb/Z3_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
z3-
|
|
1
|
+
z3-5.0.0
|
data/lib/udb/obj/csr.rb
CHANGED
|
@@ -198,7 +198,7 @@ module Udb
|
|
|
198
198
|
# VSXLEN condition applies if VS-mode is possible
|
|
199
199
|
(cfg_arch.mxlen.nil?) || \
|
|
200
200
|
(cfg_arch.possible_extensions.map(&:name).include?("S") && \
|
|
201
|
-
(cfg_arch.param_values["SXLEN"].nil? || cfg_arch.param_values["SXLEN"].size > 1))
|
|
201
|
+
(cfg_arch.param_values["SXLEN"].nil? || cfg_arch.param_values["SXLEN"].size > 1)) || \
|
|
202
202
|
(cfg_arch.possible_extensions.map(&:name).include?("H") && \
|
|
203
203
|
(cfg_arch.param_values["VSXLEN"].nil? || cfg_arch.param_values["VSXLEN"].size > 1))
|
|
204
204
|
else
|
data/lib/udb/obj/csr_field.rb
CHANGED
|
@@ -715,7 +715,7 @@ module Udb
|
|
|
715
715
|
sig { override.returns(T::Boolean) }
|
|
716
716
|
def defined_in_base64? = base != 32
|
|
717
717
|
|
|
718
|
-
sig { params(xlen: Integer).returns(T::Boolean) }
|
|
718
|
+
sig { override.params(xlen: Integer).returns(T::Boolean) }
|
|
719
719
|
def defined_in_base?(xlen) = xlen == 32 ? defined_in_base32? : defined_in_base64?
|
|
720
720
|
|
|
721
721
|
# @return [Boolean] Whether or not this field exists for any XLEN
|
data/lib/udb/obj/extension.rb
CHANGED
|
@@ -403,7 +403,7 @@ module Udb
|
|
|
403
403
|
sig { override.params(other_ext: Object).returns(T.nilable(Integer)).checked(:never) }
|
|
404
404
|
def <=>(other_ext)
|
|
405
405
|
return nil unless other_ext.is_a?(Extension)
|
|
406
|
-
|
|
406
|
+
name <=> other_ext.name
|
|
407
407
|
end
|
|
408
408
|
|
|
409
409
|
# returns list of exception codes that are defined by any version of this extension
|
data/lib/udb/version.rb
CHANGED
data/lib/udb/version_spec.rb
CHANGED
|
@@ -114,7 +114,7 @@ module Udb
|
|
|
114
114
|
sig { params(other: T.untyped).returns(T.nilable(Integer)).checked(:never) }
|
|
115
115
|
def <=>(other)
|
|
116
116
|
if other.is_a?(String)
|
|
117
|
-
VersionSpec.new(other)
|
|
117
|
+
self <=> VersionSpec.new(other)
|
|
118
118
|
elsif other.is_a?(VersionSpec)
|
|
119
119
|
if @major != other.major
|
|
120
120
|
@major <=> other.major
|
data/lib/udb/z3.rb
CHANGED
|
@@ -318,12 +318,13 @@ module Udb
|
|
|
318
318
|
# Supported JSON schema features:
|
|
319
319
|
# - Type constraints (boolean, integer, string, array)
|
|
320
320
|
# - Value constraints (const, enum, minimum, maximum)
|
|
321
|
-
# - Composition (allOf)
|
|
321
|
+
# - Composition (allOf; anyOf for boolean, integer, and string)
|
|
322
322
|
# - References ($ref to uint32/uint64)
|
|
323
323
|
# - Array constraints (items, minItems, maxItems, contains, uniqueItems)
|
|
324
324
|
#
|
|
325
325
|
# Not yet supported (TODO):
|
|
326
|
-
# - anyOf
|
|
326
|
+
# - anyOf for array
|
|
327
|
+
# - oneOf, noneOf
|
|
327
328
|
# - if/then/else (conditional schemas)
|
|
328
329
|
class Z3ParameterTerm
|
|
329
330
|
extend T::Sig
|
|
@@ -341,6 +342,7 @@ module Udb
|
|
|
341
342
|
# - enum: one of several values
|
|
342
343
|
# - minimum/maximum: range bounds (unsigned comparison)
|
|
343
344
|
# - allOf: conjunction of subschemas
|
|
345
|
+
# - anyOf: inclusive disjunction of subschemas (at least one must hold)
|
|
344
346
|
# - $ref: references to uint32/uint64 types
|
|
345
347
|
#
|
|
346
348
|
# @param solver [Z3Solver] The solver to add assertions to
|
|
@@ -385,12 +387,15 @@ module Udb
|
|
|
385
387
|
|
|
386
388
|
if schema_hsh.key?("allOf")
|
|
387
389
|
schema_hsh.fetch("allOf").each do |h|
|
|
388
|
-
assertions += constrain_int(solver, term, h)
|
|
390
|
+
assertions += constrain_int(solver, term, h, assert: false)
|
|
389
391
|
end
|
|
390
392
|
end
|
|
391
393
|
|
|
392
394
|
if schema_hsh.key?("anyOf")
|
|
393
|
-
|
|
395
|
+
branches = schema_hsh.fetch("anyOf").map do |h|
|
|
396
|
+
constrain_int(solver, term, h, assert: false)
|
|
397
|
+
end
|
|
398
|
+
assertions << any_of_constraint(branches)
|
|
394
399
|
end
|
|
395
400
|
|
|
396
401
|
if schema_hsh.key?("oneOf")
|
|
@@ -433,6 +438,7 @@ module Udb
|
|
|
433
438
|
# Handles JSON schema keywords:
|
|
434
439
|
# - const: exact boolean value
|
|
435
440
|
# - allOf: conjunction of subschemas
|
|
441
|
+
# - anyOf: inclusive disjunction of subschemas (at least one must hold)
|
|
436
442
|
#
|
|
437
443
|
# @param solver [Z3Solver] The solver to add assertions to
|
|
438
444
|
# @param term [Z3::BoolExpr] The Z3 boolean term to constrain
|
|
@@ -458,12 +464,15 @@ module Udb
|
|
|
458
464
|
|
|
459
465
|
if schema_hsh.key?("allOf")
|
|
460
466
|
schema_hsh.fetch("allOf").each do |h|
|
|
461
|
-
assertions += constrain_bool(solver, term, h)
|
|
467
|
+
assertions += constrain_bool(solver, term, h, assert: false)
|
|
462
468
|
end
|
|
463
469
|
end
|
|
464
470
|
|
|
465
471
|
if schema_hsh.key?("anyOf")
|
|
466
|
-
|
|
472
|
+
branches = schema_hsh.fetch("anyOf").map do |h|
|
|
473
|
+
constrain_bool(solver, term, h, assert: false)
|
|
474
|
+
end
|
|
475
|
+
assertions << any_of_constraint(branches)
|
|
467
476
|
end
|
|
468
477
|
|
|
469
478
|
if schema_hsh.key?("oneOf")
|
|
@@ -492,6 +501,7 @@ module Udb
|
|
|
492
501
|
# Handles JSON schema keywords:
|
|
493
502
|
# - const: exact string value (compared via hash)
|
|
494
503
|
# - enum: one of several string values (compared via hash)
|
|
504
|
+
# - anyOf: inclusive disjunction of subschemas (at least one must hold)
|
|
495
505
|
#
|
|
496
506
|
# @param solver [Z3Solver] The solver to add assertions to
|
|
497
507
|
# @param term [Z3::IntExpr] The Z3 integer term representing the string hash
|
|
@@ -526,7 +536,10 @@ module Udb
|
|
|
526
536
|
end
|
|
527
537
|
|
|
528
538
|
if schema_hsh.key?("anyOf")
|
|
529
|
-
|
|
539
|
+
branches = schema_hsh.fetch("anyOf").map do |h|
|
|
540
|
+
constrain_string(solver, term, h, assert: false)
|
|
541
|
+
end
|
|
542
|
+
assertions << any_of_constraint(branches)
|
|
530
543
|
end
|
|
531
544
|
|
|
532
545
|
if schema_hsh.key?("oneOf")
|
|
@@ -547,6 +560,15 @@ module Udb
|
|
|
547
560
|
assertions
|
|
548
561
|
end
|
|
549
562
|
|
|
563
|
+
sig { params(branches: T::Array[T::Array[Z3::BoolExpr]]).returns(Z3::BoolExpr) }
|
|
564
|
+
def self.any_of_constraint(branches)
|
|
565
|
+
expressions = branches.map do |branch|
|
|
566
|
+
branch.reduce(Z3.True) { |expression, assertion| expression & assertion }
|
|
567
|
+
end
|
|
568
|
+
expressions.reduce(Z3.False) { |expression, branch| expression | branch }
|
|
569
|
+
end
|
|
570
|
+
private_class_method :any_of_constraint
|
|
571
|
+
|
|
550
572
|
# Extract array constraints from JSON schema
|
|
551
573
|
#
|
|
552
574
|
# Processes JSON schema array keywords and returns an ArrayConstraints object
|