public ConditionalBranchInstruction(uint label, IVariable left, BranchOperation operation, IInmediateValue right, uint target) : base(label, target) { this.Operation = operation; this.LeftOperand = left; this.RightOperand = right; }
public static BoogieMethod GetBinaryMethod(BranchOperation op) { BoogieMethod method = null; switch (op) { case BranchOperation.Eq: method = BoogieMethod.StringEquality; break; case BranchOperation.Neq: method = BoogieMethod.StringInequality; break; } Contract.Assert(method != null); return(method); }
/// <summary> /// We use a branch instruction. /// </summary> public T Branch <T>([NotNull] Boolx1 value, [NotNull] T isTrue, [NotNull] T isFalse) where T : PinBinder { if (isTrue.Generator != isFalse.Generator || isTrue.Generator != value.Generator || isTrue.Generator != this) { throw new ArgumentException("All values must have the same generator."); } BranchOperation op = new BranchOperation(); op.BindInputs(value.Pin, isTrue.Pin, isFalse.Pin); return((T)CreateFrom(op.Outputs[0])); }