[comp.newprod] Prolog for Apple Macintosh

dainis@zyx.UUCP (Dainis Millers) (10/08/87)

	    ZYX Sweden AB announces the ZYX Macintosh Prolog
	    ________________________________________________


ZYX Macintosh Prolog  offers two dialects  of  Prolog, Z-Prolog  and  C-
Prolog.  The primary  dialect is Z-Prolog,  a modern and powerful Prolog
dialect developed in-house by  ZYX, incorporating many  new features and
concepts previously lacking  in Prolog.  Z-Prolog has  a flexible Common
Lisp-like syntax.  The secondary  dialect is  the full C-Prolog  dialect
with its Edinburgh style syntax.  Although a less  powerful dialect than
Z-Prolog, it is used by many books about Prolog.

ZYX Macintosh Prolog is a suitable tool for:

-	Building Knowledge-Base Management Systems (KBMS)
-	Increasing software productivity for conventional applications

Unlike most available Prolog dialects and implementations on the market,
Z-Prolog is not merely  yet another  DEC-10  Prolog  lookalike.   DEC-10
Prolog made an  impact  by  being the  first  Prolog   implementation to
incorporate a compiler,  a necessity for  serious programming.  However,
this was more  than ten years  ago and  Prolog  has had  time to mature.
Z-Prolog  was  designed  to  remedy several shortcomings  of traditional
Prolog implementations in order  to make it a useful  tool for  a  wider
range  of  software development.  It  is  therefore a more comprehensive
language environment  than what has been previously  available.  Some of
the improvements are

-	powerful and flexible I/O,
-	a richer set of control constructs,
-	declarative determinism,
-	improved  facilities for  meta-level programming i.e. programs
	writing and analysing other programs,
-	a richer set of datatypes, and
-	a package system for modular programming.

Many  aspects  of  Z-Prolog are strongly   inspired by Common Lisp,  the
emerging Lisp standard. Common Lisp is a powerful dialect of Lisp, based
on the experience of 25 years of development and  experimentation in the
artificial intelligence community.  The  Prolog language is probably not
yet mature enough to warrant   a rigid standardization.    However,  the
decision to model Z-Prolog after Common Lisp offers a  way to reap  some
of the  benefits  from the   long evolution of  Lisp and  apply  them to
Prolog, in essence copying  those  features that apply  equally  well to
Prolog. A powerful implementation-independent I/O system  is only one of
the  benefits.  The following are  some   of the  features  of  Z-Prolog
inherited from Common Lisp.

-  	The syntax of  Z-Prolog is   compatible  with  Common Lisp where
	possible. The S-Expression (list oriented) Common Lisp syntax is
	simple  and  flexible and  has ample room   for   extensions and
	incorporation of new syntactic features.

-	The set  of data types  and associated operations, e.g.  numbers
	and arithmetic operations, are compatible with Common Lisp where
	possible.

-	The  Input/Output  system  is  based  on   Common Lisp  wherever
	possible. For example,  the printed representation  of terms and
	the notion of Streams  and Pathnames are  inherited from  Common
	Lisp.

-	The package  system,   which  supports the  creation  of modular
	programs, is directly inherited from Common Lisp.

ZYX Macintosh Prolog  incorporates  an efficient  interpreter written in
assembly language, a compiler written in Z-Prolog  which produces native
68000 machine  code for  maximum performance  and a  flexible Macintosh-
style programming  environment  including  support for   multiple editor
windows, a window-oriented debugger, Quickdraw  graphics, event handling
and other Toolbox utilities.

Below follows,   for  the technically inclined, a   list of some  of the
features of ZYX Macintosh Prolog.

Language features:

-	Declarative determinism. A predicate can be declared  to have at
	most one solution. Improves efficiency and clarity.

-	Powerful control constructs: Unwind-protect, logical If.

-	Powerful and unique Macro expansion facility.

-	Metaprogramming facilities: distinction  between logic variables
	and  source variables greatly  simplifies programs dealing  with
	other programs. A concept found only in Z-Prolog.

-	Packages  for multiple name  spaces  (avoids name conflicts   in
	large programs).

-	Real  String  data   type    and   associated   primitives   for
	concatenation, search and substring extraction.

-	Input and output operations from/to strings possible.

-	Random access I/O.

-	Flexible file system  interface: possibility to  create, delete,
	rename and test for existence.

-	Global variables  as an  efficient  alternative  to  assert  and
	retract.

-	Symbol property lists.

-	Advanced data type system.

-	Floating point support using the SANE package.

-	Extensive set of numeric operators.

-	Flexible time and date functions.

-	Predicates can be defined with variable arity.

-	Generalized  Definite   Clause  Grammars  (DCG)   with  multiple
	connectors for powerful language parsing and translation.


Implementation features:

-	Fast and memory-efficient interpreter.

-	Full garbage collection. 

-	Garbage collectable compiled predicates. Compiled predicates are
	reclaimed  when  no longer referenced  and can be relocated even
	during their own execution.

-	Dynamic  heap sizing;  the ability  to reallocate  space between
	list space and vector space during runtime.

-	Trail area is only limited by available memory.

-	Retains variable names in interpreted predicates.

-	Full  32 bit integers  supported. 24  bit integers automatically
	used when sufficient. The latter do not consume heap storage.

-	Execution  interruptable   from   keyboard  (even  when  running
	compiled code).

-	Detection  of stack overflow in  both  interpreted and  compiled
	code.

-	Compiled and interpreted code can be intermixed freely.

-	Can utilize entire 16 MByte address space of the M68000.

-	Number and size of symbols and strings limited only by available
	memory.

-	Save  and restore.    The ability   to   save the state of   the
	interpreter for subsequent fast restoration.

-	Most of the user interface is written in Z-Prolog as well as the
	compiler.


Compiler features:

-	Can produce compact bytecode, machine  code or optimized machine
	code selectable with file-wide or predicate-wide declarations.

-	Produces fast native machine code.

-	Supports mode declarations.

-	Full Last-Call (i.e. tail recursion) optimization.

-	Produces loadable binary files.

-	Keeps  arguments and temporary  variables in  CPU registers when
	possible.

-	Ability  to execute different  code  at compile,  load and prove
	time.

-	Runtime linkage of compiled predicate calls.

Environment features:

-	Built-in editor with multiple windows.

-	Parenthesis matching in all text windows.  Always blinks opening
	parenthesis when cursor is at closing parenthesis.

-	Syntax recognition.  Double-clicking  an atom  selects the atom.
	Double-clicking a parenthesis selects entire s-expression.

-	Highly interactive incremental search.

-	Can  load  program  (or part of  program)  directly  from editor
	window.

-	Window Menu keeps track of all windows for instant access.

-	Selectable font and size in all text windows.

-	Printing of text files as well as pictures drawn by Prolog.

-	Complete interface to Quickdraw.

-	Powerful facility for writing event driven programs in Prolog.

-	Powerful and flexible debugging using menus, keys. Special trace
	window to separate trace output from program output.

-	File I/O operations applicable to editor windows.

-	Switcher compatible (but requires a large partition).

-	Full pathname support for Macintosh file specifications.

Other features:

- 	To a large extent  compatible with HP  Prolog, sold by  Hewlett-
	Packard Company.

- 	Comprehensive documentation.

The price of ZYX Macintosh Prolog is USD 575 and the product can be
ordered from:

	ZYX Sweden AB
	Styrmansgatan 6
	114 54 Stockholm
	Sweden
	Phone: + 46 - 8 - 65 32 05
	Fax  : + 46 - 8 - 67 48 31

	Net  : jeg@zyx.SE (uunet!mcvax!enea!zyx!jeg)
-- 
Dainis Millers, ZYX Sweden AB