24 | 24 |
|
25 | 25 |
### Doesn't a Context-Sensitive Grammar (CSG) do what Fountain does?
|
26 | 26 |
|
27 | |
TBW
|
|
27 |
It's true that every CSL can be described with a CSG -- in fact,
|
|
28 |
the CSLs are defined as the languages accepted by CSGs. However, the
|
|
29 |
way that a CSG operates is very different from how Fountain operates.
|
|
30 |
|
|
31 |
By CSG I'm referring to "Type-2" in the Chomsky hierarchy. The grammars
|
|
32 |
in the Chomsky hierarchy are basically string-rewriting systems.
|
|
33 |
|
|
34 |
When context is involved in such a rewriting system, that context is
|
|
35 |
"shuttled around" from production to production during parsing, much
|
|
36 |
like how the head of a single-tape Turing machine must traverse
|
|
37 |
potentially large distances of the tape, to access data that is
|
|
38 |
relevant to what it's doing at some other location on the tape.
|
|
39 |
|
|
40 |
For a theoretical construct this is fine. For a practical parser
|
|
41 |
(or generator) though, all this shuttling makes it a really poor way
|
|
42 |
to parse (or generate) strings of a language.
|
|
43 |
|
|
44 |
Fountain, on the other hand, much like Attribute Grammars (AGs),
|
|
45 |
stores its context in an ancillary structure which is essentially
|
|
46 |
random-access and independent of the linear storage of the terminals
|
|
47 |
or nonterminals of the string being parsed or generated. This makes
|
|
48 |
it a much more efficient choice for dealing with context-sensitivity.
|
28 | 49 |
|
29 | 50 |
### Isn't Fountain really a programming language in disguise?
|
30 | 51 |
|
|
87 | 108 |
Then we'd need to weaken our complexity claim to something like "When generating
|
88 | 109 |
a string terminates, it uses only polynomial space".
|
89 | 110 |
|
90 | |
### How does Fountain ensure no Fountain program strays outside PSPACE?
|
|
111 |
### How does Fountain ensure no Fountain grammar strays outside PSPACE?
|
91 | 112 |
|
92 | 113 |
Preventing Fountain from expressing languages which are not
|
93 | 114 |
context-sensitive is still an open line of inquiry. Clearly we
|