MCPcopy Create free account
hub / github.com/SeaOfNodes/Simple / meet

Method meet

chapter11/src/main/java/com/seaofnodes/simple/type/Type.java:124–133  ·  view source on GitHub ↗
(Type t)

Source from the content-addressed store, hash-verified

122
123 // ----------------------------------------------------------
124 public final Type meet(Type t) {
125 // Shortcut for the self case
126 if( t == this ) return this;
127 // Same-type is always safe in the subclasses
128 if( _type==t._type ) return xmeet(t);
129 // Reverse; xmeet 2nd arg is never "is_simple" and never equal to "this".
130 if( is_simple() ) return this.xmeet(t );
131 if( t.is_simple() ) return t .xmeet(this);
132 return Type.BOTTOM; // Mixing 2 unrelated types
133 }
134
135 // Compute meet right now. Overridden in subclasses.
136 // Handle cases where 'this.is_simple()' and unequal to 't'.

Callers 15

testMeetMethod · 0.95
testLatticeTheoryMethod · 0.95
assocMethod · 0.95
isaMethod · 0.95
computeMethod · 0.95
computeMethod · 0.95
testTypeAdHocMethod · 0.45
check_commuteMethod · 0.45
check_symmetricMethod · 0.45
xmeetMethod · 0.45
xmeetMethod · 0.45
xmeetMethod · 0.45

Calls 2

xmeetMethod · 0.95
is_simpleMethod · 0.95

Tested by 6

testMeetMethod · 0.76
testLatticeTheoryMethod · 0.76
assocMethod · 0.76
testTypeAdHocMethod · 0.36
check_commuteMethod · 0.36
check_symmetricMethod · 0.36