/**
         * Generate an SMT2 model for a given AnalysisContract. The main interface
         * of this class.
         * 
         * @param ac
         *            the AnalysisContract to generate for
         * @param forAssumptions
         *            indicates whether the AnalysisContract is an assumption
         *            (slight differences in processing)
         * @return
         */
public String generateSmtForClause(AnalysisContract ac, ContractClause cc, boolean verifyOrFind) {
		// prepare for a new iteration, clean the state
		clearData();
		// handle contract clause itself first (implicitly includes traversing unknown types and properties)
		String clauseOutput = ""; 
		if (verifyOrFind)
			clauseOutput += generateSmtContractClauseVerify(cc);
		else 
			clauseOutput += generateSmtContractClauseFind(cc);    
		// process input and output to collect info about components and
		// properties
		traverseInputOutput(ac);
		// create definitions and facts
		// also populate string2int dictionary as a side effect
		String defFactOutput = psg.generateDefinitionsAndFacts(compToProp, ac, stringToIntDict);
		// apply dictionary transform to clause output
		// FIXME collisions with other names possible
		for (String str: stringToIntDict.keySet()) { 
			clauseOutput = clauseOutput.replace('$' + str + '$', String.valueOf(stringToIntDict.get(str)));
		}
		// defs and facts come come first
		return defFactOutput + clauseOutput;
	}
public String generateSmtForClause(AnalysisContract ac, ContractClause cc, boolean verifyOrFind) {
// prepare for a new iteration, clean the state
clearData();
// handle contract clause itself first (implicitly includes traversing unknown types and properties)
String clauseOutput = "";
if (verifyOrFind)
clauseOutput += generateSmtContractClauseVerify(cc);
else
clauseOutput += generateSmtContractClauseFind(cc);
// process input and output to collect info about components and
// properties
traverseInputOutput(ac);
// create definitions and facts
// also populate string2int dictionary as a side effect
String defFactOutput = psg.generateDefinitionsAndFacts(compToProp, ac, stringToIntDict);
// apply dictionary transform to clause output
// FIXME collisions with other names possible
for (String str: stringToIntDict.keySet()) {
clauseOutput = clauseOutput.replace('$' + str + '$', String.valueOf(stringToIntDict.get(str)));
}
// defs and facts come come first
return defFactOutput + clauseOutput;
}
public String generateSmtForClause(AnalysisContract ac, ContractClause cc, boolean verifyOrFind) {
// prepare for a new iteration, clean the state
clearData();
// handle contract clause itself first (implicitly includes traversing unknown types and properties)
String clauseOutput = "";
if (verifyOrFind)
clauseOutput += generateSmtContractClauseVerify(cc);
else
clauseOutput += generateSmtContractClauseFind(cc);
// process input and output to collect info about components and
// properties
traverseInputOutput(ac);
// create definitions and facts
// also populate string2int dictionary as a side effect
String defFactOutput = psg.generateDefinitionsAndFacts(compToProp, ac, stringToIntDict);
// apply dictionary transform to clause output
// FIXME collisions with other names possible
for (String str: stringToIntDict.keySet()) {
clauseOutput = clauseOutput.replace('$' + str + '$', String.valueOf(stringToIntDict.get(str)));
}
// defs and facts come come first
return defFactOutput + clauseOutput;
}
public String generateSmtForClause(AnalysisContract ac, ContractClause cc, boolean verifyOrFind) {
// prepare for a new iteration, clean the state
clearData();
// handle contract clause itself first (implicitly includes traversing unknown types and properties)
String clauseOutput = "";
if (verifyOrFind)
clauseOutput += generateSmtContractClauseVerify(cc);
else
clauseOutput += generateSmtContractClauseFind(cc);
// process input and output to collect info about components and
// properties
traverseInputOutput(ac);
// create definitions and facts
// also populate string2int dictionary as a side effect
String defFactOutput = psg.generateDefinitionsAndFacts(compToProp, ac, stringToIntDict);
// apply dictionary transform to clause output
// FIXME collisions with other names possible
for (String str: stringToIntDict.keySet()) {
clauseOutput = clauseOutput.replace('$' + str + '$', String.valueOf(stringToIntDict.get(str)));
}
// defs and facts come come first
return defFactOutput + clauseOutput;
}