> Concatenative languages [1] have the property that every token sequence is a valid program.
I don't think this is correct? Concatenative languages have the property that if a and b are both valid programs, that the program a || b is valid (where || means "concatenate"). But that property doesn't imply that every sequence of tokens is valid.
So does Prolog count as a concatenative language given the standard definition of concatenative languages?
For context, a Prolog program is a set of definite clauses so the union of two Prolog programs is a Prolog program.
In fact, this property forms the basis of the concept of (syntactic) generality in Prolog: if P1, P2, P3 are three Prolog programs such that P1 is the union of P2 and P3, then we say that P1 generalises each of P2 and P3. Does this concept of generality also exist for concatenative languages?
I don't think this is correct? Concatenative languages have the property that if a and b are both valid programs, that the program a || b is valid (where || means "concatenate"). But that property doesn't imply that every sequence of tokens is valid.
For example, in Cat,
is not grammatically valid.