Thread View: comp.lang.prolog
5 messages
5 total messages
Started by Arindam Das
Fri, 02 Oct 1992 22:31
Graph Traversal
Author: Arindam Das
Date: Fri, 02 Oct 1992 22:31
Date: Fri, 02 Oct 1992 22:31
26 lines
1216 bytes
1216 bytes
Hi ! I am implementing an automated mask layout generator for dynamic CMOS circuits. In the first part of my implementation, i am building a two-level logic synthesizer in prolog. The input to the synthesizer is the on-set and don't-care-set of minterms for multi-output functions and the output is a set of connectivity informations and a minimized switching graph which is an interconnection of transistors realizing the given functions. Now, In my program i need to do complex traversal of the graph. I being at ease in using Prolog (Quintus Prolog), am using it comfortably and i am finding that i can develop the code pretty quickly. However I have to defend the use of Quintus Prolog instead of C. Could somebody in the net give me some advice and tips and points for defending the use of declarative prolog instead of imperative C ? thanx in advance -arindam
Re: Graph Traversal
Author: Gerry Trinidad
Date: Sun, 04 Oct 1992 22:31
Date: Sun, 04 Oct 1992 22:31
42 lines
1987 bytes
1987 bytes
In <1605@newsserver.cs.uwindsor.ca> arindam@cs.uwindsor.ca (Arindam Das) writes: >Hi ! >I am implementing an automated mask layout generator for dynamic CMOS >circuits. [Text Deleted] >Now, In my program i need to do complex traversal of the graph. >I being at ease in using Prolog (Quintus Prolog), am using it >comfortably and i am finding that i can develop the code pretty >quickly. I think you had just give the reason why you should use Prolog instead of C. It is easier to develop the code. >However I have to defend the use of Quintus Prolog instead of C. Aside from the fact it is easier to write in Prolog, the resulting code is easier to maintained even by other persons. I could even add that I would rather have a slow and correct program than a fast code that I am not really sure of. But are Prolog programs uniformly slow across the board. An article in the Janaury 1992 issue of the Computer magazine (of IEEE Comp Society) has something to say along this line. Some might say that Prolog is a nice toy language suitable for small eligant toy problems. The book "Practice of Prolog" might offer some counter arguments. [Edited Leon Sterling, MIT Press 1990]. ======= Some closing comments : I believe that Prolog, like other programming languages, has its good and bad points. It just sad that misconception and prejudice ambivalence towards Prolog is still wide spread these days. Why should a Prolog programmer has to justify using Prolog instead of language X?
Re: Graph Traversal
Author: Michael Covington
Date: Mon, 05 Oct 1992 03:28
Date: Mon, 05 Oct 1992 03:28
43 lines
2670 bytes
2670 bytes
In article <gerry.718237883@coral> gerry@coral.cs.jcu.edu.au (Gerry Trinidad) writes:
>In <1605@newsserver.cs.uwindsor.ca> arindam@cs.uwindsor.ca (Arindam Das) writes:
>>Now, In my program i need to do complex traversal of the graph.
>>I being at ease in using Prolog (Quintus Prolog), am using it
>>comfortably and i am finding that i can develop the code pretty
>>quickly.
>
>I think you had just give the reason why you should use Prolog
>instead of C. It is easier to develop the code.
>
>>However I have to defend the use of Quintus Prolog instead of C.
>
>Aside from the fact it is easier to write in Prolog, the resulting
>code is easier to maintained even by other persons.
This is a special case of the general problem, how to justify use of
programming language X instead of programming language Y.
Things you might appeal to:
- Ease of expressing the algorithm
(which reduces program development costs,
as well as future debugging and modification costs)
- Efficiency of execution
(That's right, if you're using backtracking and unification then
your program will probably run as fast under Prolog as under any
other language. We once ported a simple Prolog list processing
routine into Pascal as a test, and got a factor-of-14 *slowdown*!)
- Portability
(Prolog is available for a wide range of architectures and is about
to have an ISO standard. Although not as portable as C, Prolog
is, I would argue, comparable to COBOL and much superior to Pascal
in portability.)
Argument you might have to refute (my tongue goes in my cheek here):
"All programs should be written in C for efficiency/portability"
(Translation: "C is the only language I know." In previous years this
same argument was heard with Fortran, COBOL, or assembly language in
place of C.)
--
:- Michael A. Covington internet mcovingt@uga.cc.uga.edu
:- Artificial Intelligence Programs phone 706 542-0359
:- The University of Georgia fax 706 542-0349
:- Athens, Georgia 30602 U.S.A. amateur radio N4TMI
Elegant technologies (was: Graph Traversal)
Author: Peter Ludemann
Date: Mon, 05 Oct 1992 17:45
Date: Mon, 05 Oct 1992 17:45
32 lines
1587 bytes
1587 bytes
In article <1605@newsserver.cs.uwindsor.ca>, arindam@cs.uwindsor.ca (Arindam Das) writes: > Hi ! > > I am implementing an automated mask layout generator for dynamic CMOS > circuits. > > ... > > However I have to defend the use of Quintus Prolog instead of C. > > Could somebody in the net give me some advice and tips and points > for defending the use of declarative prolog instead of imperative C ? You might look in the proceedings of the conference on practical applications of Prolog (April 1992). There are lots of concrete examples there; one of the more general papers is Peter Reintjes's "Elegant Technologies". I suggest you try to get a copy of the proceedings; if you can't get it, I have a copy of Peter's paper (send me a note, specifying whether you want it in LaTeX, DVI, or PostScript). For the conference proceedings, try: Al Roth PO Box 137 Blackpool Lancashire FY2 0XY, UK Tel: +44-253-58081 Fax: +44-253-53811 Email: alroth@cix.compulink.co.uk -- Peter Ludemann +1-415-813-3800 ludemann@quintus.com
Re: Graph Traversal
Author: Richard A. O'Keefe
Date: Tue, 06 Oct 1992 12:15
Date: Tue, 06 Oct 1992 12:15
30 lines
2270 bytes
2270 bytes
In article <1605@newsserver.cs.uwindsor.ca>, arindam@cs.uwindsor.ca (Arindam Das) writes: > Now, In my program i need to do complex traversal of the graph. > I being at ease in using Prolog (Quintus Prolog), am using it > comfortably and i am finding that i can develop the code pretty > quickly. > However I have to defend the use of Quintus Prolog instead of C. You just gave the best possible defence. It wouldn't matter how wonderful Prolog is if _you_ couldn't use it effectively for _your_ application. Tell whoever is hassling you that you are "developing an executable specification" and that you are willing to implement the final version in C or whatever _IF_ there is a need for a really fast implementation and _ONCE_ you have measurements on a working executable specification which tell you what C data structures would be appropriate. (I have just pointed out to my 2nd year data-structures-in-Pascal students that using the building blocks I have given them they can put together over 256 distinct implementations of graphs, and that's only counting versions based on adjacency matrices/lists. You need to know what operations your _whole_ program performs and how often it performs each before you can choose the best building blocks.) Point out that it will be easier to recode to the "right" C implementation from a high level specification than from a low level one, so that if and when you _do_ need a C version you are likely to get a better one than if you had started hacking right away. -- RMIT policy requires the use of Gender Inclusive Language in all publications and in all information conveyed to students, staff, and potential job applicants. Lapses into English are the sole responsibility of the author. The Constitution of Australia does _not_ guarantee Freedom of Speech.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads