KP65
KP65

Reputation: 13585

Prolog instantiation error?

I'm stuck with some sort of error which i don't really understand in Prolog. I get this error when calling a rule(which seems to work sometimes?) :

error(instantiation_error,Var0)

Can anyone explain to me what this means?

so i have two rules:

special(X) :- user(X, Days), Days >= 20.

special(X) :- premiumuser(X).

user(guy, 40).

although user is added dynamically sometimes it is not in the Prolog db. I can eliminate the first special(x) rule and the error goes.

when call call:

special(someone).

I get the error

Upvotes: 1

Views: 4308

Answers (1)

Kilian Foth
Kilian Foth

Reputation: 14386

It means you have applied a functor which only works with atoms (e.g., <) to an uninstantiated variable. You need to post minimal code that demonstrates the problem before we can tell you any more.

Upvotes: 0

Related Questions