Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
85 lines (70 loc) · 2.27 KB

File metadata and controls

85 lines (70 loc) · 2.27 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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
package symjava.relational;
import java.util.Map;
import symjava.symbolic.Expr;
import symjava.symbolic.TypeInfo;
import symjava.symbolic.arity.BinaryOp;
import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
import com.sun.org.apache.bcel.internal.generic.DCMPL;
import com.sun.org.apache.bcel.internal.generic.GOTO;
import com.sun.org.apache.bcel.internal.generic.IFLT;
import com.sun.org.apache.bcel.internal.generic.InstructionFactory;
import com.sun.org.apache.bcel.internal.generic.InstructionHandle;
import com.sun.org.apache.bcel.internal.generic.InstructionList;
import com.sun.org.apache.bcel.internal.generic.MethodGen;
import com.sun.org.apache.bcel.internal.generic.NOP;
import com.sun.org.apache.bcel.internal.generic.PUSH;
/**
* a >= b
*
*/
public class Ge extends BinaryOp implements Relation {
public Ge(Expr arg1, Expr arg2) {
super(arg1, arg2);
this.label = arg1 + " >= " + arg2;
this.sortKey = this.label;
}
@Override
public Expr simplify() {
return this;
}
@Override
public boolean symEquals(Expr other) {
return false;
}
@Override
public Expr diff(Expr expr) {
// TODO Auto-generated method stub
return null;
}
public static Ge apply(Expr lhs, Expr rhs) {
return new Ge(lhs, rhs);
}
public static Ge apply(double lhs, Expr rhs) {
return new Ge(Expr.valueOf(lhs), rhs);
}
public static Ge apply(Expr lhs, double rhs) {
return new Ge(lhs, Expr.valueOf(rhs));
}
public InstructionHandle bytecodeGen(String clsName, MethodGen mg,
ConstantPoolGen cp, InstructionFactory factory,
InstructionList il, Map<String, Integer> argsMap, int argsStartPos,
Map<Expr, Integer> funcRefsMap) {
InstructionHandle startPos = arg1.bytecodeGen(clsName, mg, cp, factory, il, argsMap, argsStartPos, funcRefsMap);
arg2.bytecodeGen(clsName, mg, cp, factory, il, argsMap, argsStartPos, funcRefsMap);
il.append(new DCMPL());
InstructionHandle iconst1 = il.append(new PUSH(cp, 1));
InstructionHandle iconst0 = il.append(new PUSH(cp, 0));
InstructionHandle nop = il.append(new NOP());
il.insert(iconst1, new IFLT(iconst0));
il.insert(iconst0, new GOTO(nop));
return startPos;
}
@Override
public TypeInfo getTypeInfo() {
return TypeInfo.tiInt;
}
@Override
public void updateLabel() {
// TODO Auto-generated method stub
}
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.