dpvis.datastructures.impl
Class DependencyPairProblemImpl

java.lang.Object
  extended by dpvis.datastructures.impl.DependencyPairProblemImpl
All Implemented Interfaces:
DependencyPairProblem, java.io.Serializable

public class DependencyPairProblemImpl
extends java.lang.Object
implements DependencyPairProblem

Author:
felixs
See Also:
Serialized Form

Field Summary
 java.util.Set<Rule> dependencyPairs
           
 RewriteSystem rewriteSystem
           
 java.util.Set<java.lang.String> signature
           
 
Constructor Summary
DependencyPairProblemImpl(DependencyPairProblem dp)
           
DependencyPairProblemImpl(java.util.Set<Rule> dependencyPairs, RewriteSystem rewriteSystem, java.util.Set<java.lang.String> signature)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 void filter(java.util.Map<java.lang.String,java.util.List<java.lang.Integer>> filtering)
          Applies an argument filtering to the dependency pairs and the rewrite system of this problem.
 java.util.Set<Rule> getDependencyPairs()
          Gets the set of Dependency Pairs that are contained in this DP problem
 java.util.Set<java.lang.String> getDependencyPairSymbols()
          Returns the root symbols of left- and right-hand sides of dependency pairs of the DP problem.
 java.util.Set<java.lang.String> getHiddenSymbols()
          Computes the hidden symbols of a DP problem (P, R), i.e. those defined functions of the signature of R, that occur at a forbidden position in one of the right hand sides of pairs in P.
 RewriteSystem getRewriteSystem()
          Gets the Rewrite System associated with this DP Problem
 java.util.Set<java.lang.String> getSignature()
          Gets the signature specifying those terms whose termination shall be proved.
 int hashCode()
           
 boolean isComplete()
           
 boolean isContextSensitive()
           
 boolean isMinimal()
           
 void setComplete(boolean complete)
           
 void setContextSensitive(boolean contextSensitive)
           
 void setDependencyPairs(java.util.Set<Rule> dependencyPairs)
          Sets the set of Dependency pairs
 void setMinimal(boolean minimal)
           
 void setRewriteSystem(RewriteSystem rewriteSystem)
          Sets the Rewrite System for this DP Problem
 void setSignature(java.util.Set<java.lang.String> signature)
          Sets the signature specifying those terms whose termination shall be proved.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

dependencyPairs

public java.util.Set<Rule> dependencyPairs

rewriteSystem

public RewriteSystem rewriteSystem

signature

public java.util.Set<java.lang.String> signature
Constructor Detail

DependencyPairProblemImpl

public DependencyPairProblemImpl(java.util.Set<Rule> dependencyPairs,
                                 RewriteSystem rewriteSystem,
                                 java.util.Set<java.lang.String> signature)

DependencyPairProblemImpl

public DependencyPairProblemImpl(DependencyPairProblem dp)
Method Detail

isMinimal

public boolean isMinimal()
Specified by:
isMinimal in interface DependencyPairProblem

setMinimal

public void setMinimal(boolean minimal)
Specified by:
setMinimal in interface DependencyPairProblem

isContextSensitive

public boolean isContextSensitive()
Specified by:
isContextSensitive in interface DependencyPairProblem

setContextSensitive

public void setContextSensitive(boolean contextSensitive)
Specified by:
setContextSensitive in interface DependencyPairProblem

isComplete

public boolean isComplete()
Specified by:
isComplete in interface DependencyPairProblem

setComplete

public void setComplete(boolean complete)
Specified by:
setComplete in interface DependencyPairProblem

getDependencyPairs

public java.util.Set<Rule> getDependencyPairs()
Description copied from interface: DependencyPairProblem
Gets the set of Dependency Pairs that are contained in this DP problem

Specified by:
getDependencyPairs in interface DependencyPairProblem
Returns:
Set of Dependency Pairs

setDependencyPairs

public void setDependencyPairs(java.util.Set<Rule> dependencyPairs)
Description copied from interface: DependencyPairProblem
Sets the set of Dependency pairs

Specified by:
setDependencyPairs in interface DependencyPairProblem
Parameters:
dependencyPairs - The new Set of Dependency Pairs

getRewriteSystem

public RewriteSystem getRewriteSystem()
Description copied from interface: DependencyPairProblem
Gets the Rewrite System associated with this DP Problem

Specified by:
getRewriteSystem in interface DependencyPairProblem
Returns:
The RewriteSystem

setRewriteSystem

public void setRewriteSystem(RewriteSystem rewriteSystem)
Description copied from interface: DependencyPairProblem
Sets the Rewrite System for this DP Problem

Specified by:
setRewriteSystem in interface DependencyPairProblem
Parameters:
rewriteSystem - The new Rewrite System

getHiddenSymbols

public java.util.Set<java.lang.String> getHiddenSymbols()
Description copied from interface: DependencyPairProblem
Computes the hidden symbols of a DP problem (P, R), i.e. those defined functions of the signature of R, that occur at a forbidden position in one of the right hand sides of pairs in P.

Specified by:
getHiddenSymbols in interface DependencyPairProblem
Returns:
The set of hidden symbols

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getSignature

public java.util.Set<java.lang.String> getSignature()
Description copied from interface: DependencyPairProblem
Gets the signature specifying those terms whose termination shall be proved. For a DP Problem (P, R) this will be the signature of R most of the time.

Specified by:
getSignature in interface DependencyPairProblem
Returns:
The signature identifying relevant terms for the termination analysis as set of Functions.

setSignature

public void setSignature(java.util.Set<java.lang.String> signature)
Description copied from interface: DependencyPairProblem
Sets the signature specifying those terms whose termination shall be proved. For a DP Problem (P, R) this will be the signature of R most of the time.

Specified by:
setSignature in interface DependencyPairProblem
Parameters:
signature - The signature identifying relevant terms for the termination analysis as set of Functions.

getDependencyPairSymbols

public java.util.Set<java.lang.String> getDependencyPairSymbols()
Description copied from interface: DependencyPairProblem
Returns the root symbols of left- and right-hand sides of dependency pairs of the DP problem.

Specified by:
getDependencyPairSymbols in interface DependencyPairProblem
Returns:
The dependency pair symbols (sometimes called tuple symbols) of the DP problem.

filter

public void filter(java.util.Map<java.lang.String,java.util.List<java.lang.Integer>> filtering)
Description copied from interface: DependencyPairProblem
Applies an argument filtering to the dependency pairs and the rewrite system of this problem. An argument filtering is specified by a mapping from functions to lists of argument positions, e.g. f -> [2, 3]. The argument positions in the list specify those arguments of the function symbol that are filtered, i.e. removed. So the above filtering applied to the term f(x, y, z) yields f(x). In order to indicate a collapsing filtering negative integers are used, e.g. f -> [-2], which yields y if applied to f(x, y, z).

Specified by:
filter in interface DependencyPairProblem
Parameters:
filtering - The filtering given by a mapping from functions to lists of argument positions.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object