I can't find an answer for the following problem. The automaton accept strings like "A:5739." or "C::399\4342)", and these reminds me the path of the file system, but i am not sure about that.
Problem text:
Consider the following finite-state automaton written in Prolog. What seems to recognize?
Assume having the predicate
alphanumeric/1
which is true when its argument is a letter or digit.
Automaton:
accept([I | Is], S) :- delta(S, I, N), accept(Is, N). accept([], Q) :- final(Q). initial(start). final(type). delta(start, 'A', dev). delta(start, 'B', dev). delta(start, 'C', dev). ... delta(start, 'Z', dev). delta(dev, ':', n1). delta(n1, '\', dev). delta(n1, L, name) :- alphanumeric(L). delta(name, L, name) :- alphanumeric(L). delta(name, '\', name). delta(name, '.', type). delta(name, L, type) :- alphanumeric(L).