proof.rb revision fcb456eeeba84f050e976c762ece740d3dda41ac
# The Proof class is not supposed to be stored in the database. Its purpose is
# to allow for an easy way to create proving commands in the RESTful manner.
# It is called Proof to comply with the ProofsController which in turn gets
# called on */proofs routes.
# This class prepares the proving procedure and creates the models which are
# presented in the UI (ProofAttempt).
if not_provers.any?
record.errors.add attribute, "#{not_provers} are not provers"
end
end
end
validates :prover_ids, provers: true
if: :timeout_present?
def initialize(opts, prove_asynchronously: true)
opts[:proof][:prover_ids] ||= []
@ontology = Ontology.find(opts[:ontology_id])
end
end
end
end
# HACK: Remove the empty string from params.
# Rails 4.2 introduces the html form option :include_hidden for this task.
end
end
@proof_obligation ||=
if opts[:theorem_id]
else
end
end
@provers = [nil] if @provers.blank?
end
end
@prove_options_list = @provers.map do |prover|
options[:axioms] = axioms if axioms.present?
options[:timeout] = timeout if timeout.present?
end
end
@options_to_attempts_hash = {}
@proof_attempts = []
end
end
end
if theorem?
else
end
end
end
end
end
# Sidekiq requires `perform` to be defined on an instance while we added a
# class method `perform_async` to force the usage of a specific queue.
else
end
end
end
end