🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.prolog
Article #662

Re: "assert" considered harmful?

#662
From: MorrisseyTJ
Date: Tue, 03 Jun 1986 18:13
46 lines
2112 bytes
In article <1229@lsuc.UUCP>, dave@lsuc.UUCP writes:
> Saumya Debray mentioned recently on the net (in <126@sbcs.UUCP>)
> that good Prolog programmers don't make much use of assert and retract.
> [text deleted]
>                   When I look at the logic, I find it's doing the same
> analysis over and over for certain legal conclusions that are really
> "facts" for other rules to deal with.
> [text deleted]
> Once I've determined that T1 controls T2, should I "asserta" that
> as a fact, so it no longer needs to take much time?
> [text deleted]

Is this an example of lemmas?

I would like to believe that a formal mechanism for managing and
applying previously proved goals could significantly improve the speed
of large programs.  However, I do see many issues like:
	- knowing when the lemmas are no longer valid
	- making the time cost cheap enough to cause overall speedup
	- keeping the space cost "low enough"
	- knowing when *not* to store lemmas (I/O, external conditions)

---------------

Although it is easy to misuse assert and retract, I think Prolog is very
valuable as a database language.  Databases for practical applications
can easily have dozens of relations and change very often.

Something I find dearly missing from Prolog are uniform semantics for
side-effects.  It seems "ugly" that applications and even Prolog support code
use predicates like:

	set_xxx(Value)
	get_xxx(Value)

		or

	add_xxx(Key,Value)
	find_xxx(Key,Value)
	del_xxx(Key)


Just some food for thought.


Tim Morrissey
Technical Details
Message-ID: <521@druhi.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbosgd!ihnp4!drutx!druhi!tim
References: <1229@lsuc.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbosgd!ihnp4!drutx!druhi!tim
From: tim@druhi.UUCP (MorrisseyTJ)
Newsgroups: net.lang.prolog
Subject: Re: "assert" considered harmful?
Message-ID: <521@druhi.UUCP>
Date: Tue, 3-Jun-86 14:13:28 EDT
Article-I.D.: druhi.521
Posted: Tue Jun  3 14:13:28 1986
Date-Received: Sat, 7-Jun-86 07:17:23 EDT
References: <1229@lsuc.UUCP>
Organization: AT&T Information System Labs, Denver, Co
Lines: 46
Summary: more general concept of lemmas to speed computation?