%----------------------------------------------
% File: store.pl
%----------------------------------------------

%% export all dyn data to archive files.

export_data_to_archive :- 

   tell('sim.out'),
   nl, write('\%File Name: sim.out'),nl,nl, 
   findall(Occ,
           (dyn(Occ), portray_clause(dyn(Occ)),nl ), 
           _),
   told,
   write('* System states are saved in file: sim.out'),nl. 


/* work - how to export data out in a form that I can take it in.
   1. use a list, 2. use underscrore (bad idea), 3. find a way
   to write out ' sign.

   work - compare two files - using unix commands !!

   work - when one needs to read back into the working memory,
          don't forget to add functor 'dyn'

export_data_to_archive.

L = 'this is', name(L, X).
X = [116,104,105,115,32,105,115], name(L, X).
L = "'".

% note that I can write a ' or a " sign as below !!

| ?- write('\'').
'
yes

*/



%------------- End of document -------------




