Cross Reference: proof_attempt.rb
xref
: /
ontohub
/
app
/
models
/
proof_attempt.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
proof_attempt.rb revision 54a1f4b81d3db8dae3af04f4200ed7e14bf2543b
883
N/A
class
ProofAttempt
<
ActiveRecord
::
Base
883
N/A
include
Numbering
883
N/A
883
N/A
numbering_parent_column
'sentence_id'
883
N/A
883
N/A
belongs_to
:
theorem
,
foreign_key
:
'sentence_id'
883
N/A
belongs_to
:
proof_status
883
N/A
belongs_to
:
prover
883
N/A
has_many
:
generated_axioms
,
dependent
: :
destroy
883
N/A
has_and_belongs_to_many
:
used_axioms
,
883
N/A
class_name
:
'Axiom'
,
883
N/A
association_foreign_key
:
'sentence_id'
,
883
N/A
join_table
:
'used_axioms_proof_attempts'
883
N/A
has_and_belongs_to_many
:
used_theorems
,
883
N/A
class_name
:
'Theorem'
,
883
N/A
association_foreign_key
:
'sentence_id'
,
883
N/A
join_table
:
'used_axioms_proof_attempts'
883
N/A
883
N/A
attr_accessible
:
prover_output
,
883
N/A
:
tactic_script
,
883
N/A
:
time_taken
,
883
N/A
:
number
883
N/A
883
N/A
validates
:
theorem
,
presence
:
true
883
N/A
883
N/A
after_save
:
update_theorem_status
883
N/A
883
N/A
scope
:
latest
,
order
(
'number DESC'
)
883
N/A
883
N/A
def
to_param
1273
N/A
number
883
N/A
end
883
N/A
883
N/A
def
used_sentences
883
N/A
@
used_sentences
||=
used_axioms
+
used_theorems
883
N/A
end
883
N/A
883
N/A
def
update_theorem_status
883
N/A
theorem.update
_proof_status
(
proof_status
)
883
N/A
end
883
N/A
883
N/A
def
associate_prover_with_ontology_version
883
N/A
ontology_version
=
theorem.ontology.current
_version
883
N/A
unless
ontology_version.provers.include
?
(
prover
)
883
N/A
ontology_version.provers
<< prover
883
N/A
ontology_version.save!
883
N/A
end
883
N/A
end
883
N/A
end
883
N/A