Query answering in resource-based answer set semantics