Prolog read_file_to_string/3 - prolog

When I call the function read_file_to_string/3 in prolog, why am I getting this error:
ERROR: toplevel: Undefined procedure: read_file_to_string/3(DWIM could not correct goal).
I have tried calling it from a file that successfully compiles, but I get the same error.
Thank you.

Related

Prolog natural language parser, Arguments are not sufficiently instantiated

i am trying to make a prolog language parser. when i go to load my script my get the error
ERROR: Arguments are not sufficiently instantiated
ERROR: In:
ERROR: [13] throw(error(instantiation_error,_1940))
ERROR: [7] <user>
ERROR:
ERROR: Note: some frames are missing due to last-call optimization.
ERROR: Re-run your program in debug mode (:- debug.) to get more detail.
my code is as follows
sentence(Sentence,sentence(np(Noun_Phrase),vp(Verb_Phrase))):-
np(Sentence,Noun_Phrase,Rem),
vp(Rem,Verb_Phrase,[]).
np([X|T],np(det(X),NP2),Rem):-
det(X),
np2(T,NP2,Rem).
np(Sentence,Parse,Rem):- np2(Sentence,Parse,Rem).
np(Sentence,np(NP,PP),Rem):-
np(Sentence,NP,Rem1),
pp(Rem1,PP,Rem).
np2([H|T],np2(noun(H)),T):- noun(H).
np2([H|T],np2(adj(H),Rest),Rem):- adj(H),np2(T,Rest,Rem).
pp([H|T],pp(prep(H),Parse),Rem):-
prep(H),
np(T,Parse,Rem).
vp([H|[]],verb(H),Rem):-
verb(H).
vp([H|Rest],vp(verb(H),RestParsed),Rem):-
verb(H),
pp(Rest,RestParsed).
vp([H|Rest],vp(verb(H),RestParsed),Rem):-
verb(H),
np(Rest,RestParsed).
det(the).
noun(cat).
noun(mat).
verb(sat).
prep(on).
adj(big).
adj(fat).
adj(comfy).
i have read through some of the other posts on this but im still not sure where i have gone wrong.
to check that np pp and vp work i am using the calls; np([the,cat,sat,on,the,mat],O,L). , pp([on,the,mat],P,L). and vp([the,cat,sat,on,the,mat],O,L).. one call the error ERROR: Undefined procedure: vp/3 (DWIM could not correct goal) appears, it is the same error for all 3 calls with the only difference being vp/3 is either np/3 or pp/3
the desired goal is to use the call sentence(some_sentence) and have the program output the results of np pp and vp.

how do i solve dompdf error?

I am using dopdf for my reports and on one of the reports it gives me this error:
Fatal error: Call to undefined method
Inline_Frame_Decorator::normalise() in
C:\xampp\htdocs\sraerca\system\helpers\dompdf\include\table_frame_decorator.cls.php
on line 252
But works fine with other reports.

Linux compile error: undefined reference to `kvm_arch_vcpu_runnable'

I want to call function kvm_arch_vcpu_runnable() in tick-sched.c, but got the following error:
/usr/src/linux-3.13.9/kernel/time/tick-sched.c:213: undefined reference to `kvm_arch_vcpu_runnable'
how can I fix this?
Just find definition of this function in kernel and use:
EXPORT_SYMBOL_GPL(kvm_arch_vcpu_runnable)
I hope it help.

Fatal error: Call to undefined method ModulesHelper::getActions()

When I create new module using Roksproket, I get:
Fatal error: Call to undefined method ModulesHelper::getActions() in C:\xampp\htdocs\pgocaribbeantv\administrator\components\com_roksprocket\views\module\view.html.php on line 139
What might the problem be?
This is a known issue with Joomla 3.2.2, the getActions function was meant to be depreciated and then removed.
https://github.com/joomla/joomla-cms/pull/3061
For now you can try upgrading RockSprocket as they added a release to work around the bug (see their changelog):
http://www.rockettheme.com/joomla/extensions/roksprocket

Prolog undefined procedure error?

just recently started learning Prolog, and I have NO idea why I'm getting this error.
This is the 'code' in the .pl file:
bigger(elephant, horse).
bigger(horse, donkey).
bigger(donkey, dog).
bigger(donkey, monkey).
isbigger(X, Y) :- bigger(X, Y).
isbigger(X, Y) :- bigger(X, Z),print(Z),print(’ ’) ,isbigger(Z, Y).
Whenever I attempt to check which animal is bigger I get this error:
1 ?- bigger(donkey, monkey).
ERROR: toplevel: Undefined procedure: bigger/2 (DWIM could not correct goal)
Any help please?
Thanks.
You need an assert I think:
assert(bigger(donkey, monkey)).
Just started today myself and this one took me a while to figure out.
Good luck!

Resources