Esempio n. 1
0
        private static SymbolicString splitToSymbStr(List <string> alphabet, string start, string mid, string end)
        {
            VariableType          freshVar = VariableType.FreshVariable();
            List <SymbolicString> strings  = new List <SymbolicString>();

            if (!start.Equals(""))
            {
                strings.Add(SymbolicString.FromTextDescription(alphabet, start));
            }
            SymbolicString pumpedMid = SymbolicString.Repeat(SymbolicString.FromTextDescription(alphabet, mid), LinearIntegerExpression.Variable(freshVar.ToString()));

            strings.Add(pumpedMid);
            if (!end.Equals(""))
            {
                strings.Add(SymbolicString.FromTextDescription(alphabet, end));
            }

            SymbolicString matchingString = SymbolicString.Concat(strings);

            return(matchingString);
        }
 public static LinearIntegerExpression FreshVariable()
 {
     return(SingleTerm(1, VariableType.FreshVariable()));
 }