Skip to content

Commit c83cc78

Browse files
author
Dominik Helm
committed
br->si changes
1 parent 9d9bdb6 commit c83cc78

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

tutorial/ClassImmutabilityAnalysis.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ import org.opalj.br.analyses.ProjectInformationKeys
1010
import org.opalj.br.analyses.SomeProject
1111
import org.opalj.br.fpcf.BasicFPCFEagerAnalysisScheduler
1212
import org.opalj.br.fpcf.BasicFPCFLazyAnalysisScheduler
13-
import org.opalj.br.fpcf.FPCFAnalysesManagerKey
1413
import org.opalj.br.fpcf.FPCFAnalysis
1514
import org.opalj.br.fpcf.FPCFAnalysisScheduler
1615
import org.opalj.fpcf.Entity
1716
import org.opalj.fpcf.EOptionP
1817
import org.opalj.fpcf.FallbackReason
18+
import org.opalj.fpcf.FPCFAnalysesManagerKey
1919
import org.opalj.fpcf.InterimResult
2020
import org.opalj.fpcf.OrderedProperty
2121
import org.opalj.fpcf.ProperPropertyComputationResult

tutorial/FixedPointAnalyses.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ <h2 id="running-the-analysis">Running the Analysis</h2>
386386
[...]
387387
}
388388
</code></pre>
389-
<p>We use the <a href="/library/api/SNAPSHOT/org/opalj/br/fpcf/FPCFAnalysesManagerKey$.html"><code>FPCFAnalysisManagerKey</code></a> to get an <a href="/library/api/SNAPSHOT/org/opalj/br/fpcf/FPCFAnalysesManager.html"><code>FPCFAnalysisManager</code></a> that will run our analyses.<br />
389+
<p>We use the <a href="/library/api/SNAPSHOT/org/opalj/fpcf/FPCFAnalysesManagerKey$.html"><code>FPCFAnalysesManagerKey</code></a> to get an <a href="/library/api/SNAPSHOT/org/opalj/fpcf/FPCFAnalysesManager.html"><code>FPCFAnalysesManager</code></a> that will run our analyses.<br />
390390
We just pass all analyses that we want to execute to the <code>runAll</code> method.<br />
391391
Note that we assume that a <code>LazyFieldImmutabilityAnalysis</code> has been implemented as well.<br />
392392
As long as that doesn't exist, you can remove that line and OPAL will use the fallback value of the <code>FieldImmutability</code> lattice whenever a field immutability is queried.</p>

tutorial/InstantiatedTypesAnalysis.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ import org.opalj.br.fpcf.properties.cg.Callers
1313
import org.opalj.br.fpcf.properties.cg.NoCallers
1414
import org.opalj.br.fpcf.BasicFPCFTriggeredAnalysisScheduler
1515
import org.opalj.br.fpcf.ContextProviderKey
16-
import org.opalj.br.fpcf.FPCFAnalysesManagerKey
1716
import org.opalj.br.fpcf.analyses.ContextProvider
1817
import org.opalj.br.instructions.NEW
1918
import org.opalj.fpcf.Entity
2019
import org.opalj.fpcf.EOptionP
2120
import org.opalj.fpcf.EPK
2221
import org.opalj.fpcf.FallbackReason
2322
import org.opalj.fpcf.FinalP
23+
import org.opalj.fpcf.FPCFAnalysesManagerKey
2424
import org.opalj.fpcf.InterimEUBP
2525
import org.opalj.fpcf.InterimPartialResult
2626
import org.opalj.fpcf.InterimUBP

tutorial/Schedulers.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,17 +93,17 @@ <h2 id="scheduler-basics">Scheduler Basics</h2>
9393
}
9494
</code></pre>
9595
<p>This consists of two parts:</p>
96-
<p>First, <code>requiredProjectInformation</code> gives the <a href="/library/api/SNAPSHOT/org/opalj/br/analyses/ProjectInformationKey.html"><code>ProjectInformationKey</code>s</a> that your analysis uses.<br />
96+
<p>First, <code>requiredProjectInformation</code> gives the <a href="/library/api/SNAPSHOT/org/opalj/si/ProjectInformationKey.html"><code>ProjectInformationKey</code>s</a> that your analysis uses.<br />
9797
ProjectInformationKeys provide aggregated information about a project, such as a call graph or the set of methods that access each field.<br />
98-
Here, we specified the <a href="/library/api/SNAPSHOT/org/opalj/br/analyses/FieldAccessInformationKey$.html"><code>FieldAccessInformationKey</code></a> that you can use with <a href="/library/api/SNAPSHOT/org/opalj/br/analyses/Project.html#get[T%3C:AnyRef](pik:org.opalj.br.analyses.ProjectInformationKey[T,_]):T"><code>Project.get()</code></a> to get <a href="/library/api/SNAPSHOT/org/opalj/br/analyses/FieldAccessInformation.html"><code>FieldAccessInformation</code></a>, i.e., information about where each field is read or written.</p>
98+
Here, we specified the <a href="/library/api/SNAPSHOT/org/opalj/br/analyses/FieldAccessInformationKey$.html"><code>FieldAccessInformationKey</code></a> that you can use with <a href="/library/api/SNAPSHOT/org/opalj/si/Project.html#get[T%3C:AnyRef](pik:org.opalj.si.ProjectInformationKey[T,_]):T"><code>Project.get()</code></a> to get <a href="/library/api/SNAPSHOT/org/opalj/br/analyses/FieldAccessInformation.html"><code>FieldAccessInformation</code></a>, i.e., information about where each field is read or written.</p>
9999
<p>Second, <code>uses</code> gives the results of fixed-point analyses that your analysis requires.<br />
100100
Here, our analysis uses upper bounds for both <code>FieldImmutability</code> and <code>ClassImmutability</code>.<br />
101101
You can specify other bounds using other methods from <a href="/library/api/SNAPSHOT/org/opalj/fpcf/PropertyBounds$.html"><code>PropertyBounds</code></a>.<br />
102102
Remember to always include the type(s) of results produced by your own analysis as well if you use them!</p>
103103
<p>In general, every scheduler also has to provide information on what type(s) of results your analysis produces, but this is specified differently for different schedulers.
104104
Let's take a look at the individual scheduler types now.</p>
105105
<h2 id="eager-scheduling">Eager Scheduling</h2>
106-
<p>The <a href="/library/api/SNAPSHOT/org/opalj/br/fpcf/FPCFEagerAnalysisScheduler.html"><code>FPCFEagerAnalysisScheduler</code></a> is for simple analyses that compute some properties for a number of entities that you know in advance.<br />
106+
<p>The <a href="/library/api/SNAPSHOT/org/opalj/fpcf/FPCFEagerAnalysisScheduler.html"><code>FPCFEagerAnalysisScheduler</code></a> is for simple analyses that compute some properties for a number of entities that you know in advance.<br />
107107
For example, you could compute the immutability for all fields of all classes in your analyzed program like this:</p>
108108
<pre><code class="language-scala">object EagerFieldImmutabilityAnalysis extends BasicFPCFEagerAnalysisScheduler {
109109
[...]
@@ -123,14 +123,14 @@ <h2 id="eager-scheduling">Eager Scheduling</h2>
123123
Note that you can specify more than just one type of result if your analysis computes several properties at once.
124124
<a href="/tutorial/CollaborativeAnalyses.html">Collaborative Analyses</a> use the <code>derivesCollaboratively</code> instead and you can combine both if necessary.</p>
125125
<p>The eager scheduler's entry point is the <code>start</code> method.<br />
126-
You are given the <a href="/library/api/SNAPSHOT/org/opalj/br/analyses/Project.html"><code>Project</code></a>, i.e., your analyzed program and the <a href="/library/api/SNAPSHOT/org/opalj/fpcf/PropertyStore.html"><code>PropertyStore</code></a> that will execute your analyses.<br />
126+
You are given the <a href="/library/api/SNAPSHOT/org/opalj/si/Project.html"><code>Project</code></a>, i.e., your analyzed program and the <a href="/library/api/SNAPSHOT/org/opalj/fpcf/PropertyStore.html"><code>PropertyStore</code></a> that will execute your analyses.<br />
127127
You can also get some initialization data if you need it, see <a href="#advanced-scheduling">Advanced Scheduling</a> below for more information.</p>
128128
<p>After creating your analysis, you use <code>scheduleEagerComputation</code> to schedule it.<br />
129129
The first argument gives the entities for which you want to compute properties. Your analysis function will be called once for each entity.<br />
130130
The second argument is the analysis function. It must take a single argument of the type of your entities and produce a <a href="/library/api/SNAPSHOT/org/opalj/fpcf/PropertyComputationResult.html"><code>PropertyComputationResult</code></a>.
131131
In the end, you return your analysis object.</p>
132132
<h2 id="lazy-scheduling">Lazy Scheduling</h2>
133-
<p>The <a href="/library/api/SNAPSHOT/org/opalj/br/fpcf/FPCFEagerAnalysisScheduler.html"><code>FPCFLazyAnalysisScheduler</code></a> lets you compute properties only for entities that need them, i.e., properties that are queried by other analyses<sup title="You can also manually tell the PropertyStore to compute the property for some entity using the force method.">[note]</sup>.
133+
<p>The <a href="/library/api/SNAPSHOT/org/opalj/fpcf/FPCFEagerAnalysisScheduler.html"><code>FPCFLazyAnalysisScheduler</code></a> lets you compute properties only for entities that need them, i.e., properties that are queried by other analyses<sup title="You can also manually tell the PropertyStore to compute the property for some entity using the force method.">[note]</sup>.
134134
Let's again implement a scheduler for a field immutability analysis:</p>
135135
<pre><code class="language-scala">object LazyFieldImmutabilityAnalysis extends BasicFPCFLazyAnalysisScheduler {
136136

@@ -152,7 +152,7 @@ <h2 id="lazy-scheduling">Lazy Scheduling</h2>
152152
It also takes an analysis function, but this time, it must take a single argument that could be <em>any</em> type of entity. You can throw an exception if it doesn't match your expected type of entity, though.
153153
As before, the analysis function must return a PropertyComputationResult.</p>
154154
<h2 id="transformers">Transformers</h2>
155-
<p>The <a href="/library/api/SNAPSHOT/org/opalj/br/fpcf/FPCFTransformerScheduler.html"><code>FPCFTransformerScheduler</code></a> is a special kind of lazy scheduler.<br />
155+
<p>The <a href="/library/api/SNAPSHOT/org/opalj/fpcf/FPCFTransformerScheduler.html"><code>FPCFTransformerScheduler</code></a> is a special kind of lazy scheduler.<br />
156156
As with a lazy scheduler, properties are only computed for entities that are queried.
157157
However, in contrast to the lazy scheduler, the analysis function is only called once some other property for the same entity has a final result.</p>
158158
<p>As an example, see the following scheduler:</p>
@@ -178,7 +178,7 @@ <h2 id="transformers">Transformers</h2>
178178
Note that it is not necessary to explicitly query for this required property: when the property computed by the transformer is queried, that automatically triggers the computation of its required property as well.<br />
179179
The analysis function here takes two arguments: the entity (as with lazy schedulers, this could be on any type) and the required property (a <code>BaseAIResult</code> here).</p>
180180
<h2 id="triggered-scheduling">Triggered Scheduling</h2>
181-
<p>The <a href="/library/api/SNAPSHOT/org/opalj/br/fpcf/FPCFTriggeredAnalysisScheduler.html"><code>FPCFTriggeredAnalysisScheduler</code></a> lets you start a computation for an entity only once you know that this entity does have some other property.<br />
181+
<p>The <a href="/library/api/SNAPSHOT/org/opalj/fpcf/FPCFTriggeredAnalysisScheduler.html"><code>FPCFTriggeredAnalysisScheduler</code></a> lets you start a computation for an entity only once you know that this entity does have some other property.<br />
182182
Different to a transformer, that other property does not have to have a final result yet, though.<br />
183183
Let's see an example of how to use this for a call graph module:</p>
184184
<pre><code class="language-scala">object MyCallGraphModule extends BasicFPCFTriggeredAnalysisScheduler {

0 commit comments

Comments
 (0)