Reflective Agents in Metalogic Programming