                                                                                                                                                                                                                                                                
Path: g2news1.google.com!news2.google.com!newsfeed.stanford.edu!news.kjsl.com!news-xfer.nntp.sonic.net!posts.news.sonic.net!nnrp0.nntp.sonic.net!not-for-mail
Message-ID: <465D6B6D.7090202@nowhere.net>
Date: Wed, 30 May 2007 05:17:49 -0700
From: student <no-s...@nowhere.net>
User-Agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.8.1.2) Gecko/20070221 SeaMonkey/1.1.1
MIME-Version: 1.0
Newsgroups: comp.lang.prolog
To: "A.L." <f...@2005.com>
Subject: Re: Business Rules in Prolog
References: <1178437917.247473.164730@h2g2000hsg.googlegroups.com> <464112e3$0$27172$742ec2ed@news.sonic.net> <6h8243tsv84u244sj5ucsvllvk91gusa6f@4ax.com> <464195cf$0$14125$742ec2ed@news.sonic.net> <4641a108$0$321$e4fe514c@news.xs4all.nl> <4644566b$0$14140$742ec2ed@news.sonic.net> <4644597c$0$338$e4fe514c@news.xs4all.nl> <464568ba$0$14107$742ec2ed@news.sonic.net> <cnbb4359crom48fmqoj74bu2ns0gce3vhp@4ax.com>
In-Reply-To: <cnbb4359crom48fmqoj74bu2ns0gce3vhp@4ax.com>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 64
Organization: Sonic.Net
NNTP-Posting-Date: 30 May 2007 12:14:57 GMT
NNTP-Posting-Host: cd3bef23.news.sonic.net
X-Trace: DXC=WNiQ\:<QbVO2=j=_j0aTIJm4K\QM1CV^@1OYf0H`?;XA@=2[Nn@\JbF]@4XNE]6[\H^]cS?D2K?FA
X-Complaints-To: abuse@sonic.net

A.L. wrote:
> On Sat, 12 May 2007 00:12:07 -0700, student <no-s...@nowhere.net>
> wrote:
> 
>>
>> "Theorem 1. Any program written in Actor Prolog without actors and
>> nonlogical built-in predicates can be effectively transformed (there is
>> a global syntactic transformation keeping the operational semantics)
>> into the program in pure Prolog (or into the formula of Horns subset of
>> the first order predicate logic).
>>               
> 
> So what? 
> 
> Most programs can be translated into "pure C" since C is used and
> target of cpmpilers that compile these languages.  Take Fortran77
> under Linux, for example, some version of Eiffel, and many other.
> Prolog can be also compiled to C.
> 
> A.L.

   (Sorry for the belated reply, A.L., I've been preoccupied with other 
matters and lost track of this thread.)

   The point I was hoping to make by citing Morozov's Theorem 1 in 
response to Jan's "That's a vague statement. Any program written in any 
language can be translated into any program in any Turing complete 
language" was not that plain ("pure") Actor Prolog can be *translated* 
into plain Prolog but that it can be *effectively transformed* into an 
equivalent program in plain Prolog *because there is a global syntactic 
transformation that preserves operational semantics*.

   I take this to mean that a correct and  complete Actor Prolog 
compiler that translates plain Actor Prolog into equivalent plain Prolog 
can actually be deduced (extracted) straight from the definition of 
Actor Prolog.

   Furthermore, I am guessing the reason that this is so is because, 
logically speaking, Actor Prolog is essentially a language in which one 
/defines/ Prolog programs -- so that, just as it is possible for a 
Prolog programmer to write Prolog and "see" C, it is possible for an 
Actor Prolog programmer to write Actor Prolog and "see" regular Prolog 
-- and the reason I think this is that I have a strong hunch that Actor 
Prolog actually does translate Actor Prolog into regular Prolog and that 
the definition of Actor Prolog is actually written in Actor Prolog,

   If that is true --  and I don't have the source code so I don't know 
for sure -- then it seems to me the various other advantages that Actor 
Prolog offers i.t.o. source code management should make it a very 
congenial environment for regular Prolog programmers to work with.

   At least that is the point I was hoping to make.

   I suppose it is possible to use a compiler-compiler language to 
define Pascal and thereby bootstrap your way to a Pascal compiler in 
Pascal, and while it is is just barely conceivable to me that you might 
be able to prove the correctness of the resulting compiler, that to me 
would still be a far cry from deducing one straight from the definition 
of Pascal via an inference engine -- unless, of course, you implemented 
your compiler-compiler language in Prolog,

-- billh

   Master language or language will master you.
