HDTenEightyP/NetNews huggingface dataset:
From: fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON)
Subject: Re: Efficiency and 'good' Prolog (was: Help !!)
Organization: Computer Science, University of Melbourne, Australia
Date: Thu, 28 Jan 1993 03:24:39 GMT

wunderwa@informatik.tu-muenchen.de (Jens Wunderwa) writes:

>I have edited both max-versions for better comparability:
>
>max_heiner( [Max], Max ) :- !.
>max_heiner( [MaxSoFar, First |Rest], Max ) :-
>	MaxSoFar > First, !, 
>	max_heiner( [MaxSoFar |Rest], Max ).
>max_heiner( [_|Rest], Max ) :-
>	max_heiner( Rest, Max ).
>
>
>max_hamer( [First |Rest], Max ) :-
>	max_hamer( First, Rest, Max ).
>
>max_hamer( Max, [], Max ) :- !.
>max_hamer( MaxSoFar, [First |Rest], Max ) :-
>	MaxSoFar > First, !, 
>	max_hamer( MaxSoFar, Rest, Max ).
>max_hamer( _, [First |Rest], Max ) :-
>	max_hamer( First, Rest, Max ).

>uses a temporary variable for the greatest element seen so far 
>whereas Heiner uses the first element of the input list for that 
>purpose. 
>
>I think it's bad style to misuse the input for constructing
>the result instead of applying the standard accumulator pair technique.
>
>Heiner's solution needs heap space for storing the intermediate 
>result making it 30 % slower.

Hamer's first post has expired here, but didn't it use one '->'
instead of two cuts? Using arrow is much better style than using cuts,
which are never justified for deterministic code like this. It is much
more readable, and can also be more efficient. I think that this is a more
important stylistic issue than the use of an accumulator.

It's also not good style to use the same functor name for max_hamer/2 and
max_hamer/3. I would much rather name the latter max_hamer_2/3, which gives
the compiler a better chance of catching errors if I accidentally use the
wrong number of arguments somewhere.

-- 
Fergus Henderson             fjh@munta.cs.mu.OZ.AU      
This .signature virus is a self-referential statement that is true - but 
you will only be able to consistently believe it if you copy it to your own
.signature file!
From: marten@ilt.fhg.de (Lutz Marten)
Newsgroups: comp.lang.prolog
Subject: Looking for IBM PC Prolog versions
Date: 21 Jan 1993 16:30:52 GMT
Organization: FhG-ILT
Distribution: world
Reply-To: marten@ilt.fhg.de
NNTP-Posting-Host: 192.44.11.6
Keywords: PC


Hello,
a friend of mine is looking for a prolog version on an IBM compatible PC,
MS-DOS and/or Windows. Are there any PD versions for 286-PCs which are 
comfortable to use. If not PD, how much are the products and who is the 
manufacturer ? 
Sorry for posting this FAQ, but I'm normally not paticipating this group.
If possible please reply by mail and don't create a follow-up.
ThanX !
-Lutz
--
# Lutz Marten,  Postmaster and general dogsbody 
# Fraunhofer-Gesellschaft Institut fuer Lasertechnik 
# BITNET: KQ040MA@DACTH11 , InterNet: marten@ilt.fhg.de                        
# HEPNET: 13533::52714::MARTEN, Phone: +49/241/8906-112, -0
From: larsson@ntc02.tele.nokia.fi
Subject: Reading text files in Prolog
Organization: Nokia Telecommunications.
Date: Thu, 21 Jan 1993 19:08:35 GMT

Dear colleagues,

Here is a question I mistakenly addressed to Jamie believing
it might be a FAQ:

I'm fairly new to the programming language Prolog. My primary
intention is to use it for natural language processing.

Presently I've been able to run (and even to write) simple parsers,
which will get one sentence at a time from the keyboard and produce
a parse tree. So far so good.

But, trying to use these techniques for text processing purposes
things suddenly get difficult. Texts usually come on files, often
huges ones, which I would like to read for instance sentence by 
sentence and parse. The difficulties arise because the system doesn't
use strings internally. Another problem is how to keep track of my
position in the file, when the system backtracks.

And finally, for compatibility and portbility the suggested method 
for reading files should preferably also be compliant with the current 
ISO Draft Standard for the language.

Thanks in advance for any hints and solutions from more
experienced programmers.

Arne

*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Arne Larsson			Nokia Telecommunications
Translator			Transmission Systems, Customer Services
larsson@ntc02.tele.nokia.fi	P.O. Box 12, SF-02611 Espoo, Finland
				Phone +358 0 5117476, Fax +358 0 51044287
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
From: amziod@world.std.com (Dennis C Merritt)
Newsgroups: comp.lang.prolog
Subject: Re: Warren Abstract Machine
Date: 27 Jan 93 00:49:41 GMT
Distribution: na
Organization: The World Public Access UNIX, Brookline, MA

An Abstract Prolog Instruction Set by David Warren is available from:

SRI International
333 Ravenswood Ave.
Menlo Park, CA 94025
415/326-6200

I would also recommend getting A Tutorial on the Warren Abstract Machine
by Gabriel, Lindholm, Lusk, and Overbeek, report ANL-84-84 from:

Argonne National Laboratory
9700 South Cass Avenue
Argonne, IL 60439

This second paper gives detailed examples of the WAM in action.

Dennis Merritt
Amziod, PO Box 273, Stow, MA 01775
Tel 508/897-7332, FAX 508/897-2784, amziod@world.std.com


-- 
Dennis Merritt
Amziod, PO Box 273, Stow, MA 01775
Tel 508/897-7332, FAX 508/897-2784, amziod@world.std.com
From: smolka@dfki.uni-sb.de (Gert Smolka)
Newsgroups: comp.lang.prolog
Subject: ICLP 93 - Postconference Workshop on CCP
Date: 23 Jan 1993 08:54:24 +0100
Organization: DFKI - German Research Center for AI
Distribution: world
NNTP-Posting-Host: gs-serv1.dfki.uni-sb.de





         CALL FOR WORKSHOP PARTICIPATION --- ICLP'93
            ``CONCURRENT CONSTRAINT PROGRAMMING''
      TENTH INTERNATIONAL CONFERENCE ON LOGIC PROGRAMMING

                       Budapest, Hungary
                        June 24-25, 1993

       Sponsored by the Association of Logic Programming


This one and a half day workshop will bring together researchers
contributing to the rapidly evolving, new field of concurrent
constraint programming.  CCP builds on ideas from constraint logic
programming and concurrent logic programming.  Major landmarks in its
short history are Maher's ALPS, Saraswat's ask and tell framework, and
Haridi and Janson's Andorra Kernel Language.  Work on all aspects of
CCP is of interest to the workshop, including theoretical foundations,
language designs, particular constraint systems, implementation
techniques, parallel architectures, particular implementations,
programming methodology, and interesting applications.

The workshop program will be selected by the following committee:
Alain Colmerauer (Marseille), Seif Haridi (Kista), Hugo Montanari
(Pisa), Gert Smolka (Saarbr"ucken).  A report containing the extended
abstracts of the accepted presentations will be available at the
workshop.

Submit extended abstracts (no more than four pages, please),
preferably by e-mail, to the workshop organizer:

    Gert Smolka

    German Research Center for Artificial Intelligence (DFKI)
    Stuhlsatzenhausweg 3
    D-W-6600 Saarbr"ucken
    Germany

    phone: +49 681 302-5311
    fax: +49 681 302-5341
    email: smolka@dfki.uni-sb.de

Submissions Due:   April 1, 1993
Notification:      May 1,   1993
Final Version Due: May 15,  1993


**************************************************************

Newsgroups: comp.lang.prolog
From: thom@ecrc.de (Thom Fruehwirth)
Subject: Re: Definitive temporal logic source
Reply-To: thom@ecrc.de
Organization: European Computer-Industry Research Centre GmbH.
Date: Mon, 25 Jan 1993 08:44:36 GMT

The foolowing paper describes an implemention of various kinds of
temporal constraints with constraint handling rules (were named
"constraint simplification rules" before) on top of ECRC's 
Eclipse Prolog.

Temporal Reasoning with Constraint Handling Rules
Thom Fruehwirth

This paper describes an application of constraint handling rules
to temporal reasoning and illustrates the conceptual simplicity 
and flexibility of the approach. 
Following the framework of Meiri (AAAI 91), temporal reasoning 
is viewed as a constraint satisfaction problem about location of 
temporal variables along the time line. Temporal variables may 
be points or intervals and temporal constraints are disjunctions 
of qualitative or quantitative primitive binary temporal 
relations.
We use constraint logic programming augmented with constraint 
handling rules to define a incremental, flexible general purpose 
solver for disjunctive binary constraints based on path 
consistency and backtrack search. We show how this approach
supports rapid prototyping and experimentation with various 
approaches and variants to temporal reasoning and constraint 
satisfaction techniques in general.


thom

Newsgroups: comp.lang.prolog
From: bazet@chailly.ensmp.fr (Philippe BAZET)
Subject: Adding Constraints to Automate Programming
Organization: /home/users/bazet/.organization
Distribution: comp
Date: 27 Jan 93 19:52:15

Hi net,


Let us consider a circular list. It can be defined by an ML-like data
type such as

	list 'a = nil | cons of 'a * list 'a ;

and the assertion:

	The last element for the list is the first one.

Does anyone know of programming systems in which such assertions can be
expressed formally and used at either run-time or compile-time?  I know
of Ait Kaci's LIFE which is mainly restricted to local structure
constraints.  

Thanks in advance,
Philippe Bazet.
e-mail: bazet@cri.ensmp.fr





Newsgroups: comp.lang.prolog
From: ad@munta.cs.mu.OZ.AU (Andrew Davison)
Subject: LP Newsletter Submissions
Originator: ad@munta.cs.mu.OZ.AU
Organization: Department of Computer Sci, University of Melbourne
Date: Fri, 22 Jan 1993 00:07:54 GMT


Logic Programming Newsletter - SUBMISSIONS 
------------------------------------------

Issue 6/1 of the Newsletter is currently at the printers
and if you're a member of the Association of Logic Programming
(ALP) you should be receiving a copy in the next few weeks.

Never one to take a rest, I'm starting to gather contributions
for the next issue.

We'll print almost anything relevant to LP. For instance,
news on new products, abstracts, short notes on 
research (1-2 pages), your views on some aspect of LP,
trip reports, announcements of workshops,
conferences, meetings, etc.


The submission deadline is March 19th
                           ----------

Contributions are welcome by email, floppy disk (MAC or PC - please
include an ASCII version) or by mail for shorter contributions.
By ASCII, I mean plain text files - not LaTex please. 

There is a STRONG preference for material received via email or 
on disc - it saves a lot of retyping.

My address is :

	Andrew Davison
	ALP Newsletter Editor
	Dept. of Computer Science
	University of Melbourne
        Parkville
        Melbourne, Victoria 3052
        AUSTRALIA

Email:   ad@cs.mu.oz.au
Fax:	+61 3 348 1184
Phone:	+61 3 344 7207 / 5230
Telex:   AA 35185


Thanks,
    Andrew


P.S.
I've received a number of messages asking about the ALP, and how
to join. The best person to contact about these matters is :

        The ALP Administrative Secretary
        Dept. of Computing
        Imperial College
        180 Queen's Gate
        London, SW7 2BZ, UK

Email:  alp@doc.ic.ac.uk 
Fax:    +44 71 589 1552
Phone:  +44 71 589 5111 x5011


Please include your surface mail address in any correspondence.
From: sgslifan@susssys1.reading.ac.uk (Fang Li)
Newsgroups: comp.lang.prolog
Subject: Help on using "vectors" in Quintus Prolog
Keywords: vectors, quintus, list
Date: 26 Jan 93 19:25:57 GMT
Organization: University of Reading

I am using Quintus Prolog v2_4 on VAX machine, and use C as a host
language to call Prolog predicate by IPC interface. I wish I can
extract a complete 'list' from Prolog side to C side, I also know
there is a 'vectors' in Quintus library, but I do not know how to
use it. Is there anybody knows this, please tell me? better give test
files both in Prolog and C code.

Many Thanks.

Fang Lee
email:   re_lf@uk.ac.nerc-nutis.vaxa
From: dahlb1@cs.chalmers.se (Bo Dahlbom (extra konto 1))
Newsgroups: comp.lang.prolog
Subject: Statistics in Prolog
Date: 21 Jan 93 07:40:51 GMT
Distribution: comp.lang.prolog
Organization: Dept. of CS, Chalmers, Sweden

I have lots of data encoded as Prolog clauses. Now 
I want to investigate these data from a statistical 
point of view and (preferably) implement general 
procedures for doing this in Prolog. Any literature 
on this subject. Any suggestions? Any code around? 

I know about D.Stott Parker, "Stream Data Analysis 
in Prolog", In: The Practice of Prolog, edited by 
Leon Sterling, MIT Press, but there must be more 
out there.

I'm using a friends account for posting this, so 
please send your responses to 

	lager@ling.gu.se

or to comp.lang.prolog.

Thanks in advance.

Best regards,

Torbjoern Lager
From: marques@vax.oxford.ac.uk
Newsgroups: comp.lang.prolog
Subject: Re: Why can't integers become principal functors?
Date: 21 Jan 93 11:42:37 GMT
Distribution: comp
Organization: Oxford University Library Automation Team

In article <CHIK.93Jan14104559@ss38.icot.or.jp>, chik@icot.or.jp (Takashi Chikayama) writes:
> Thank you very much to those who responded to my question posted in
> article <CHIK.93Jan7114812@ss38.icot.or.jp>.  I'd like to thank you
> all and summarize the responses here.
> 
> My original question was:
> 
>> Can somebody explain why integers cannot be the principal functor of
>> non-atomic functors?  Are there any theoretical reasons?  Any
>> implementational difficulties?  Or just for compatibility with
>> previous implementations?
[Stuff removed]
> Thank you again to all those who responded.
> 
> Takashi Chikayama
> ICOT

A few years back I wrote a little prolog interpreter for my Commodore 64.
Now it stored atom names in a hash table.  Each entry in this table also 
had other pointers to the procedure corresponding to this name, the operator
settings etc.  Numbers were not stored in the hash table and this could
explain why some implementations don't allow numbers, since under the above
scheme there would be no way to get from the number to its procedures, or
any other useful information that had to be common to all instances of the same
number.  Anyway my interpreter did support arbitary functor names, you
could create something like f(f(a))(x, y) but you got an error if you tried
to use it in call().
-- 
Jose Marques, Systems Programmer
 %INCLUDE STDDIS; /* Standard Disclaimer */
Organization: University of Illinois at Chicago
Date: Fri, 22 Jan 1993 18:48:13 CST
From: C. M. Sperberg-McQueen <U35395@uicvm.uic.edu>
Newsgroups: comp.lang.prolog
Subject:  Efficiency and 'good' Prolog (was: Help !!)
 <j_hamer-210193105028@john-ha.cs.aukuni.ac.nz>
 <93021.154835U35395@uicvm.uic.edu> <1993Jan21.223806.19004@colorado.edu>

> Because some of us do write large Prolog programs that depend on efficiency,
> and it's better to instill good programming habits from the beginning than to
> overcome bad programming practice later on.

Proof, I guess, that using a logic programming language does not make us
logical.  If I were willing to accept your equation of 'good programming
habits' with fast code, I wouldn't have posted my note about writing
Prolog as though it were Pascal with commas.  If you want to make anyone
believe it, you should provide an argument or two in favor of it, not
just say it again.

The real problem for me in your note, however, is your assertion that
relying on Prolog's declarative semantics is 'bad programming practice'.
The relative clarity of its declarative interpretation is one of the
most appealing things about Prolog -- God forbid we should begin to
think of it as a 'bad habit' if we take advantage of one of the best
features of the language!

If you write big systems that have to be optimized to be fast, you have
a right to worry about writing fast code.  You do not have the right to
spread the pernicious falsehood that speed is the only criterion of good
code.

-C. M. Sperberg-McQueen
From: kielmann@isa.informatik.th-darmstadt.de (Thilo Kielmann)
Newsgroups: comp.lang.prolog
Subject: Re: ISO Prolog (Was ISO Prolog Error?)
Date: 22 Jan 1993 16:04:31 GMT
Organization: TU Darmstadt
Distribution: world
NNTP-Posting-Host: sun15.isa.informatik.th-darmstadt.de

In article <brady-210193143721@brady.cs.tcd.ie>, brady@cs.tcd.ie (Michael Brady) writes:
> In article <C16Iuo.4Cz@nmrdc1.nmrdc.nnmc.navy.mil>,
> dsc3pzp@nmrdc1.nmrdc.nnmc.navy.mil (Philip Perucci) wrote:
> > 
> > ISO PROLOG draft?  Excellent!
> > [...]
> > Any timeframe anticipated for ISO acceptance?
> 
> I don't know. I was referring to the draft proposal dated March 27, 1992.
> It is available from some FTP sites (maybe someone else knows one?).
> 

It is available (for example) via anonymous ftp from ftp.th-darmstadt.de
(130.83.55.75) in directory /pub/programming/languages/prolog/standard

Best wishes


Thilo Kielmann

Newsgroups: comp.lang.prolog
From: jssloka@monet.uwaterloo.ca (Scott Sloka)
Subject: Help: making a binary predicate reversibly equal
Organization: University of Waterloo
Date: Sun, 24 Jan 1993 02:11:53 GMT


Howdy.  My name is Scott Sloka and I am an AI enthusiast at the University of
Waterloo.  I have a list of facts such as: nextto(a,b) and I would like
nextto(a,b) to be equivalent to nextto(b,a).  This does not work:

nextto(X,Y):-nextto(Y,X).

because an endless loop is set up.  I am just beginning Prolog programming
because I am doing a project on abstraction and I would like to include this
parameter switch equalization in my routines for some of my predicates.  Any
pointers would be greatly appreciated.  Thanks in advance.

		-Scott
Newsgroups: comp.lang.prolog
From: mandayrv@ucunix.san.uc.edu (The Universal Hacker)
Subject: Re: Warren Abstract Machine
Keywords: Warren Abstract Machine
Organization: University of Cincinnati
Distribution: na
Date: Thu, 28 Jan 1993 14:25:33 GMT

Thanks to all the folks who took time to send me mail about where to find
the original document. Almost all of you also recommended the book by
Hassan Ait-Kaci if it was only the theory that I was interested in. I followed
up on your advice and borrowed the book from my library. Am quite happy with
this book.


ramanand
-- 
ramanand@pumpkin.ece.uc.edu          home:   513 281 9870
rmandaya@uceng.uc.edu                office: 513 556 3025
mandayrv@ucunix.san.uc.edu           ham:    KB8GKL
From: amziod@world.std.com (Dennis C Merritt)
Newsgroups: comp.lang.prolog
Subject: Re: Reading text files in Prolog
Date: 27 Jan 93 01:24:15 GMT
Organization: The World Public Access UNIX, Brookline, MA

This is a yucchy part of Prolog.  The best thing is to use the read_in/1
predicate defined in Clocksin & Mellish, if you can still get a copy.  It
seems to be out of print.  It lets you define how you want to parse the
text input, whether to get lines, sentences, what is white space, etc.

If you have trouble finding it I can send it to you via mail


-- 
Dennis Merritt
Amziod, PO Box 273, Stow, MA 01775
Tel 508/897-7332, FAX 508/897-2784, amziod@world.std.com
Xref: sparky comp.lang.prolog:2433 comp.lang.functional:1549
From: sanded@rpi.edu (David T. Sanders)
Newsgroups: comp.lang.prolog
Subject: BinProlog Newbie question
Date: 26 Jan 93 05:33:30 GMT
Article-I.D.: rebecca.SANDED.93Jan26003330
Distribution: comp.lang.prolog
Organization: Rensselaer Polytechnic Institute


I want to run the program entitiled 'hello.pl'

mes(hello).
mes(world):-statistics.

main(X):-mes(X).

The following happens:

~/binpro1.43/progs (650) bp hello.pl
BinProlog 1.43: Copyright (C) Paul Tarau-1992

begin loading hello.pl...
...finished loading
error: *** no definition for: main/1 ***

I tried to compile and/or run the program in the interactive mode, but
I can only do so after typing boot. I'm pretty confident I'm not
supposed to bootstrap it every time I run BinProlog. I'd like to be
able to run the program from the command line. What am I missing?
Please send email to sanded@rpi.edu

Thanks,
David T. Sanders
Newsgroups: comp.lang.prolog
From: dave@quintus.com (David Bowen)
Subject: Re: ISO Prolog Error?
Organization: Quintus Corporation, Palo Alto, CA
Date: Thu, 21 Jan 1993 01:59:37 GMT

In article <brady-180193171852@brady.cs.tcd.ie>, brady@cs.tcd.ie (Michael Brady) writes:
> The draft of ISO Prolog talks about error handling, and says that when an
> error is discovered, an implicit throw(error(Code,Stuff)) is done, which
> can be caught by a catch/3 call made previously. The contents of Code is
> supposed to be one of a small number of atoms, and the Stuff is
> 'implementation defined'.
> 
> My question is, is there any informal agreement on what should be in Stuff?
> My specific question is about what should happen when input predicates
> return with syntax errors. If the stream is a window, and the user can
> correct the error, there needs to be enough information around somewhere
> for the input predicate to be retried. There's a number of ways to do this,
> so I wonder has any attempt at standardisation been attempted.
> 
> ---------------------
> Mike Brady
> Computer Science Department, Trinity College Dublin, Ireland

The next version of the draft standard will have a lot more detail on
the form of terms to be thrown when errors occur in standard built-in
predicates.  This is based on the U.S. proposal which is in the Annexe B of
N92, if that is the version that you have, but with some changes.  So
you will be able to detect the fact that a syntax error (as opposed to
some other error) occurred, and you will be able to specify what to do
when that happens.  Another thing to look at is the syntax_errors option
to read_term, which lets you specify whether read should just keep reading,
or fail, or raise an exception.  


-- 
David Bowen				Vice President Product Engineering
Quintus Corporation                     InterNet:       dbowen@quintus.com
2100 Geng Road                          FAX:            415 494 7608
Palo Alto, California 94303             Phone:          415 813 3800
From: sgslifan@susssys1.reading.ac.uk (Fang Li)
Newsgroups: comp.lang.prolog
Subject: help : using "vectors" in Quintus Prolog
Date: 26 Jan 93 20:48:10 GMT
Organization: University of Reading

I am using Quintus Prolog v2_4 on Vax machine, I wish to use "vectors"
tool to extract 'list' structure from Prolog to C, but don't know how
to use it. Is there anybody knows this, please tell me? Better you can
offer a simple test file both on Prolog and C side.

Many Thanks.


Fang Lee
from Reading University, U.K.
Newsgroups: comp.lang.prolog
From: wunderwa@informatik.tu-muenchen.de (Jens Wunderwa)
Subject: Re: Efficiency and 'good' Prolog (was: Help !!)
	<93021.154835U35395@uicvm.uic.edu>
	<1993Jan21.223806.19004@colorado.edu>
	<93022.184813U35395@uicvm.uic.edu>
Organization: Inst. fuer Informatik, TU Muenchen, Germany
Date: Tue, 26 Jan 1993 16:43:55 GMT

I have edited both max-versions for better comparability:

max_heiner( [Max], Max ) :- !.
max_heiner( [MaxSoFar, First |Rest], Max ) :-
	MaxSoFar > First, !, 
	max_heiner( [MaxSoFar |Rest], Max ).
max_heiner( [_|Rest], Max ) :-
	max_heiner( Rest, Max ).


max_hamer( [First |Rest], Max ) :-
	max_hamer( First, Rest, Max ).

max_hamer( Max, [], Max ) :- !.
max_hamer( MaxSoFar, [First |Rest], Max ) :-
	MaxSoFar > First, !, 
	max_hamer( MaxSoFar, Rest, Max ).
max_hamer( _, [First |Rest], Max ) :-
	max_hamer( First, Rest, Max ).


The difference seems to be almost of a syntactic character. Hamer 
uses a temporary variable for the greatest element seen so far 
whereas Heiner uses the first element of the input list for that 
purpose. 

I think it's bad style to misuse the input for constructing
the result instead of applying the standard accumulator pair technique.

Heiner's solution needs heap space for storing the intermediate 
result making it 30 % slower.
Xref: sparky comp.lang.prolog:2462 comp.lang.functional:1557 comp.parallel:3077