Cross Reference: proof_attempt_configuration.rb
xref
: /
ontohub
/
app
/
models
/
proof_attempt_configuration.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
proof_attempt_configuration.rb revision d1b9592add080035a1d8adf1e35e9af00ad6f1e1
200
N/A
class
ProofAttemptConfiguration
<
ActiveRecord
::
Base
200
N/A
include
Numbering
200
N/A
numbering_parent_column
'ontology_id'
200
N/A
200
N/A
belongs_to
:
logic_mapping
200
N/A
belongs_to
:
prover
200
N/A
belongs_to
:
ontology
200
N/A
belongs_to
:
axiom_selection
200
N/A
has_many
:
proof_attempts
,
dependent
: :
destroy
200
N/A
has_and_belongs_to_many
:
goals
,
200
N/A
class_name
:
'Theorem'
,
200
N/A
association_foreign_key
:
'sentence_id'
,
200
N/A
join_table
:
'goals_proof_attempt_configurations'
200
N/A
# timeout in seconds
200
N/A
attr_accessible
:
timeout
200
N/A
attr_accessible
:
locid
200
N/A
200
N/A
validates
:
ontology
,
presence
:
true
200
N/A
before_create
:
generate_locid
200
N/A
200
N/A
delegate
:
axioms
,
to
: :
axiom_selection
200
N/A
814
N/A
def
empty
?
200
N/A
[
logic_mapping
,
prover
,
timeout
,
axioms
,
goals
].
all
?
(&:
blank
?)
200
N/A
end
200
N/A
200
N/A
def
prove_options
814
N/A
return
@
prove_options
if
@
prove_options
206
N/A
options
= {}
200
N/A
options
[:
prover
] =
prover
if
prover
200
N/A
options
[:
timeout
] =
timeout
if
timeout
618
N/A
options
[:
axioms
] =
axiom_selection.axioms
if
axiom_selection.axioms.any
?
200
N/A
@
prove_options
=
Hets
::
ProveOptions.new
(
options
)
200
N/A
end
200
N/A
206
N/A
protected
200
N/A
200
N/A
def
self.find
_with_locid
(
locid
,
_iri
=
nil
)
200
N/A
where
(
locid
:
locid
)
.
first
200
N/A
end
200
N/A
200
N/A
def
generate_locid
200
N/A
# It's possible that the database columns `locid` and `number` have not yet
200
N/A
# been created.
200
N/A
if
respond_to
?
(:
locid
)
&&
respond_to
?
(:
number
)
200
N/A
self.locid
=
206
N/A
"#{
ontology.locid
}//#{
self.class.to_s.underscore.dasherize
}-#{number}"
200
N/A
end
200
N/A
end
206
N/A
end
206
N/A