In Prolog, data and program both are implemented as the bunch of trees. There is no difference between a rule that causes operations to happen and a rule that just gives back a data value.