A Formal Model for Artifact-Based Environments in MAS Programming