Arity Prolog database 
Author Message
 Arity Prolog database

I want to share one database (.idb) among many executable files generated
by the apc.
Is it possible?
How can I do it?
I am using the Arity Prolog 6.1 (1992) for DOS (16 bits).
If anyone knows the answer, please contact me.
I tried to compile the file using
apc teste.ari /Fdanotherdatabase
The compilation was OK, but the execution failed.



Sat, 17 Jul 1999 03:00:00 GMT  
 Arity Prolog database

Quote:

> I want to share one database (.idb) among many executable files generated
> by the apc.
> Is it possible?
> How can I do it?
> I am using the Arity Prolog 6.1 (1992) for DOS (16 bits).
> If anyone knows the answer, please contact me.
> I tried to compile the file using
> apc teste.ari /Fdanotherdatabase
> The compilation was OK, but the execution failed.

The general answer to your question is 'no' if you are using version 6
(the 16 bit version) of the Arity compiler, although there is an
inconvenient way to overcome this (see below).

When you compile an Arity program the new atoms encountered in the
program are added to the atom table contained in the idb file used
during the compilation.  These atoms' internal index values are bound to
the values created in the executable file.  Different executable files
therefore would not be able to reliably use that idb file (unless these
executable files do not define new atoms in their source programs).

The way to overcome this is as follows:
Assume you need to create two executable programs, A and B, both of
which have to share the same idb file.  Compile A with the initial idb
file, and create the resultant idb file, share.idb  say.  Now compile B
with the same share.idb (not any other idb file) so that share.idb will
not only work for B, but continue to work for A.  Note that any future
changes to programs A and B must be compiled with share.idb consistently
if you want share.idb to always work with both A and B at the same time.
The strategy is to ensure that share.idb contains a superset of all new
atoms in programs A and B, in such a way that the indices of the new
atoms from A do not clash with those of B.

If you are using the new 32 bit version (APC32), then the idb file can
be shared with other executables without going through all this bother.

Seet Chern Hway
Information Technology Institute
Singapore



Fri, 23 Jul 1999 03:00:00 GMT  
 Arity Prolog database

Quote:

> I want to share one database (.idb) among many executable files generated
> by the apc.
> Is it possible?
> How can I do it?
> I am using the Arity Prolog 6.1 (1992) for DOS (16 bits).
> If anyone knows the answer, please contact me.
> I tried to compile the file using
> apc teste.ari /Fdanotherdatabase
> The compilation was OK, but the execution failed.

With Arity/Prolog32 it just works.

With Arity/Prolog it takes a bit of doing.

First, all the applications must be compiled through the
same database, as you have done.

Then, each application must be told to use the database
that was specified in the compile.  That is usually done
with an environment file, named something like
myapp.env.  You just include the line:

DATABASE=anotherdatabase.idb

-Paul Weiss
-Arity



Sun, 01 Aug 1999 03:00:00 GMT  
 Arity Prolog database

Some years ago I have used Arity Prolog 5.0x for DOS (286-machine).
But it does not works at 486-based PC. The interpriter (arity.exe)
loads and halts ! Why ? What's happens ?



Mon, 09 Aug 1999 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Database in Arity Prolog.

2. Request:reviews of Prolog (Arity,IF-Prolog)

3. Request:reviews of Prolog (Arity, IF-Prolog)

4. Contacts for ALS PROLOG and ARITY PROLOG wanted.

5. Problems linking Arity/Prolog & VisualC++

6. Arity Prolog Vs Visual C++

7. How to link arity prolog files ??

8. What happened to ARITY-Prolog?

9. Cnnections between Arity Prolog and C++

10. Simulation with Arity Prolog

11. Arity-Prolog

12. Arity prolog - help needed!!

 

 
Powered by phpBB® Forum Software