mirror of
https://github.com/Z3Prover/z3
synced 2025-04-27 10:55:50 +00:00
Logic simplifications
There is no point in writing "boolean ? true : false" instead of "boolean"
This commit is contained in:
parent
52fdf73178
commit
a816b4895c
7 changed files with 21 additions and 22 deletions
|
@ -32,8 +32,9 @@ public class BitVecNum extends BitVecExpr
|
|||
public int getInt()
|
||||
{
|
||||
Native.IntPtr res = new Native.IntPtr();
|
||||
if (Native.getNumeralInt(getContext().nCtx(), getNativeObject(), res) ^ true)
|
||||
if (!Native.getNumeralInt(getContext().nCtx(), getNativeObject(), res)) {
|
||||
throw new Z3Exception("Numeral is not an int");
|
||||
}
|
||||
return res.value;
|
||||
}
|
||||
|
||||
|
@ -45,8 +46,9 @@ public class BitVecNum extends BitVecExpr
|
|||
public long getLong()
|
||||
{
|
||||
Native.LongPtr res = new Native.LongPtr();
|
||||
if (Native.getNumeralInt64(getContext().nCtx(), getNativeObject(), res) ^ true)
|
||||
if (!Native.getNumeralInt64(getContext().nCtx(), getNativeObject(), res)) {
|
||||
throw new Z3Exception("Numeral is not a long");
|
||||
}
|
||||
return res.value;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue