public interface

IDPredicate

implements IDOperation
com.pnfsoftware.jeb.core.units.code.android.ir.IDPredicate

Class Overview

Special operation typed as boolean and used as conditions for IR_JCOND instructions.

Summary

[Expand]
Inherited Constants
From interface com.pnfsoftware.jeb.core.units.code.android.ir.IDElement
Public Methods
abstract boolean canReverse()
Determine whether or not this predicate can be safely reversed.
abstract IDPredicate duplicate()
Duplicate this element.
abstract boolean isFalse()
Determine whether this predicate is trivially false.
abstract boolean isTrue()
Determine whether this predicate is trivially true.
abstract void reverse()
Reverse this predicate.
[Expand]
Inherited Methods
From interface com.pnfsoftware.jeb.core.units.code.IInstructionOperand
From interface com.pnfsoftware.jeb.core.units.code.android.ir.IDElement
From interface com.pnfsoftware.jeb.core.units.code.android.ir.IDExpression
From interface com.pnfsoftware.jeb.core.units.code.android.ir.IDOperation

Public Methods

public abstract boolean canReverse ()

Determine whether or not this predicate can be safely reversed.

Returns

public abstract IDPredicate duplicate ()

Duplicate this element.

Returns
  • a deep copy of this element; the type of the duplicated element should be the same as this element's type

public abstract boolean isFalse ()

Determine whether this predicate is trivially false.

Returns
  • true if the predicate is guaranteed to be false; otherwise, the method returns false, indicating the value of the predicate is not trivial (it may be true or false)

public abstract boolean isTrue ()

Determine whether this predicate is trivially true.

Returns
  • true if the predicate is guaranteed to be true; otherwise, the method returns false, indicating the value of the predicate is not trivial (it may be true or false)

public abstract void reverse ()

Reverse this predicate. The modification is done in place. This method never fails, but the result may be inconsistent with what the client expects. Always call canReverse() before executing this method.

Examples: a==b is reversed to a!=b; a>=b is reversed to a<b.

Caution: Reversing is done "blindly". However, not all logical operators may be safely reversed. Notable examples are inequality operations on floating numbers, which cannot be safely reversed. Example: a>b is not equivalent to !(a<=b for cases where one or both operands are NaN. Therefore, in the general case, callers should check before reversing a predicate, .