Achieving compositionality of the stable model semantics for Smodels programs