I would like to know how to insert new facts into the knowledge base permanently. I know there is asserta () and assertz (), however they retain the facts within the knowledge base until the prolog process is completed.
For example I have a code where I ask for the data to be inserted as done by the console:
inserta_grupo:-write('Introduzca el nombre de la banda: '),read(B),write('introduzca los generos que toca: '),read(G),asserta(grupo(B,G)).
So that as a result in the knowledge base obtain for example:
grupo(red_hot_chilli_peppers,[rock,alt-rock]).