c4bdc37c9de27abfa1d5be18008953b32457e6c4Eugen Kuksaclass ProofAttemptConfiguration < ActiveRecord::Base
c4bdc37c9de27abfa1d5be18008953b32457e6c4Eugen Kuksa belongs_to :logic_mapping
8d4c6e7397e88fade190ad107583c30dc6b34afcEugen Kuksa belongs_to :prover
f9328b75002f0a5584b4ec930536fc43e5b56fdcEugen Kuksa belongs_to :axiom_selection
63499d8d12a219d26744bcb896789ea28459814fEugen Kuksa has_one :proof_attempt, dependent: :destroy
bb67f9b02f679071ac08d174531a03f325bc5327Eugen Kuksa has_one :theorem, through: :proof_attempt
c4bdc37c9de27abfa1d5be18008953b32457e6c4Eugen Kuksa # timeout in seconds
c4bdc37c9de27abfa1d5be18008953b32457e6c4Eugen Kuksa attr_accessible :timeout
8d4c6e7397e88fade190ad107583c30dc6b34afcEugen Kuksa
25f85f6174d2238cc1ea058fa129cb65961cf54aEugen Kuksa validates :proof_attempt, presence: true
8d4c6e7397e88fade190ad107583c30dc6b34afcEugen Kuksa
83e9a33dffce5818f636c7b045311cf122a34679Eugen Kuksa has_many :axioms, through: :axiom_selection
83e9a33dffce5818f636c7b045311cf122a34679Eugen Kuksa has_one :ontology, through: :proof_attempt
f9328b75002f0a5584b4ec930536fc43e5b56fdcEugen Kuksa
e0ae31a48b304a53c4280b5b3b50a6dfba6d448aEugen Kuksa def empty?
63499d8d12a219d26744bcb896789ea28459814fEugen Kuksa [logic_mapping, prover, timeout, axioms].all?(&:blank?)
e0ae31a48b304a53c4280b5b3b50a6dfba6d448aEugen Kuksa end
e0ae31a48b304a53c4280b5b3b50a6dfba6d448aEugen Kuksa
d1b9592add080035a1d8adf1e35e9af00ad6f1e1Eugen Kuksa def prove_options
d1b9592add080035a1d8adf1e35e9af00ad6f1e1Eugen Kuksa return @prove_options if @prove_options
d1b9592add080035a1d8adf1e35e9af00ad6f1e1Eugen Kuksa options = {}
d1b9592add080035a1d8adf1e35e9af00ad6f1e1Eugen Kuksa options[:prover] = prover if prover
d1b9592add080035a1d8adf1e35e9af00ad6f1e1Eugen Kuksa options[:timeout] = timeout if timeout
d1b9592add080035a1d8adf1e35e9af00ad6f1e1Eugen Kuksa options[:axioms] = axiom_selection.axioms if axiom_selection.axioms.any?
d1b9592add080035a1d8adf1e35e9af00ad6f1e1Eugen Kuksa @prove_options = Hets::ProveOptions.new(options)
d1b9592add080035a1d8adf1e35e9af00ad6f1e1Eugen Kuksa end
c4bdc37c9de27abfa1d5be18008953b32457e6c4Eugen Kuksaend