proof_attempt.rb revision 5a102b3c56d4ac75632c7e9244ee0ce5bdbbf13a
3dd0679b6f24be0287cc42d7a60bbf59cdf8b637Timo Sirainen belongs_to :theorem, foreign_key: 'sentence_id'
3dd0679b6f24be0287cc42d7a60bbf59cdf8b637Timo Sirainen belongs_to :proof_attempt_configuration, dependent: :destroy
3dd0679b6f24be0287cc42d7a60bbf59cdf8b637Timo Sirainen has_one :axiom_selection, through: :proof_attempt_configuration
3dd0679b6f24be0287cc42d7a60bbf59cdf8b637Timo Sirainen has_many :generated_axioms, dependent: :destroy
3dd0679b6f24be0287cc42d7a60bbf59cdf8b637Timo Sirainen validates :state, inclusion: {in: State::STATES}
53a00f21e1af586498f94220038aa21fb3861b37Timo Sirainen self.proof_status ||= ProofStatus.find(ProofStatus::DEFAULT_OPEN_STATUS)
53a00f21e1af586498f94220038aa21fb3861b37Timo Sirainen "#{theorem.locid}#{sep}#{klass}-#{number}"
3dd0679b6f24be0287cc42d7a60bbf59cdf8b637Timo Sirainen ontology_version = theorem.ontology.current_version
3dd0679b6f24be0287cc42d7a60bbf59cdf8b637Timo Sirainen unless ontology_version.provers.include?(prover)
3dd0679b6f24be0287cc42d7a60bbf59cdf8b637Timo Sirainen ontology_version.save!
3dd0679b6f24be0287cc42d7a60bbf59cdf8b637Timo Sirainen def retry_failed
3dd0679b6f24be0287cc42d7a60bbf59cdf8b637Timo Sirainen ProofExecutionWorker.perform_async(id)
3dd0679b6f24be0287cc42d7a60bbf59cdf8b637Timo Sirainen def proper_subset_of_axioms_selected?
3dd0679b6f24be0287cc42d7a60bbf59cdf8b637Timo Sirainen selected = proof_attempt_configuration.axiom_selection.axioms
3dd0679b6f24be0287cc42d7a60bbf59cdf8b637Timo Sirainen available = theorem.ontology.axioms
3dd0679b6f24be0287cc42d7a60bbf59cdf8b637Timo Sirainen selected.any? && selected.count < available.count