Question - Asserted dynamic predicates don't save permanently, after creating new session they're missing. How to save them permanently?
I'm using
Tau Prolog: A Prolog interpreter in JavaScript.
I'm loading prolog code from in html file because I haven't succeded to load it from external pl file.
In .js file I'm using following code:
session = pl.create();
if(session){
session.consult( "baza.pl" );
//var query ="consult('baza.pl').";
//session.query( query );
//also consults this way
}
Then I later query that same session and insert new dynamic predicates with assertz. Everything is okay until I reload page (when new session makes there are only original predicates but no new ones).
I tried also
session.consult( "baza.pl" );
// consulting prolog code from external file but never succeeded.
var query ="load_dyn('baza.pl')";
//loads from internal script tag but not from external file
var query =":- use_module('baza.pl').";
// I think this didn't succeed anyway