Skip to content

Commit b4be2ee

Browse files
author
Dominik Helm
committed
Removal of aggregated properties
1 parent 6e5c5c5 commit b4be2ee

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

tutorial/Lattices.html

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,7 @@ <h2 id="combined-lattices">Combined Lattices</h2>
143143
</code></pre>
144144
<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>
145145
<h2 id="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 <a href="/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: <a href="/library/api/SNAPSHOT/org/opalj/fpcf/OrderedProperty.html"><code>OrderedProperty</code></a>.<br />
148147
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 />
149148
<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 />
150149
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>
155154
}
156155
</code></pre>
157156
<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 <a href="/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>
166157
<h2 id="property-keys">Property Keys</h2>
167158
<p>The <a href="/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 />
168159
You create it using one of two methods:</p>

0 commit comments

Comments
 (0)