Beispiel #1
0
        public static string NonRegularGetUnpumpableWord(ArithmeticLanguage language, SymbolicString unpumpableWord, int n)
        {
            Dictionary <VariableType, int> assignment = new Dictionary <VariableType, int>();

            assignment.Add(VariableType.Variable("n"), n);
            string         word = pumpedWord(unpumpableWord, assignment);
            SymbolicString ss   = SymbolicString.FromTextDescription(language.alphabet.ToList(), word);

            while (!ProofChecker.checkContainment(ss, language, LogicalExpression.True()))
            {
                assignment[VariableType.Variable("n")]++;
                word = pumpedWord(unpumpableWord, assignment);
                ss   = SymbolicString.FromTextDescription(language.alphabet.ToList(), word);
            }
            return(word);
        }
 public static LinearIntegerExpression Variable(string name)
 {
     return(SingleTerm(1, VariableType.Variable(name)));
 }