Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright (C) 2015 The Pennsylvania State University and the University of Wisconsin
   * Systems and Internet Infrastructure Security Laboratory
   *
   * Author: Damien Octeau
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
  *
  * http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
 package edu.psu.cse.siis.coal.field;
 
 import java.util.Set;
 
 
 import soot.Value;
A element that represents the influence of a modifier after a value composition. This is not be used in the iterative version of the algorithm. After we encounter a modifier that makes a reference to another COAL value, we record further transformers for the same field in this element.
 
 public class SequenceElement {
   private final Logger logger = LoggerFactory.getLogger(getClass());
   private final Value symbol;
   private final Stmt stmt;
   private final String op;
 
   public SequenceElement(Value symbolStmt stmtString op) {
     this. = symbol;
     this. = stmt;
     this. = op;
     this. = IdentityFieldTransformer.v();
   }
 
   public void composeWith(FieldTransformer newFieldTransformer) {
     this. = this..compose(newFieldTransformer);
   }

  
Generates transformers that represent the influence of this element, including any field transformer that was encountered after the COAL value composition.

Parameters:
field The field that is modified.
solver A propagation solver.
Returns:
The set of field transformers that represent this element.
 
     Set<FieldTransformerresult = new HashSet<>();
     for (FieldTransformer currentFieldTransformer : makeTransformersFromReferencedValue(field,
         solver)) {
       if (currentFieldTransformer != null) {
         result.add(currentFieldTransformer.compose(this.));
       } else {
         result.add(null);
       }
     }
 
     return result;
   }

  
Generates field transformers for a referenced value represented by this element. There may be more than one transformer for a single referenced variable, since the referenced variable may have more than one possible value.

Parameters:
field A field name.
solver A propagation solver.
Returns:
A set of field transformers that represent the influence of the referenced value.
 
       PropagationSolver solver) {
     if (.isDebugEnabled()) {
       .debug("Making transformer from element " + this.toString());
     }
 
     return FieldTransformerUtils.makeTransformersFromReferencedValue(fieldnull,
         solvernew Boolean[1]);
   }
 
  public String toString() {
    return "symbol " + this. + ", stmt " + this. + ", op " + this.
        + ", field transformer " + this.;
  }
  public int hashCode() {
    return Objects.hash(this.this.this.this.);
  }
  public boolean equals(Object other) {
    if (!(other instanceof SequenceElement)) {
      return false;
    }
    SequenceElement secondSequenceElement = (SequenceElementother;
    return Objects.equals(this.secondSequenceElement.symbol)
        && Objects.equals(this.secondSequenceElement.stmt)
        && Objects.equals(this.secondSequenceElement.op)
        && Objects.equals(this.secondSequenceElement.fieldTransformer);
  }
New to GrepCode? Check out our FAQ X