Re: Free word order

From: Aslan Kral (aslanski2002_at_yahoo.com)
Date: 01/24/05


Date: Mon, 24 Jan 2005 14:18:37 +0200


"Bart Mathias" <mathias@hawaii.edu>, haber iletisinde sunlari
yazdi:04_Id.18079$IP6.13825@trnddc05...
> Wiktor S. wrote:
> >>> [...]
> >> That dash has hardly any hair on it at all!
>
> (Of course I meant that it is some of the baldestdash I've ever seen.)
>
> >> Japanese is one of a minority (but as I recall, the largest minority)
> >> of languages that are spoken frontwards.
> >
> >
> > Can you define front- and backwardness of language?
>
> If that's directed at me, yes, easy:
>
> Frontwardness of language: Going S O V.
>
> Backwardness of language: Going V O S.
>
> And a bonus. All-mixed-upness of language: Going S V O.
>
> Bart Mathias

I agree that SVO is a bit mixed-up for me as a native speaker of a SOV
language.

I would like to give some examples to clarify what I am saying and to show
that SOV fits better (at least for my examples).

Example-1: How a function call is translated to machine language by a
compiler.

The following C language statement,
x = func(arg1, arg2);

becomes more or less like the following,

push arg2
push arg1
call func (arg1 and arg2 are popped by func)
move x, result

If we call the V as function (functor) and the others (S,0) as arguments,
the translated code is very natural for a SOV-speaker.
In a SOV language by analogy, the arguments (S,0) are pushed to the stack
first and
when the V comes the action is performed.

OK I will try to support it with some more examples.

Example-2: Take the following C language statement.
x = 1 + 2 + 3;
Hmm, let's see what the compiler does to parse it.
First an x, seems like a variable but what to do with it? no idea so push it
to stack
= shows that x will be assigned a value but what is it? we don't know yet so
push it to stack
then comes 1 but is it the value to be assigned? no idea so push it to stack
then comes + a binary operator, so there going to be addition first before
the assignment but we must wait so push it stack
then comes 2, ok there is an add operation pending so perform it and push
back the result to the stack
then come + so another addition will take place but we must wait for the
other operand, so push it to stack
then comes 3, ok there is an add operation pending so perform it and push
back the result to the stack
then comes ; to signal that the assignment can be done.

Somewhat messy. It is because the compiler writer was speaking a SVO
language and he designed it his natural way.

Here is what it would look like if I were to design it as a SOV speaker (the
way more natural for me):

1 2 + 3 + x =
OK it may seem strange for a SVO-speaker, but if I, as a SOV-speaker, were
to put it into words I would follow the above sequence.
Let's see what the compiler would do in this case:
1 push it to stack
2 push it stack
then comes +, no need to push it to stack, it is a binary operator, the
operands must have already been pushed onto the stack,
   so just pop 2 operands off the stack and perform an add operation then
push the result back to the stack.
then comes 3 push it to stack
then comes +, no need to push it to stack, just pop 2 operands off the stack
and perform an add, then push back the result,
then comes x, push it to stack
and finally = which shows an assignment, no need to push it to stack, just
perform the action (assign the result of additions to x).

The SOV design doesn't need to push the operators to stack and doesn't need
a terminator for the statement.

Let's also add a divide in the above example.

x = 1 + 2 + 3 / 4; ( that is 1 2 + 3 4 / + x = )
x = (1 + 2 + 3) / 4; (that is 1 2 + 3 + 4 / x = ) (doesn't need parenthesis)

As can be seen, SOV approach works better in the above examples.



Relevant Pages

  • Re: Is it wise to push all-in early in a tournament?
    ... The best times to make a push play ... But why call when you can push and take down a nice pot when your opponent ... But remember that if this "big bet" is a significant portion of your stack, ... I consider it my goal in any tournament to do the latter as much as ...
    (rec.gambling.poker)
  • Re: Virtual machine: Calling a separate script
    ... assembly language, using the same kind of naive stack-based discipline ... > push 1, addi ... Let 'foo x y z' be a shorthand ... which wouldn't do anything to the stack. ...
    (comp.programming)
  • Re: Is it wise to push all-in early in a tournament?
    ... whether or not the rest of the table is splashing chips around. ... I may push more than I want to and you may be more conservative than ... Do I want to play this opponent after the flop? ... push at anytime and I may not want to risk my stack on a suckout when I ...
    (rec.gambling.poker)
  • Virtual machine: assembly instructions
    ... push; Push the address of the first variable onto the stack ... itof: convert integer to float ... If top+1 of int stack is less than top; push true else push false ...
    (comp.programming)
  • Re: Building Unification Table - tranforming prolog like notation into lisp notation
    ... |> problem comes from tranlating prolog notation into lisp notation. ... ;; Here is a quickly done stack based solution for the problem Slobodan ... (defstruct composite-term str indices) ... (push (cons (composite-term-str item) ...
    (comp.lang.lisp)

Quantcast