randoop.experiments
Class DataFlowInput

Object
  extended by DataFlowInput
All Implemented Interfaces:
Serializable

public class DataFlowInput
extends Object
implements Serializable

A collection of frontier branches and sequences that reach them. A DataFlowInput is the input to the DataFlow analysis.

See Also:
Serialized Form

Field Summary
Modifier and Type Field and Description
 Map<Branch,Set<Sequence>> frontierMap
           
 
Constructor Summary
Constructor and Description
DataFlowInput(Map<Branch,Set<Sequence>> frontierMap)
           
 
Method Summary
Modifier and Type Method and Description
static DataFlowInput parse(String inFile)
          Create a new DataFlowInput from a text file.
 void toParseableFile(String outFile, boolean outputCodeRep)
          Output this DataFlowInput as a text file.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

frontierMap

public Map<Branch,Set<Sequence>> frontierMap
Constructor Detail

DataFlowInput

public DataFlowInput(Map<Branch,Set<Sequence>> frontierMap)
Method Detail

parse

public static DataFlowInput parse(String inFile)
Create a new DataFlowInput from a text file. The text file consists of a list of records. Each record is as follows: START RECORD BRANCH SEQUENCE END RECORD Where is a string that can be parsed by the method cov.OneBranchInfo.parse(String), and is a string that can be parsed by the method randoop.SequenceParser.parse(String). Blank lines and comments between records are allowed and ignored. Comments are lines starting with "#". The records are read and used to populate the frontierMap field of the new DataFlowInput object. If two records specify the same branch, the two sequences are added to the same set.

Parameters:
inFile - A text file containing a description of branches and sequences. If inFile ends in ".gz" it will be read as a compressed file.

toParseableFile

public void toParseableFile(String outFile,
                            boolean outputCodeRep)
Output this DataFlowInput as a text file.

Parameters:
outFile - The file where output is to be written. If outFile ends in ".gz" it will be output as a compressed file.
outputCodeRep - If true, also output the code representation of each sequence, as a comment following each record.