git @ Cat's Eye Technologies Fountain / b627476
Write section about "Doesn't a CSG do what Fountain does?" Chris Pressey 2 years ago
2 changed file(s) with 24 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
5959 * Isn't Fountain really a programming language in disguise?
6060 * What complexity class does Fountain aim to capture?
6161 * Is generating a string that is a member of a CSL also in PSPACE?
62 * How does Fountain ensure no Fountain program strays outside PSPACE?
62 * How does Fountain ensure no Fountain grammar strays outside PSPACE?
6363 * What if we restrict Fountain to well-founded recursion?
6464 * What if we forbid recursion entirely?
6565
2424
2525 ### Doesn't a Context-Sensitive Grammar (CSG) do what Fountain does?
2626
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.
2849
2950 ### Isn't Fountain really a programming language in disguise?
3051
87108 Then we'd need to weaken our complexity claim to something like "When generating
88109 a string terminates, it uses only polynomial space".
89110
90 ### How does Fountain ensure no Fountain program strays outside PSPACE?
111 ### How does Fountain ensure no Fountain grammar strays outside PSPACE?
91112
92113 Preventing Fountain from expressing languages which are not
93114 context-sensitive is still an open line of inquiry. Clearly we