Your program contains no variables, only constants, here in the form of atoms (all-lowercase letter strings)
The error:
ERROR: Unknown procedure: scales/1
ERROR: In:
ERROR: [12] scales(present)
ERROR: [11] species(reptile) at user://1:8
ERROR: [10] animal(alligator) at user://1:13
ERROR: [9] toplevel_call(user:user: ...)
The interpreter is looking for the predicate scales/1 to call with argument present. There is no such predicate (no fact or rule named that way can be found).
It is also not clear what your program is supposed to do.
You may want to express this:
"Typing" facts about certain atoms (these are often less useful than one would think.
animal(alligator). % alligator is an animal
species(reptile). % reptile is a species
color(dark_green). % dark_green is a color
habitat(water). % water is a habitat
Attributes of the thing designated by alligator:
species(alligator,reptile). % species of alligator is reptile
color(alligator,dark_green) % color of alligator is dark_green
habitat(alligator,water). % habitat of alligator is water
Attributes of the thing designated by species:
surface(reptile,scales).
body_temperature(reptile,cold_blooded),
reproduction(reptile,lays_eggs).
Prolog's ability to model objects properly is a bit anaemic. The lack of the basically useful data structure "map" doesn't help. (Is Prolog the "assembler of ontologies"? Yes it is!)
Reptile, notreptile. - Paulo Moura