You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>However, always take care that what you implement really has the semantics of a lattice (i.e., the values form a partial order and there exist a unique least upper bound and unique greatest lower bound for every two values).</p>
145
145
<h2id="additional-options-for-lattices">Additional Options for Lattices</h2>
146
-
<p>There are two additional classes that you might want to consider when implementing your lattice.</p>
147
-
<p>The first one is <ahref="/library/api/SNAPSHOT/org/opalj/fpcf/OrderedProperty.html"><code>OrderedProperty</code></a>.<br/>
146
+
<p>There is an additional class that you might want to consider when implementing your lattice: <ahref="/library/api/SNAPSHOT/org/opalj/fpcf/OrderedProperty.html"><code>OrderedProperty</code></a>.<br/>
148
147
If your lattice values extend this trait, you get additional checks in the PropertyStore whether your analyses refine their results monotonically with respect to your lattice's partial order.<br/>
149
148
<code>OrderedProperty</code> requires that you implement a method <code>checkIsEqualOrBetterThan(e: Entity, other: Self)</code> that should throw an exception if <code>other</code> is greater than the current value with respect to the lattice's partial order.<br/>
150
149
If you defined a <code>meet</code> method, you can simply implement it like this:</p>
@@ -155,14 +154,6 @@ <h2 id="additional-options-for-lattices">Additional Options for Lattices</h2>
155
154
}
156
155
</code></pre>
157
156
<p>However, it may be better to provide optimized implementations for your individual lattice values if the <code>meet</code> operation is not trivial.</p>
158
-
<p>The second option to consider is <ahref="/library/api/SNAPSHOT/org/opalj/br/fpcf/properties/AggregatedProperty.html"><code>AggregatedProperty</code></a>.<br/>
159
-
Some properties really represent an aggregation of another property, e.g., <code>ClassImmutability</code> aggregates the <code>FieldImmutability</code> of a class' instance fields.<br/>
160
-
In such cases, one often needs to convert between corresponding values of the two lattices.<br/>
161
-
Also, the partial order and thus <code>meet</code> operator are equivalent and need to be defined only once.</p>
162
-
<p>In order to use <code>AggregatedProperty</code>, the base lattice has to extend <code>IndividualProperty[BaseLattice, AggregateLattice]</code>, implement the <code>meet</code> method as well as an <code>aggregatedProperty</code> method that maps each value to its corresponding value of the aggregated lattice.<br/>
163
-
The aggregate lattice then has to extend <code>AggregatedProperty[BaseLattice, AggregateLattice]</code>.<br/>
164
-
It has to implement the <code>individualProperty</code> method that maps each value to the corresponding value of the base lattice.<br/>
165
-
The <code>meet</code> method on the aggregate lattice is provided for you based on the <code>meet</code> operator of the base lattice.</p>
166
157
<h2id="property-keys">Property Keys</h2>
167
158
<p>The <ahref="/library/api/SNAPSHOT/org/opalj/fpcf/PropertyKey.html"><code>PropertyKey</code></a> makes your lattice known to OPAL and gives it a unique identifier.<br/>
0 commit comments