-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removing 'forward' from dataflow class naming #120
- Loading branch information
Showing
10 changed files
with
64 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,31 +7,30 @@ | |
import org.apache.commons.collections4.SetUtils; | ||
|
||
/** | ||
* A {@link DataflowDomain} for <b>forward</b> and <b>definite</b> dataflow | ||
* analysis. Being definite means that this domain is an instance of | ||
* {@link InverseSetLattice}, i.e., is a set whose join operation is the set | ||
* intersection. | ||
* A {@link DataflowDomain} for <b>definite</b> dataflow analysis. Being | ||
* definite means that this domain is an instance of {@link InverseSetLattice}, | ||
* i.e., is a set whose join operation is the set intersection. | ||
* | ||
* @author <a href="mailto:[email protected]">Luca Negrini</a> | ||
* | ||
* @param <E> the type of {@link DataflowElement} contained in this domain | ||
*/ | ||
public class DefiniteForwardDataflowDomain<E extends DataflowElement<DefiniteForwardDataflowDomain<E>, E>> | ||
public class DefiniteDataflowDomain<E extends DataflowElement<DefiniteDataflowDomain<E>, E>> | ||
extends | ||
DataflowDomain<DefiniteForwardDataflowDomain<E>, E> { | ||
DataflowDomain<DefiniteDataflowDomain<E>, E> { | ||
|
||
/** | ||
* Builds an empty domain. | ||
* | ||
* @param domain a singleton instance to be used during semantic operations | ||
* to perform <i>kill</i> and <i>gen</i> operations | ||
*/ | ||
public DefiniteForwardDataflowDomain( | ||
public DefiniteDataflowDomain( | ||
E domain) { | ||
this(domain, new HashSet<>(), true, false); | ||
} | ||
|
||
private DefiniteForwardDataflowDomain( | ||
private DefiniteDataflowDomain( | ||
E domain, | ||
Set<E> elements, | ||
boolean isTop, | ||
|
@@ -40,34 +39,34 @@ private DefiniteForwardDataflowDomain( | |
} | ||
|
||
@Override | ||
public DefiniteForwardDataflowDomain<E> mk( | ||
public DefiniteDataflowDomain<E> mk( | ||
E domain, | ||
Set<E> elements, | ||
boolean isTop, | ||
boolean isBottom) { | ||
return new DefiniteForwardDataflowDomain<>(domain, elements, isTop, isBottom); | ||
return new DefiniteDataflowDomain<>(domain, elements, isTop, isBottom); | ||
} | ||
|
||
@Override | ||
public DefiniteForwardDataflowDomain<E> lubAux( | ||
DefiniteForwardDataflowDomain<E> other) | ||
public DefiniteDataflowDomain<E> lubAux( | ||
DefiniteDataflowDomain<E> other) | ||
throws SemanticException { | ||
Set<E> intersection = SetUtils.intersection(this.getDataflowElements(), other.getDataflowElements()); | ||
return new DefiniteForwardDataflowDomain<>(domain, intersection, false, false); | ||
return new DefiniteDataflowDomain<>(domain, intersection, false, false); | ||
} | ||
|
||
@Override | ||
public boolean lessOrEqualAux( | ||
DefiniteForwardDataflowDomain<E> other) | ||
DefiniteDataflowDomain<E> other) | ||
throws SemanticException { | ||
return this.getDataflowElements().containsAll(other.getDataflowElements()); | ||
} | ||
|
||
@Override | ||
public DefiniteForwardDataflowDomain<E> glbAux( | ||
DefiniteForwardDataflowDomain<E> other) | ||
public DefiniteDataflowDomain<E> glbAux( | ||
DefiniteDataflowDomain<E> other) | ||
throws SemanticException { | ||
Set<E> intersection = SetUtils.union(this.getDataflowElements(), other.getDataflowElements()); | ||
return new DefiniteForwardDataflowDomain<>(domain, intersection, false, false); | ||
return new DefiniteDataflowDomain<>(domain, intersection, false, false); | ||
} | ||
} |
Oops, something went wrong.