public static string instantiateConstantDeclaration(string constantName, string constantType) { string template = SMTConstructsTemplateGenerator.generateConstantDeclarationTemplate(); string templateInstance = template.Replace("#constantName#", constantName); templateInstance = templateInstance.Replace("#type#", constantType); return(templateInstance); }
public static string instantiateQuantifier(string quantifier, string quantifiedVariables, string expression) { string quantifierTemplate = SMTConstructsTemplateGenerator.generateQuantifierTemplate(); return(quantifierTemplate.Replace("#quantifier#", quantifier) .Replace("#quantifiedVariables#", quantifiedVariables) .Replace("#expression#", expression)); }
public static string instantiateFunctionDeclaration(string functionName, string inputs, string output) { string template = SMTConstructsTemplateGenerator.generateFunctionDeclarationTemplate(); string templateInstance = template.Replace("#functionName#", functionName); templateInstance = templateInstance.Replace("#inputs#", inputs); templateInstance = templateInstance.Replace("#output#", output); return(templateInstance); }
public static string instantiateNaryOperator(string _operator, string[] expressions) { string nAryTemplate = SMTConstructsTemplateGenerator.generateNaryOperatorTemplate(); string expression = ""; foreach (string exp in expressions) { if (!string.IsNullOrWhiteSpace(exp)) { expression += exp + " "; } } return(nAryTemplate.Replace("#operator#", _operator) .Replace("#expression#", expression.Trim())); }
private static string instantiateUnboundedQuantifier(string quantifier, int timeIndex, string expression) { string quantifiedVariable = "time"; if (timeIndex > 0) { quantifiedVariable = "t" + timeIndex; } string template = SMTConstructsTemplateGenerator.generateQuantifierTemplate(); string templateInstance = template.Replace("#quantifier#", quantifier); templateInstance = templateInstance.Replace("#quantifiedVariable#", quantifiedVariable); templateInstance = templateInstance.Replace("#expression#", expression); return(templateInstance); }
public static string instantiateAssertion(string expression) { string template = SMTConstructsTemplateGenerator.generateNonLabeledAssertionTemplate(); return(template.Replace("#constraint#", expression)); }