When trying to load my file Tutorial_2 which is using DCG to count how many zero's are in a sentence or 1s and 0s ending with a 2.
When I try and load the process I get a arguments are not sufficiently instantiated for the prolog SWI init file:
[debug] ?- [Tutorial_2].
ERROR: Arguments are not sufficiently instantiated
ERROR: In:
ERROR: [15] throw(error(instantiation_error,_12554))
ERROR: [14] '$instantiation_error'(_12578) at c:/program files/swipl/boot/init.pl:3608
ERROR: [13] '$load_files'(_12602,user,[expand(true)]) at c:/program files/swipl/boot/init.pl:1946
ERROR: [12] load_files(user:_12648,[expand(true)]) at c:/program files/swipl/boot/init.pl:1941
ERROR: [11] consult(user:_12688) at c:/program files/swipl/boot/init.pl:1930
ERROR: [10] [user:_12720] at c:/program files/swipl/boot/init.pl:1918
ERROR: [9] <user>
The file is there and has not been edited since I installed prolog 3 months ago.
Tutorial_2
is a variable (hence the instantiation error) but the Prolog top-level shortcut for consulting a file takes a ground term. As Tutorial_2
starts with an uppercase letter, to make it an atom, write it between single quotes:
?- ['Tutorial_2'].