And I still have another solution : make your program write the strings of VAR_1,VAR_2,VAR_3,...,VAR_N with the other codes into a file , then consult that file, and then we have the variables named VAR_1,VAR_2,...,VAR_N. ( Ha! Ha! I am so proud of my idea of this one . Like a fool (or make a fool) , but works!
Then I consider a situation , where there is no need to make a file , if we can make the program write codes into the toplevel of the GNU prolog's interpreter/compiler. If we can do this , then the following can be keyed-in automatically on GNU prolog's interpreter/compiler.
But is it possible for GNU prolog to do such things ? I know forth can do that well , because I had played with a forth interactive tutorial before (although I can't recall the name of that tutorial file). Can GNU prolog do that ? or GNU prolog still get some thing can't be done although somebody call it a turing machine !!
> Let me expalin the story where I encounter this problem.
[snipped]
> Then I consider a situation , where there is no need to make a file , > if we can make the program write codes into the toplevel of the GNU > prolog's interpreter/compiler. If we can do this , then the following > can be keyed-in automatically on GNU prolog's interpreter/compiler.
Once you ask [user]. you mean you want a _person_ or something that simulates that, to key in.
So why you want to go to the user mode if you can do that with call, assert[az]?
[cluelless comments snipped]
You'll probably would find the better way to do in [GNU] Prolog what you want when you explain the problem of yours and not a funny way that can be done in another language...
And please do not cross post irrelevant questions to other NGs. If you want to know how to do that in Forth, do not bash other Prolog implementations in other NG that don't have to do with Prolog.
Cesar Rabak wrote: > Once you ask [user]. you mean you want a _person_ or something that > simulates that, to key in. > So why you want to go to the user mode if you can do that with call, > assert[az]?
Because I want to find the way of autoprogramming. As you above mentioned, I really want a program that simulates a _person_ to key in , but how can that be done in GNU prolog ?
> You'll probably would find the better way to do in [GNU] Prolog what you > want when you explain the problem of yours and not a funny way that can > be done in another language...
Oh ? In other words , that really can't be done by the SO-CALLED turing machine GNU prolog ?
> And please do not cross post irrelevant questions to other NGs. If you > want to know how to do that in Forth, do not bash other Prolog > implementations in other NG that don't have to do with Prolog.
Some problems don't have a clear cut of boardline between knowledage fields. If this problem of mine can't be solved by the wisdom of prologer only , why not check the opinions from the fother ?
>>Once you ask [user]. you mean you want a _person_ or something that >>simulates that, to key in. >>So why you want to go to the user mode if you can do that with call, >>assert[az]?
> Because I want to find the way of autoprogramming. As you above > mentioned,
Please define "autoprogramming".
> I really want a program that simulates a _person_ to key in , but how > can that > be done in GNU prolog ?
For what purpose? If you want a program that simulates another person in the other end like the famous "Turing Test", look for dozens of implementations in Net.
>>You'll probably would find the better way to do in [GNU] Prolog what you >>want when you explain the problem of yours and not a funny way that can >>be done in another language...
> Oh ? In other words , that really can't be done by the SO-CALLED turing > machine > GNU prolog ?
You obviously don't have a clue on what your writing, isn't it?
GNU Prolog is, as BTW most computer languages, "Turing Complete" that means that it fulfills the requirements of a mathematical formulation called "Turing Machine" which is the most elementary computer can be conceived.
For a deep and thorough treatment on this look at a good abstract algebra or computer science introductory text.
The bottom line of a computer language being "Turing Complete" it that it is theorically possible to write itself in its own language.
Aspect, which has been brought by youserlf to this NG when asking if a Prolog compiler can be written in Prolog.
>>And please do not cross post irrelevant questions to other NGs. If you >>want to know how to do that in Forth, do not bash other Prolog >>implementations in other NG that don't have to do with Prolog.
> Some problems don't have a clear cut of boardline between knowledage > fields.
We are not talking about any 'bordeline knowledge fields' here, we're on your little training in Prolog language and the using of childish discourse like the phrase below:
> If this problem of mine can't be solved by the wisdom of prologer only > why not check the opinions from the fother ?
If the problem of yours cannot be solved by you, this is your business, and you can look for help where you want. But crossposting and asking for help by belitling Prolog with mentions to other languages and crossposting to other groups is not the attitude of a person that's willing help or find a solution.
You already did it before with Lisp, now _again_ you insist in doing it with Forth (which BTW in my earlier repply I had taken out the cross posting and you insist in putting it back, perhaps in addition of being imature you're stubborn too).
Stop with these silly riddles and read question 5 (and its answer) of the FAQ for c.l.p.
So if you want to find a solution for your problem in Prolog, state clearly what it is your problem at the domain you're trying to solve.
Cesar Rabak wrote: > For what purpose? If you want a program that simulates another person in
For autoprogramming. In other words , making the prolog intepreter/compiler write programs by itself . This will be helpful if the computer is far away from any human beings . Eg , in the moon or in the mars or planet of other stars.
> the other end like the famous "Turing Test", look for dozens of > implementations in Net.
You say DOZENS ? Then it must be easy for you to point out one certain implementation that can solve my problem . If you show me , I will check it. Or in fact you don't know that , although you say (pretend ?) you know.
> >>You'll probably would find the better way to do in [GNU] Prolog what you > >>want when you explain the problem of yours and not a funny way that can > >>be done in another language...
> > Oh ? In other words , that really can't be done by the SO-CALLED turing > > machine > > GNU prolog ?
> You obviously don't have a clue on what your writing, isn't it?
No clue ? Yes , I have clues , and my clues are your words. You say find the better , it means find another . Another is OK but this one is just never OK . Ha! Ha! Ha!
> The bottom line of a computer language being "Turing Complete" it that > it is theorically possible to write itself in its own language.
> Aspect, which has been brought by youserlf to this NG when asking if a > Prolog compiler can be written in Prolog.
And what's the answer ?
> We are not talking about any 'bordeline knowledge fields' here, we're on > your little training in Prolog language and the using of childish
This is not a training. What I ask is a deep and foundamental question. I am explorating the limitation of GNU prolog . Do you know the limitation of GNU prolog ? Is my question beyond GNU prolog ?
> discourse like the phrase below:
> If the problem of yours cannot be solved by you, this is your business, > and you can look for help where you want. But crossposting and asking > for help by belitling Prolog with mentions to other languages and > crossposting to other groups is not the attitude of a person that's > willing help or find a solution.
Belittling Prolog ? Not at all. I know that prolog is a powerful tool because I am working with that for 15 years . No mentions to other languages ? Why not ? Comparison makes things clear , especially for the possible weakness. I took Forth as an example because I just wanted to show that what I asked was not a mission impossible. If people can write forth codes that handles the interpreter/compiler , can this also be done in prolog ? Of course , this might be a difficult question for most of the prologer to answer, because this is beyond our (yes , I say our , because I am included) daily work. But this was already done in forth , thus I think forth people get the key idea of doing this . If they are willing to share with us , it is very helpful.
> So if you want to find a solution for your problem in Prolog, state > clearly what it is your problem at the domain you're trying to solve.
> Cesar Rabak wrote: > > For what purpose? If you want a program that simulates another person in
> For autoprogramming. In other words , making the prolog > intepreter/compiler > write programs by itself . This will be helpful if the computer is far > away from > any human beings . Eg , in the moon or in the mars or planet of other > stars.
A prolog compiler, often written in prolog, is already an "autocoder", it tries to discern the meaning of the source and write a semantically equivalent program in a, usually simpler, programming notation. In this sense it writes "programs by itself."
A prolog program, written by you for example, could take some meta-data (a higher order programming notation perhaps) and perform a compilation - write a semantically equivalent prolog program.
But your question as given makes as much sense as asking a computer to understand prolog. Without a programmer to code such an understanding for the poor machine it won't happen.
> > the other end like the famous "Turing Test", look for dozens of > > implementations in Net.
> You say DOZENS ? Then it must be easy for you to point out one certain > implementation that can solve my problem . If you show me , I will > check it. > Or in fact you don't know that , although you say (pretend ?) you know.
> Belittling Prolog ? Not at all. I know that prolog is a powerful tool > because > I am working with that for 15 years .
Hum, 15 yrs.
> No mentions to other languages ? Why not ? Comparison makes things > clear , especially for the possible weakness. > I took Forth as an example because I just wanted to show that what I > asked > was not a mission impossible. If people can write forth codes that > handles > the interpreter/compiler , can this also be done in prolog ? > Of course , this might be a difficult question for most of the prologer > to answer, > because this is beyond our (yes , I say our , because I am included) > daily > work. But this was already done in forth , thus I think forth people > get the key > idea of doing this . If they are willing to share with us , it is very > helpful.
I doubt the issue is "mentions to other languages". One will find references to ML in the Scheme group and people have no issue. The "tone" of a statement has a great deal to do with getting a fair hearing.
wee...@nomail.com wrote: > A prolog compiler, often written in prolog, is already an "autocoder", > it tries to discern the meaning of the source and write a semantically > equivalent program in a, usually simpler, programming notation. In this > sense it writes "programs by itself."
> A prolog program, written by you for example, could take some meta-data > (a higher order programming notation perhaps) and perform a compilation > - write a semantically equivalent prolog program.
> But your question as given makes as much sense as asking a computer to > understand prolog. Without a programmer to code such an understanding > for the poor machine it won't happen.
Whatever you say above is right and I totally agree. But it doesn't answer my question until the following simplified question is answered . Is there any way to make the toplevel of prolog (eg GNU or SWI's) to key in the following lines ? [user]. test:-write('Hello world'). (ctrl-d)
Of course , the last line's (ctrl-d) is keyed as a person presses the keys of "ctrl" and "d" together .
>>A prolog compiler, often written in prolog, is already an "autocoder", >>it tries to discern the meaning of the source and write a semantically >>equivalent program in a, usually simpler, programming notation. In this >>sense it writes "programs by itself."
>>A prolog program, written by you for example, could take some meta-data >>(a higher order programming notation perhaps) and perform a compilation >>- write a semantically equivalent prolog program.
>>But your question as given makes as much sense as asking a computer to >>understand prolog. Without a programmer to code such an understanding >>for the poor machine it won't happen.
> Whatever you say above is right and I totally agree. > But it doesn't answer my question until the following simplified > question > is answered . > Is there any way to make the toplevel of prolog (eg GNU or SWI's) > to key in the following lines ? > [user]. > test:-write('Hello world'). > (ctrl-d)
> Of course , the last line's (ctrl-d) is keyed as a person presses the > keys of "ctrl" and "d" together .
newser....@bbs.ee.ncu.edu.tw wrote: > But it doesn't answer my question until the following simplified > question > is answered . > Is there any way to make the toplevel of prolog (eg GNU or SWI's) > to key in the following lines ? > [user]. > test:-write('Hello world'). > (ctrl-d)
The answer is no. You will probably conclude from this that (GNU-SWI)Prolog is not a Turing machine. And your is correct (*): no Prolog implementation is a Turing machine.
(*) although you didn't need the answer no for that to your question: even if the answer were yes, the conclusion holds.
OTOH, it is damn easy to make a program+query that when executed shows on the screen all the chars you want. But it will not be the toplevel that keys in those lines, the main reason being that the toplevel has no fingers to key with.
If you want to learn about toplevel: find the appropriate file in GNU, SWI, XSB, Yap ... and read it. Then come back and ask a sensible question.
Oh, just so that you don't conclude the wrong thing ...
Prolog is Turing complete
That's a truth that's undependent of the answer to your question.
If you don't know what the difference is between a Turing machine and Turing complete, check any of the numerous books, eh, since you will of course challenge me to find you one (since you are too lazy to find one yourself), try Sipser or Linz. Or find it on the net in wikipedia. Try the newsgroup comp.theory. If you don't understand something, try to state clearly what you don't grok and ask gently: people here will help you (you need help badly !) but not as things are going now.
BTW, here is a tip: omit the assertz in your programs; they show a bad attitude towards Prolog programming, they distract from the essence, and they are absolutely unnecessary for your exposee.
You are right. I should have kept being a gentleman when asking questions. I don't think it's important to say who and how the bad manners started, although the whole things were clearly recorded in google's newsgroup service. The real important thing is that I won't say any words more than "BE A
GENTLEMAN" if somebody still keeps on defecating via his mouth during open discussions.
I believe that the prolog language is equivalent to Turing machine . And the PC with prolog is never equal to Turing machine for the limitation of it's resource, eg memory size is not infinity . This is why recently I transfer from Turbo Prolog to GNU prolog and SWI prolog. And this is why I care so much that the recursive depth seems much less in GNU prolog than in SWI prolog. Because the more resource the prolog implement can control, the further it approaches to Turing machine .
I had seen a forth example to my question before, but what I get now is
only vague impression , too vague to give a comprehensive description. The following is mainly my guessing , and if wrong or impractical , please you forthers and/or prologers tell me.
The toplevels of forth language get an inward buffer , which collect the chars keyed-in and automatically send these chars to parser , compiler , and executer. If we know the address of this inward buffer , we can direct our codes to write data to this buffer , and the downstream works , eg parsing , compiling and executing , will be done automatically as those for the keyed-in data.
This job can be easily done in forth language , because the toplevel of forth is written in forth . Thus the address of the inward buffer can be easily got by the name of that address in forth (eg >IN or something like that , this part needs the forther's corrections).
If prolog's toplevel is written in prolog , then things will be as easy. Eg , if the inward buffer is in the following structure ,db_buffer(Queue_head,Queue_tail, Que_arrary_list), our codes can easily write data to the inward buffer . To gain a full control of the language is also one reason why I care whether the prolog is written in prolog.
As to the assertz used in my codes that makes Turbo prologer's life happier, it is only for gaining more flexibility. Having seen the incremental programming style in forth and lisp , I believe this style is a better way of coding. With assertz , I can add new functions to the toplevel conveniently and don't have to write a file than consult it , that's indeed complicating. I can also use retract to revise only the wrong part of my codes. If I use [user] , the whole codes for a specific predicate have to be written again.
> Oh ? In other words , that really can't be done by the SO-CALLED turing > machine > GNU prolog ?
...
Grow up. A Turing machine (with an infinitely long tape, and an infinite amount of time) can calculate anything that can be calculated. That doesn't mean it can doe anything that can be done. Perhaps you imagine a Turing machine with fingers?
Before you insult too many people with your half-knowledge, learn some more.
Jerry -- Engineering is the art of making what you want from things you can get. ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
Jerry Avins wrote: > newser....@bbs.ee.ncu.edu.tw wrote: > Grow up. A Turing machine (with an infinitely long tape, and an infinite > amount of time) can calculate anything that can be calculated. That > doesn't mean it can doe anything that can be done. Perhaps you imagine a > Turing machine with fingers?
Since you have mentioned that "turing machine" doesn't mean it can do anything that can be done. May I ask , for all turing equivalent languages , which one is the most powerful ? C ? C++? Assembler ? And which one is the weakest ? Prolog ?
You don't have to answer the last questions , because not important . The real question is how to get full control of prolog . Just answer that .
newser....@bbs.ee.ncu.edu.tw wrote: > Jerry Avins wrote:
>>newser....@bbs.ee.ncu.edu.tw wrote: >>Grow up. A Turing machine (with an infinitely long tape, and an infinite >>amount of time) can calculate anything that can be calculated. That >>doesn't mean it can doe anything that can be done. Perhaps you imagine a >>Turing machine with fingers?
> Since you have mentioned that "turing machine" doesn't mean it can do > anything that can be done. May I ask , for all turing equivalent > languages , which one is the most powerful ? C ? C++? Assembler ? And > which one is the weakest ? Prolog ?
All Turing-complete languages are equally powerful. The more interesting question is which language is most appropriate for a particular task. The answer depends on the task, of course, and on how one interprets "appropriate".
> You don't have to answer the last questions , because not important . > The real question is how to get full control of prolog . Just answer > that .
I don't know what "full control" means to you, so I can't answer that.
Forth has the advantage (for me) of my being able to lift the cover and manipulate the inner workings, or at least being (usually) able to understand the answers I get when I question experts.
> Thank you .
You're most welcome.
Jerry -- Engineering is the art of making what you want from things you can get. ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
Jerry Avins wrote: > All Turing-complete languages are equally powerful. The more interesting > question is which language is most appropriate for a particular task. > The answer depends on the task, of course, and on how one interprets > "appropriate".
> I don't know what "full control" means to you, so I can't answer that.
Then what do you think prolog can't control ? What do you think can't be controlled by prolog , although can be controlled by other language , such as forth , lisp ? Since all Turing-complete languages are equally powerful , how can prolog do the same things as other languages do ? Eg writtien in self language, getting the name of everything (eg atoms , variables, procedures , etc) and changing them freely , Creating thousands of things at the same time with the names defined by rules , getting the address of everything , machanically key-in codes on the toplevel and have thoses codes behave their functions , and so many on .
"Full" control might be too wide to answer , thus just answer the above
> Then what do you think prolog can't control ? > What do you think can't be controlled by prolog , although can be > controlled by other language , such as forth , lisp ? > Since all Turing-complete languages are equally powerful , > how can prolog do the same things as other languages do ? > Eg writtien in self language, getting the name of everything (eg atoms > , > variables, procedures , etc) and changing them freely , Creating > thousands of things at the same time with the names defined by rules , > getting the address of everything , machanically key-in codes on the > toplevel and have thoses codes behave their functions , and so many on > .
[...]
Turing-completeness is an abstract statement, meaning that a language can compute all computable functions (unless Church's hypothesis is wrong). It does *not* mean that language X can do everything that language Y does with equal ease. If you're so desperate to tinker with the innards of your program on the fly, and you know how to do it in Forth, then by all means use Forth. Or write a Forth Virtual Machine in Prolog and see how Prolog can do everything Forth can do (within the bounds of that virtual machine). Look up "Turing-completeness" on the Wikipedia if reading a book on automata theory (e.g. Hopcroft & Ullman) is too time consuming. (Did you ever attend CS101? Or, come to think of it, any formal Prolog course?)
newser....@bbs.ee.ncu.edu.tw wrote: > Jerry Avins wrote:
>>All Turing-complete languages are equally powerful. The more interesting >>question is which language is most appropriate for a particular task. >>The answer depends on the task, of course, and on how one interprets >>"appropriate".
>>I don't know what "full control" means to you, so I can't answer that.
> Then what do you think prolog can't control ?
Prolog, implemented on my home computer, can't control my kitchen range. If I were to build mechanisms to turn the knobs and report temperatures, and if those mechanisms had suitable computer interfaces, then a program written in Prolog or any other language could control/read them and so indirectly control the cook range. To stay in the kitchen, a program can't open the refrigerator or sharpen the knives without appropriate hardware.
> What do you think can't be controlled by prolog , although can be > controlled by other language , such as forth , lisp ?
Since all of those languages are Turing complete, and each of them can in fact be implemented in all of them, there is no task that one can accomplish that another can't. Not all tasks can be performed by all of them with equal ease.
> Since all Turing-complete languages are equally powerful , > how can prolog do the same things as other languages do ?
How can it not?
> Eg writtien in self language, getting the name of everything (eg atoms, > variables, procedures , etc) and changing them freely , Creating > thousands of things at the same time with the names defined by rules , > getting the address of everything , machanically key-in codes on the > toplevel and have thoses codes behave their functions , and so many on.
You lump together many concepts that need to be separate. All those languages can create a number of objects limited only by memory. The code to do that may be more succinct in one language than in another, but that does not affect how potent the language is. No language can mechanically key in anything; that's not what languages do. Interesting languages are sufficiently potent to write themselves in. (That's part of what makes them interesting.)
> "Full" control might be too wide to answer , thus just answer the above > examples , please .
Maybe you can just explain what "control" means to you.
> Thanks!
Welcome!
Jerry -- Engineering is the art of making what you want from things you can get. ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
> Then what do you think prolog can't control ? > What do you think can't be controlled by prolog , although can be > controlled by other language , such as forth , lisp ?
Dear Sir, Prolog cannot control the input buffer of a Lisp implementation.
Dear Sir, Do you understand how silly this statement is ? Please comment on it. Please show some understanding of what you want to make c.l.p. say.
Dear Sir, the Prolog toplevel input buffer is not accessible to a user Prolog program. It is available to the (usually C-)program implementing Prolog. Do you think that reflects badly in some way on C ? Or Prolog ?
Your opinions are highly appreciated by c.l.p., even more so if they are backed up by knowledge, preciseness and politeness.
Bart Demoen wrote: > newser....@bbs.ee.ncu.edu.tw wrote: > Dear Sir, Prolog cannot control the input buffer of a Lisp > implementation.
How about a prolog implement ?
> Dear Sir, Do you understand how silly this statement is ? > Please comment on it.
BE A GENTLEMAN
> Please show some understanding of what you want to make c.l.p. say.
> Dear Sir, the Prolog toplevel input buffer is not accessible to a user > Prolog program. It is available to the (usually C-)program implementing > Prolog. Do you think that reflects badly in some way on C ? Or Prolog ?
So , you agree it is available if prolog is implemented inprolog ?
> Your opinions are highly appreciated by c.l.p., even more so if they are > backed up by knowledge, preciseness and politeness.
Thorsten Winterer wrote: > Turing-completeness is an abstract statement, meaning that a language > can compute all computable functions (unless Church's hypothesis is > wrong). It does *not* mean that language X can do everything that > language Y does with equal ease.
I agree that without arguing.
>If you're so desperate to tinker with > the innards of your program on the fly, and you know how to do it in > Forth, then by all means use Forth. Or write a Forth Virtual Machine in > Prolog and see how Prolog can do everything Forth can do (within the > bounds of that virtual machine).
Do you really think that after I write a Forth VM , my program can write codes to a prolog toplevel and then makes the codes take function automatically ? Think before you answer !!
>Look up "Turing-completeness" on the > Wikipedia if reading a book on automata theory (e.g. Hopcroft & Ullman) > is too time consuming.
And then prolog program can write codes on its toplevel and have the codes take their function automatically ?
Jerry Avins wrote: > Prolog, implemented on my home computer, can't control my kitchen range. > If I were to build mechanisms to turn the knobs and report temperatures, > and if those mechanisms had suitable computer interfaces, then a program > written in Prolog or any other language could control/read them and so > indirectly control the cook range. To stay in the kitchen, a program > can't open the refrigerator or sharpen the knives without appropriate > hardware.
Totally agree.
> Since all of those languages are Turing complete, and each of them can > in fact be implemented in all of them, there is no task that one can > accomplish that another can't. Not all tasks can be performed by all of > them with equal ease.
Totally agree.
> > Since all Turing-complete languages are equally powerful , > > how can prolog do the same things as other languages do ?
> How can it not?
There is misunderstanding between us . Let me make it clear. You say all Turing-complete languages are equally powerful and can do the same things . I believe you and I believe that you know how , otherwise how can you say that ? So I ask you how prolog does the same things as other languages do , and since you already know how , you get the answer. Or is it my false belief that you are telling the truth ?
> > Prolog, implemented on my home computer, can't control my kitchen range. > > If I were to build mechanisms to turn the knobs and report temperatures, > > and if those mechanisms had suitable computer interfaces, then a program > > written in Prolog or any other language could control/read them and so > > indirectly control the cook range. To stay in the kitchen, a program > > can't open the refrigerator or sharpen the knives without appropriate > > hardware.
> Totally agree.
> > Since all of those languages are Turing complete, and each of them can > > in fact be implemented in all of them, there is no task that one can > > accomplish that another can't. Not all tasks can be performed by all of > > them with equal ease.
> Totally agree.
> > > Since all Turing-complete languages are equally powerful , > > > how can prolog do the same things as other languages do ?
> > How can it not?
> There is misunderstanding between us . Let me make it clear. > You say all Turing-complete languages are equally powerful and > can do the same things . I believe you and I believe that you > know how , otherwise how can you say that ? So I ask you how > prolog does the same things as other languages do , and since you > already know how , you get the answer. Or is it my false belief > that you are telling the truth ?
> Thank you very much .
I feel that you are both playing word games - using the same words to meen different things.
Turing machines and completeness are mathematical objects and properties. As such they don't necessarily mean the same things as in the computing world. In particular a program, in the Turing sense, is something that takes input data, computes via some process and output some data - there is nothing else in the program's world. If the computation process interacts with anything else then that is part of the data. There is no external interaction or recursiveness - the output data can not chnage the input - if it were to then the mechanism for that must be considered part of the process. So, say that two language systems are Turing complete is fine until you start manipulating the implementation from within. In particular the two language systems are no longer equivalent.
newser....@bbs.ee.ncu.edu.tw wrote: > So , you agree it is available if prolog is implemented inprolog ?
To implement Prolog in Prolog with the meaning you seem to give it, would require an extension of the concept of what exactly is the Prolog language.
Saving on multi-replies now ...
It is very unproductive to attach much value to a thing like "being able to write to your own toplevel etc" (not verbatim). The important thing is that one can write a Prolog program which when consulted and executed (by launching a particular goal) mimicks any behaviour one can program in any other Turing complete language with IO. Your style of presenting programs by showing the assertz is of the same irrelevant grandeur: really, programs are not happy to be typed in at the toplevel after a [user] or by being assertz-ed in queries. And most readers of this newsgroup aren't either.
newser....@bbs.ee.ncu.edu.tw wrote: > Jerry Avins wrote:
>>Prolog, implemented on my home computer, can't control my kitchen range. >>If I were to build mechanisms to turn the knobs and report temperatures, >>and if those mechanisms had suitable computer interfaces, then a program >>written in Prolog or any other language could control/read them and so >>indirectly control the cook range. To stay in the kitchen, a program >>can't open the refrigerator or sharpen the knives without appropriate >>hardware.
> Totally agree.
>>Since all of those languages are Turing complete, and each of them can >>in fact be implemented in all of them, there is no task that one can >>accomplish that another can't. Not all tasks can be performed by all of >>them with equal ease.
> Totally agree.
>>>Since all Turing-complete languages are equally powerful , >>>how can prolog do the same things as other languages do ?
>>How can it not?
> There is misunderstanding between us . Let me make it clear. > You say all Turing-complete languages are equally powerful and > can do the same things . I believe you and I believe that you > know how , otherwise how can you say that ? So I ask you how > prolog does the same things as other languages do , and since you > already know how , you get the answer. Or is it my false belief > that you are telling the truth ?
> Thank you very much .
It really isn't a difficult concept. If a program to compute a particular result using particular input can be written in Prolog, than a program to compute that result using the same input with most other languages, including all of the ones we've mentioned so far. What do you mean by "how can this be done?" It is done by writing a valid program.
I wish I knew what you assume that gets in the way of your understanding this. I attribute to language difficulty your seeming belief that I might be lying to you, but it's hard to keep that frame of mind.
Jerry -- Engineering is the art of making what you want from things you can get. ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ