A decidable subclass of finitary programs