It needs this .js file, invoke from a HTML file:
https://wasm.swi-prolog.org/wasm/swipl-bundle.js
The Prolog code to let the swipl bundle digest:
cd /PeTTa/src cat *.pl > PETTA echo "metta(I) :- process_metta_string(I,O), swrite(O,S), format("Result: ~w~n",[S])." >> PETTA
Then in Javascript: Prolog.query('metta("YOUR_METTA_CODE").').once()
Prolog.query('metta("YOUR_METTA_CODE").').once()
pettaweb_v1.0.1.zip
Examples:
PLN Tuffy
friends.metta
There was an error while loading. Please reload this page.