MCPcopy Create free account
hub / github.com/Z3Prover/z3 / getTesterDecls

Method getTesterDecls

src/api/java/EnumSort.java:76–84  ·  view source on GitHub ↗

The test predicates for the constants in the enumeration. @throws Z3Exception on error

()

Source from the content-addressed store, hash-verified

74 * @throws Z3Exception on error
75 **/
76 @SuppressWarnings("unchecked")
77 public FuncDecl<BoolSort>[] getTesterDecls()
78 {
79 int n = Native.getDatatypeSortNumConstructors(getContext().nCtx(), getNativeObject());
80 FuncDecl<BoolSort>[] t = new FuncDecl[n];
81 for (int i = 0; i < n; i++)
82 t[i] = new FuncDecl<>(getContext(), Native.getDatatypeSortRecognizer(getContext().nCtx(), getNativeObject(), i));
83 return t;
84 }
85
86 /**
87 * Retrieves the inx'th tester/recognizer declaration in the enumeration.

Callers 3

enumExampleMethod · 0.95
enumExampleTypedMethod · 0.80
enumExampleUntypedMethod · 0.80

Calls 3

nCtxMethod · 0.80
getContextMethod · 0.80
getNativeObjectMethod · 0.80

Tested by

no test coverage detected