Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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));
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        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()));
        }
Ejemplo n.º 5
0
        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);
        }
Ejemplo n.º 6
0
        public static string instantiateAssertion(string expression)
        {
            string template = SMTConstructsTemplateGenerator.generateNonLabeledAssertionTemplate();

            return(template.Replace("#constraint#", expression));
        }