HDTenEightyP/NetNews huggingface dataset:
From: matsc@sics.se (Mats Carlsson)
Subject: Re: Compilation of Disjuncts
Organization: Swedish Institute of Computer Science, Kista
Date: Thu, 3 Sep 1992 15:52:46 GMT

In article <1992Sep3.080802.21788@ecrc.de> micha@ecrc.de (Micha Meier) writes:

   In article 92Sep2141625@vishnu.sics.se, matsc@sics.se (Mats Carlsson) writes:
   >   do you do anything special about this construct, or do you just
   >   consider it as an ordinary predicate with a definition like:
   >   P ;_Q :- P.
   >   _P; Q :- Q.
   >
   >SICStus Prolog does nothing special, and considers it as an ordinary
   >predicate as you describe.

   I guess this is slightly understated, because that would mean that all goals
   inside a disjunction are metacalled, which is not the case in SICStus.

   There are two basic ways to compile the disjunctive constructs, one is with
   auxiliary procedures and the other in-line. If you have a clause

	   p(X, Y) :- q, (r(X); s(Y)), t.

   then the former method (used e.g. in SICStus, KCM, ...) is to transform it into

	   p(X, Y) :- q, aux(X, Y), t.

	   aux(X, _) :- r(X).
	   aux(_, Y) :- s(Y).

   (in case there is a cut involved, one might need to pass additional information
   to aux/2).

   The other method is done at the WAM level, the WAM code looks something like

	   allocate
	   get_variable Y1, A1
	   get_variable Y2, A2
	   call q/0
	   try_me_else L1
	   put_value Y1, A1
	   call r/1
	   branch L2
   L1:	trust_me
	   put_value Y2, A1
	   call s/1
   L2:	deallocate
	   execute t/0

Micha is absolutely right, SICStus of course uses the first method.
I misread the original posting.

The second method would not be readily applicable, since the SICStus
emulator does not have try/retry/trust instructions.
--
Mats Carlsson
SICS, PO Box 1263, S-164 28  KISTA, Sweden    Internet: matsc@sics.se
Tel: +46 8 7521543     Ttx: 812 6154 7010 SICS     Fax: +46 8 7517230
From: jensk@hpbbrd.bbn.hp.com (Jens Kilian)
Newsgroups: comp.lang.prolog
Subject: Compilation of Disjuncts
Date: 3 Sep 92 14:37:04 GMT
Organization: HP Mechanical Design Division

The main reason for compiling disjunctions is that it can speed up code
like

	p(X) :-
	  (  X >= 0 ->
	     do_something_for_positive_X(X)
	  ;  do_something_for_negative_X(X)
	  ).

This can be converted to test-and-branch code, since it is completely
determinate. Obviously, the plain WAM must be extended with special
instructions to allow such things.

	Jens.
--
Internet: jensk@hpbeo82.bbn.hp.com    HPDESK : JENS_KILIAN%XU@HP1200
MausNet:  Jens Kilian @ BB                     KILIAN_JENS/HP1200_XU@hpbbi4
Phone: (0|+49)7031-14-4308            TELNET : 778-4308
Fax  : (0|+49)7031-14-2049
-------------------------------------------------------------------------------
As the air to a bird, or the sea to a fish, so is contempt to the contemptible.
Newsgroups: comp.lang.prolog
From: dsouza@fraser.sfu.ca (Keith D'Souza)
Subject: Prolog++ anyone ?
Summary: Looking for contact working with Prolog++ 
Organization: Simon Fraser University, Burnaby, B.C., Canada
Distribution: World
Date: Thu, 3 Sep 1992 17:09:57 GMT

Hi!

I am currently working with Quintus' Prolog++ on research relating to
graph-grammars.  I would like to establish contacts with anyone working
with Prolog++ for mutual discussions and problem solving 

Please e-mail me at dsouza@sfu.ca

Thanx!

Keith
From: popx@vax.oxford.ac.uk
Newsgroups: comp.lang.prolog
Subject: Wanted: planners
Date: 28 Aug 92 10:24:35 GMT
Organization: Oxford University VAX 6620

I'm looking for Prolog-written planners that I can use to control my
"animal". It seems rather a waste for me to implement and test yet
another one, when there must already be many around. A Prolog version of
Vere's DEVISER would be a real prize, but I don't expect to find that;
anything capable of generating plans for typical blocks-world problems
would do. Any offers? Must be a number out there being used in AI
courses.

I'll put anything I receive in my PD Prolog library (which will, by the
way, shortly be available by FTP from the archive at Imperial College).
Other contributions for the library are also welcome.


Jocelyn Paine
Newsgroups: comp.lang.prolog
From: lhe@sics.se (Lars-Henrik Eriksson)
Subject: Re: Help on problem needed!
Keywords: help
Reply-To: lhe@sics.se (Lars-Henrik Eriksson)
Organization: SICS, Kista (Stockholm), Sweden
Date: Thu, 27 Aug 1992 14:31:08 GMT

In article <meskes.714916931@ulysses>, meskes@ulysses (Michael Meskes) writes:
>As far as I know Prolog is turing-complete and the proofs I know don't use
>the Cut. So why isn't it possible to solve this problem im Prolog?

That Prolog (or any language for that matter) is Turing complete just
means that any algorithm can be coded in that language. It does not
mean that it can express an arbitrary programming language construct.

You ask for a way of expressing IF-THEN-ELSE. A construct such as IF a
THEN b ELSE c is not an algorithm, so you cannot be certain that it
can be expressed in Prolog.
-- 
Lars-Henrik Eriksson                            Internet: lhe@sics.se
Swedish Institute of Computer Science           Phone (intn'l): +46 8 752 15 09
Box 1263                                        Telefon (nat'l): 08 - 752 15 09
S-164 28  KISTA, SWEDEN                         Fax: +46 8 751 72 30
Newsgroups: comp.lang.prolog
From: fp+@CS.CMU.EDU (Frank Pfenning)
Subject: 2nd CFP: Workshop on Proofs and Types at JICSLP'92
Organization: Carnegie Mellon University
Date: Thu, 27 Aug 1992 04:25:25 GMT

			Second Call for Participation

			 Workshop on PROOFS AND TYPES

			  Friday, November 13, 1992
			   in conjunction with the
      Joint International Conference and Symposium on Logic Programming,
		 November 9-13, 1992, Washington, DC, U.S.A.

Interest in finding sound proof-theoretic and type-theoretic foundations for
existing and extended logic programming languages has increased rapidly over
last few years.  Moreover, techniques for compilation of languages with
advanced features, such as higher-order constructs or types, are under
development and prototype implementations have reached a more mature state. 
However, many semantical issues, both operational and denotational, remain. 
At the same time, applications have developed towards larger and more complex
systems.

This workshop is intended to provide a forum for researchers to exchange ideas
on the influence of proof theory and type theory on the future development of
the field of logic programming.  The workshop will address language theory,
implementation and compilation techniques, and applications.

If you are interested in participating in this workshop, please submit a
two-page abstract of your proposed talk (or a short note with your research
interests, if you do not wish to give a talk) by SEPTEMBER 7, 1992 to

 Frank Pfenning
 School of Computer Science
 Carnegie Mellon University
 Pittsburgh, PA 15213-3890, U.S.A.
 Telephone: +1 412 268-6343, FAX: +1 412 681-5739
 Email: fp@cs.cmu.edu 

Electronic submission using LaTeX or plain text is strongly preferred!
Notification of acceptance will be mailed electronically by October 1.  The
version of accepted abstracts to appear in the workshop notes will be due by
October 15.

Organizing Committee:

 James Harland, University of Melbourne
 Frank Pfenning, Carnegie Mellon University
 David Pym, University of Edinburgh
From: cjhs@minster.york.ac.uk
Newsgroups: comp.lang.prolog
Subject: Re: SICStus prolog problem
Date: 26 Aug 92 10:11:52 GMT
Organization: Department of Computer Science, University of York, England
X-Newsreader: Tin 1.1 PL5

cjhs@minster.york.ac.uk wrote:
: I have a program in SICStus prolog that makes extensive use of the wait
: declaration. Program (137 lines) supplied to anyone who is curious.
: 
: The problem is that it runs ok interpreted, but fails when compiled.
: Insertion of a diagnostic in a critical place makes the compiled
: version behave like the interpreted version.
: 
: I am using the following version of SICStus:
: 
: SICStus 0.6 #17: Mon Apr 9 09:37:54 BST 1990
: Copyright (C) 1987, Swedish Institute of Computer Science.
: All rights reserved.
: 
: Am I out of date? Who can I contact to fix the problem?

I am now given to understand that SICStus 2.1 is available... but this
information came locally. Some other people posting from York are now
also wondering if articles get into the wide world. So if you have
any insight into why programs might run differently when compiled,
contact me -- you will also help to answer the question of whether
news is getting out from this site...

Thanks -- Chris Ho-Stuart   cjhs@minster.york.ac.uk
Newsgroups: comp.lang.prolog
From: matsc@sics.se (Mats Carlsson)
Subject: Re: Compilation of Disjuncts
Organization: Swedish Institute of Computer Science, Kista
Date: Wed, 2 Sep 1992 13:16:25 GMT

   I have some knowledge (only "theoretic", though) about the WAM, but I have
   never seen anything about the compilation of the disjunction ';' (and
   also things like '->').

   do you do anything special about this construct, or do you just
   consider it as an ordinary predicate with a definition like:
   P ;_Q :- P.
   _P; Q :- Q.

SICStus Prolog does nothing special, and considers it as an ordinary
predicate as you describe.
--
Mats Carlsson
SICS, PO Box 1263, S-164 28  KISTA, Sweden    Internet: matsc@sics.se
Tel: +46 8 7521543     Ttx: 812 6154 7010 SICS     Fax: +46 8 7517230
From: kono@csl.sony.co.jp (Shinji Kono)
Newsgroups: comp.lang.prolog
Subject: Re: Pipes in Quintus
Date: 29 Aug 92 01:16:08 GMT
Reply-To: kono@csl.sony.co.jp
Organization: Sony Computer Science Laboratory, Inc.

In article <17ljnjINNlbo@swan.doc.ic.ac.uk> , 
	jvp@doc.ic.ac.uk (Jeremy Pitt) writes 
>Does anybody either (a) know of an easy way of doing both or (b) have
>a library package which exports predicates to do this.

If you are using Sun, named pipe is an easy way to do it.
     mknod p fifo
     quintus
     ?- unix(system('ls -l >>fifo &')).
     ?- see(fifo),repeat,get0(X),put(X),X = -1,seen.
Or it is not so difficult to write fork/exec system call interface.

You need some trick to get stderr/stdout separately in csh. (But I forget
it :-)
---
Shinji Kono @           kono@csl.sony.co.jp
Sony Computer Science Laboratory, Inc,Japan
From: jvp@doc.ic.ac.uk (Jeremy Pitt)
Newsgroups: comp.lang.prolog
Subject: Pipes in Quintus
Date: 28 Aug 92 16:20:03 GMT
Organization: Department of Computing, Imperial College, University of London, UK.
NNTP-Posting-Host: swan.doc.ic.ac.uk

I've got this Quintus prolog program and this C program and, quite
unreasonably really, I want them to `talk' to each other.

However, the Quintus library predicate popen only allows me to get
hold of one end of the pipe: I can either read from it or write
to it, but not both.

Does anybody either (a) know of an easy way of doing both or (b) have
a library package which exports predicates to do this.

Oh, and on top of that the C program writes its output to standard
error (don't ask). So what I want is to be able to send stuff from
my Quintus program through the pipe to the C program, and pick up 
its output off standard error when its finished munging about with
it.

Don't want much, do I? However, any help with this would be greatly
appreciated. Thanks,

Jeremy
--
Jeremy Pitt, Department of Computing, Imperial College of Science, Technology
& Medicine, Huxley Building, 180, Queen's Gate, London, England, SW7 2BZ.
jvp@doc.ic.ac.uk    +44 71 589 5111 ext 4983
Newsgroups: comp.lang.prolog
From: fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON)
Subject: Re: Homework problems (was Re: Help on problem needed!)
Organization: Computer Science, University of Melbourne, Australia
Date: Tue, 25 Aug 1992 17:13:59 GMT

debray@cs.arizona.edu (Saumya K. Debray) writes:

>torkel@sics.se (Torkel Franzen) writes:
>> I think it's high time to get rid of this "no homework" nonsense. Anybody
>> with any sense should ask the net for solutions to boring idiotic home
>> work. With a bit of luck somebody will supply the answer.
>
>I disagree vehemently, for the following reasons:
>
>1. Resources.  Solutions to "boring idiotic homework problems" are unlikely
>     to be of burning interest to the vast majority of people working
>     on/with logic programming languages.  I see little sense in using a
>     lot of computing and network resources worldwide to support this kind
>     of stuff.

For the minute amount of traffic we're considering, the people-time is far
more important than the machine resources.

>2. SNR.  Between four or five technical newsgroups, I have enough articles 
>     to wade through every morning that it takes up a fair amount of time
>     already.  I see little to be gained from increasing the volume and 
>     decreasing the signal-to-noise ratio further.

Quite fair enough. What about creating a new newsgroup for elementary-level
Prolog questions? Something like "comp.prolog.questions", or
"comp.prolog.novices". Alternatively it could be in the "alt" hierarchy,
which would also mean that (1) would nopt be a problem.

>3. Ethics.  In my opinion, anyone who (actively or passively) aids and abets
>     an act of plagiarism is just as guilty of cheating as the person who 
>     actually tries to pass off someone else's work as his own (in my
>     classes, it's standard policy that all such "participants in academic
>     dishonesty" get a failing grade for the entire course immediately and
>     without exception).  The point does not change just because the medium
>     has changed from pencil and paper to something more high tech.

Obviously no-one here would condone plaigiarism (I hope!); the point was,
however, that elementary-level questions often get a somewhat hostile
response here.

-- 
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!
Newsgroups: comp.lang.prolog
From: Trinity College Dublin, Ireland (Michael Brady)
Subject: Errors in ISO Prolog Draft?
Followup-To: comp.lang.prolog
Organization: University of Dublin
Date: Mon, 31 Aug 1992 09:29:38 GMT

I am trying to implement disjunction, if-then, if-then-else and
negation-by-failure according to ISO Prolog Draft of March 27, 1992, and I
think there may be some mistakes in the examples. Can anyone comment?

The mistakes (?) are:

Section 7.8.7.2. This is examples of if-then. The second-last example
appears to have a syntax error. I won't lose sleep worrying about that one.

Section 7.8.8.2. This is examples of if-then-else. I just don't see how the
stated behaviour of the last example can conform to the intended operation
of if-then-else. This one I worry about.

Can anyone help?

Mike
From: serge@irisa.fr (Serge Le Huitouze)
Newsgroups: comp.lang.prolog
Subject: Re: Compilation of Disjuncts
Date: 4 Sep 92 07:15:22 GMT
Reply-To: brisset@irisa.fr
Organization: Irisa, Rennes(FR)

I realise that my first question on the compilation of disjuncts was sure stated
in a too much naive way.

Now, here is a more precise formulation for my question:

How do WAM implementations treat the disjunction EFFICIENTLY ?
                                                 ^^^^^^^^^^^

I cannot believe that the branches of the ';' are copied into the heap and then
executed via 'call/1', which would make them be interpreted rather than compiled.

So, given that a great effort towards efficiency has been achieved for the WAM
I think there is, here or there, some special treatment for ';'.

Any pointers/articles/reports about this would be welcome.
From: lhe@sics.se (Lars-Henrik Eriksson)
Subject: Re: SICStus prolog problem
Reply-To: lhe@sics.se (Lars-Henrik Eriksson)
Organization: SICS, Kista (Stockholm), Sweden
Date: Thu, 27 Aug 1992 07:58:13 GMT

In article <MATSC.92Aug27090609@vishnu.sics.se>, matsc@sics (Mats Carlsson) writes:
>In article <1992Aug26.145353.21444@sics.se> lhe@sics.se (Lars-Henrik Eriksson) writes:
>>   The manual should really state clearly that [the difference between
>>   interpreted and compiled code when using coroutining] can happen. 

>But it does, witness page 110 in the User's Manual for version 2.1.

You are right. I missed that. However, the page you mention is in the
section "Procedural semantics". This is not inappropriate, of course,
but the section on coroutining has no mention of the problem, not even
a reference to page 110.

My first thought when I have problems with coroutining is to look at
the part of the manual describing coroutining, not at the section
"Procedural Semantics" in the chapter "The Prolog Language".
-- 
Lars-Henrik Eriksson                            Internet: lhe@sics.se
Swedish Institute of Computer Science           Phone (intn'l): +46 8 752 15 09
Box 1263                                        Telefon (nat'l): 08 - 752 15 09
S-164 28  KISTA, SWEDEN                         Fax: +46 8 751 72 30
Newsgroups: comp.lang.prolog
From: baier@forwiss.uni-passau.de (Joern Baier)
Subject: Time and Date in Quintus P.
Organization: University of Passau, Germany
Date: Thu, 3 Sep 1992 20:10:23 GMT

Hi!

For an application I need the time and date in Quintus Prolog. I wrote a
small predicate date/1 but I'm not content with it, because I have to
create an extra file. How can I get a random number in PROLOG to create
unique file names?
The main problem is that 'unix(system(date))' sends its output directly
to the user, regardless of the current output.
 
I enclose the protocol of a session below.

Thanx in advance,
			Joern
-------------------------------Cut here!------------------------------
gandalf:~/prolog/dp 103> prolog

Quintus Prolog Release 2.5.1 (DECstation 3100, Ultrix 3.1)
Copyright (C) 1990, Quintus Computer Systems, Inc.  All rights reserved.
1310 Villa Street, Mountain View, California  (415) 965-7700

| ?-  tell(test_2),current_output(O),unix(system(date)),told.
Thu Sep  3 22:01:06 MET DST 1992

O = '$stream'(35,3) 

| ?- [system].
[consulting /home/forwiss/baier/prolog/dp/system.pl...]
...
 [consulting /private/projects/quintus/generic/qplib2.5.1/library/readin.pl...]
 [readin.pl consulted in module read_in 0.200 sec 2,844 bytes]
[system.pl consulted in module system 2.000 sec 40,736 bytes]

yes
| ?- listing(date).

system:(date(A) :-
        tell('________Datum_Uhrzeit'),
        told,
        unix(system('date > ________Datum_Uhrzeit')),
        open('________Datum_Uhrzeit',read,B),
        set_input(B),
        read_in(A),
        close(B).

yes
| ?- date(Date).

Date = [thu,sep,3,21,:,56,:,52,met,dst,1992,''] 
----------------------------Cut again!------------------------------------
-- 
Joern Baier     (baier@forwiss.uni-passau.de) 
Jesuitengasse 9 	   __o
D-W8390 Passau 		 _ \<,_
Tel +49/851/35239 	(_)/ (_)
From: MikeSummers@cup.portal.com (Michael - Summers)
Newsgroups: comp.lang.smalltalk
Subject: Multi-column SelectionInListView for st80r4?
Date: Sun, 30 Aug 92 10:26:46 PDT
Organization: The Portal System (TM)
Distribution: world

Before I go off and try to do this-- does anyone have a multiple column
SelectionInListView that they'd share?

What I need is 3-4 lists side-by-side, all controlled by the same scroll
bar. Something like spreadsheet without a horizontal slider.

Thanks,
--Mike
Newsgroups: comp.lang.smalltalk
From: mjb@netcom.com (Martin Brown)
Subject: Reminder: ST users meeting on irc wednesday, tomorrow!
Date: Wed, 02 Sep 92 00:47:49 GMT
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 


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

ANNOUNCING

Meeting of Smalltalk Users

------

When: Wednesday, September 2, 1992      

Time: 10:00am PDT, (Pacific **DAYLIGHT** Time, U.S.A.)  

Where: on the Internet Relay Chat (irc)

IRC Channel: #programST        

Channel Topic: programming in Smalltalk 

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

This time should allow greater participation from European ST users.

-- 

                                   - mjb -

                                mjb@netcom.com
From: rsage@mips.com
Newsgroups: comp.lang.smalltalk
Subject: Smalltalk/V Win questions
Date: 27 Aug 92 20:56:16 GMT
Organization: MIPS Computer Systems, Inc.
NNTP-Posting-Host: words.mips.com
Originator: rsage@words.mips.com

I have a couple questions re: V/Win. I just got 2.0 and am doing the initial
analysis.

1 - Which (if any) commercial applications available retail are written in
	Smalltalk/V? (preferably V/Win)

2 - Has anybody used Cooper & Peters Window Builder/V 2.0? (or previous 
	versions) They are selling Window Builder & Subpanes for $199
	bundled together until the end of August. From the fliers, it
	looks like an indespensible interface builder.

Thanks.

russ
Newsgroups: comp.lang.smalltalk
From: johnson@m.cs.uiuc.edu (Ralph Johnson)
Subject: Re: very large fonts
Organization: University of Illinois, Dept. of Comp. Sci., Urbana, IL
Date: Thu, 3 Sep 1992 11:08:32 GMT

Thanks for all the suggestions, many by e-mail.  I'll summarize soon.

-Ralph

Newsgroups: comp.lang.smalltalk,comp.os.os2
From: muhr@opal.cs.tu-berlin.de (Thomas Muhr)
Subject: Re: Digitalk Smalltalk/V286 and OS/2
Keywords: smalltalk
Organization: Techn. University of Berlin, Germany
Distribution: na
Date: Sat, 29 Aug 1992 17:04:54 GMT

coop7s12@bcarh180.bnr.ca (Chris Cooke) writes:

>I need to have Digitalk's Smalltalk/V286 running for some of my comp. sci.
>classes in order to get projects done. It won't run under OS/2 2.0 in either
>a DOS window or full-screen mode. If I'm correct it will not run in protected
>mode sessions. Any suggestions (this is version 1.1 - is it fixed in a later
>version?).
>The only obvious solution seems to boot up DOS seperately. Any other sug-
>gestions would be welcome.

You are not the only one still using ST/V 286. I do once and a while
stir up the discussion of further supporting it. Digitalk let it fall
and has concentrated on Windows. They would have to recompile their
v.exe and change some primitives (can't be too hard) to make the
system compatible to newer memory management schemes. Now, you must
reboot the system without any XMS accessing programs being activated
before the ST/V session. An alternative is preserving the interrupt
and memory state before the activation of say, Windows, and
reestablish the state after terminating that program. ST/V 286 will
then start without the need to reboot. But, as far as OS/2 is
concerned, nothing will help.
- Thomas-- 
--
Thomas Muhr - Project ATLAS - Technical University of Berlin
voice: +49 30 314 27882  
BITNET: muhrth@db0tui11  INTERNET: muhr@cs.tu-berlin.de
Compu$erve: 100013,377
Newsgroups: comp.lang.smalltalk
From: steinman@is.morgan.com (Jan Steinman)
Subject: Re: Which coding technique is "correct"?
Organization: Morgan Stanley & Company
	<81597@bcsaic.boeing.com>
Date: Mon, 31 Aug 1992 02:05:36 GMT

In article <81597@bcsaic.boeing.com> podenski@bcsaic.boeing.com
(Patrick Podenski) writes:
   ... Of course in PP Smalltalk 80, you could also use a class
   instance variable (aka metaclass variable).

Smalltalk/V under ENVY/Developer also has class instance variables. In
fact, ST/V *has* class instance variables, they just (in their
infinite wisdom) didn't provide access to them. Envy provides "normal"
protocol for class instance variables in ST/V, or you can hack your
own with little trouble. (Digitalk will provide you with "starting
point" code, although it needs considerable robustification if you are
really going to put CIVs to use.)
--
: : Jan Steinman	   steinman@is.morgan.com		 Bytesmiths : :
: : 2002 Parkside Court				   West Linn, OR 97068-2767 : :
: : 503/657-7703					       212/956-8722 : :
From: qding@uoft02.utoledo.edu
Newsgroups: comp.lang.smalltalk
Subject: ABOUT ENFIN
Date: 31 Aug 92 20:28:59 EST
Organization: University of Toledo, Computer Services

Hi, there.
                                                      
I have been using Smalltalk for a while. I heard that ENFIN is another
Smalltalk dilect which is more powerful and the company supplys better
support. 
Can anybody there send me more information about ENFIN and the company.
Does ENFIN support Windows 3.x, Macintosh, Unix and Dos ? Are the codes
transparent ? How much is it for each version? Any information will be
appreciated.

Rui