Cross Reference: axiom_selection_proof_status_spec.rb
xref
: /
ontohub
/
spec
/
lib
/
axiom_selection_proof_status_spec.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
axiom_selection_proof_status_spec.rb revision 1f41235c9549cfe332cc93df708e2c7199a17c65
4136
N/A
require
'spec_helper'
4136
N/A
4136
N/A
describe
'Axiom Selection: Proof Status'
, :
http_interaction
do
4136
N/A
setup_hets
4136
N/A
stub_fqdn_and_port_for_pipeline_generator
4136
N/A
let
(:
generator
)
do
4136
N/A
FixturesGeneration
::
PipelineGenerator.new
4136
N/A
end
4136
N/A
4136
N/A
let
(:
user
)
{
create
:
user
}
4136
N/A
let
(:
repository
)
{
create
:
repository
}
4136
N/A
4136
N/A
let
(:
ontology_fixture_file
)
{ %w
(
prove
/
Simple_Implications
casl
)
}
4136
N/A
let
(:
ontology_filepath
)
{
ontology_fixture_file.join
(
'.'
)
}
4136
N/A
4136
N/A
before
{
stub_hets_for
(
ontology_filepath
)
}
4136
N/A
4136
N/A
let
(:
parent_ontology_version
)
do
4136
N/A
version
=
version_for_file
(
repository
,
4136
N/A
ontology_file
(*
ontology_fixture_file
)
)
5481
N/A
version.parse
4136
N/A
version
4136
N/A
end
4136
N/A
4136
N/A
let
(:
parent_ontology
)
{
parent_ontology_version.ontology
}
4136
N/A
4136
N/A
let
(:
ontology
)
do
4136
N/A
parent_ontology.children.find
_by_name
(
'Group'
)
4136
N/A
end
4136
N/A
let
(:
theorem
)
{
ontology.theorems.original.find
_by_name
(
'rightunit'
)
}
4136
N/A
let
(:
axioms
)
{
ontology.axioms
}
4136
N/A
4136
N/A
let
(:
prover
)
{
create
:
prover
}
4136
N/A
let
(:
status_disproven
)
{
create
:
proof_status_disproven
}
4136
N/A
let
(:
status_disproven_on_subset
)
{
create
:
proof_status_csas
}
4136
N/A
let
(:
status_proven
)
{
create
:
proof_status_proven
}
4136
N/A
4136
N/A
context
'all axioms'
do
4561
N/A
let
(:
axiom_selection
)
{
create
:
manual_axiom_selection
,
axioms
:
axioms
}
4561
N/A
let
(:
proof_attempt
)
do
4561
N/A
create
:
proof_attempt
,
theorem
:
theorem
,
prover
:
prover
4561
N/A
end
4561
N/A
let
!
(:
proof_attempt_configuration
)
do
4561
N/A
pac
=
proof_attempt.proof
_attempt_configuration
4561
N/A
pac.axiom
_selection
=
axiom_selection.axiom
_selection
4561
N/A
pac.prover
=
prover
4136
N/A
pac
4136
N/A
end
4136
N/A
5481
N/A
before
do
5481
N/A
generator.with
_cassette
(
generate_cassette_name
, :
hets_prove_uri
)
do
5481
N/A
ProofExecution.new
(
proof_attempt
)
.
call
5481
N/A
end
5481
N/A
end
5481
N/A
5481
N/A
it
'proven'
do
|
example
|
5481
N/A
expect
(
proof_attempt.reload.proof
_status
)
.
to
eq
(
status_proven
)
5481
N/A
end
5481
N/A
end
5481
N/A
5481
N/A
context
'no axioms (meaning all are used)'
do
5481
N/A
let
(:
axiom_selection
)
{
create
:
manual_axiom_selection
,
axioms
: [] }
4175
N/A
let
(:
proof_attempt
)
do
4175
N/A
create
:
proof_attempt
,
theorem
:
theorem
,
prover
:
prover
4175
N/A
end
4175
N/A
let
!
(:
proof_attempt_configuration
)
do
4175
N/A
pac
=
proof_attempt.proof
_attempt_configuration
4175
N/A
pac.axiom
_selection
=
axiom_selection.axiom
_selection
4175
N/A
pac.prover
=
prover
4175
N/A
pac
4175
N/A
end
4175
N/A
4175
N/A
before
do
4175
N/A
generator.with
_cassette
(
generate_cassette_name
, :
hets_prove_uri
)
do
4136
N/A
ProofExecution.new
(
proof_attempt
)
.
call
4136
N/A
end
4136
N/A
end
4136
N/A
4136
N/A
it
'proven'
do
|
example
|
4136
N/A
expect
(
proof_attempt.reload.proof
_status
)
.
to
eq
(
status_proven
)
4136
N/A
end
4136
N/A
end
4136
N/A
4136
N/A
context
'not sufficient axioms'
do
4136
N/A
let
(:
axiom_selection
)
do
4136
N/A
create
:
manual_axiom_selection
,
axioms
: [
axioms.first
]
4136
N/A
end
4136
N/A
let
(:
proof_attempt
)
do
4136
N/A
create
:
proof_attempt
,
theorem
:
theorem
,
prover
:
prover
4136
N/A
end
4136
N/A
let
!
(:
proof_attempt_configuration
)
do
4136
N/A
pac
=
proof_attempt.proof
_attempt_configuration
4136
N/A
pac.axiom
_selection
=
axiom_selection.axiom
_selection
4136
N/A
pac.prover
=
prover
4136
N/A
pac
4136
N/A
end
4136
N/A
4136
N/A
before
do
4136
N/A
generator.with
_cassette
(
generate_cassette_name
, :
hets_prove_uri
)
do
4136
N/A
ProofExecution.new
(
proof_attempt
)
.
call
4136
N/A
end
4136
N/A
end
4136
N/A
4136
N/A
it
'disproven on subset'
do
|
example
|
4136
N/A
expect
(
proof_attempt.reload.proof
_status
)
.
to
eq
(
status_disproven_on_subset
)
4136
N/A
end
4136
N/A
end
4136
N/A
end
4136
N/A