1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/*
* This file is part of the source code of the software program
* Vampire. It is protected by applicable
* copyright laws.
*
* This source code is distributed under the licence found here
* https://vprover.github.io/license.html
* and in the source directory
*/
/**
* @file Environment.hpp
* Defines an Environment used by the current prover.
*
* @since 06/05/2007 Manchester
*/
#ifndef __Environment__
#define __Environment__
#include "Forwards.hpp"
#include "Kernel/Problem.hpp"
#include "Lib/ProofExtra.hpp"
namespace Lib {
/**
* Class Environment.
* Implements environment used by the top-level run procedures.
*
* @since 06/05/2007 Manchester
*/
class Environment
{
public:
Environment();
~Environment();
/** options for the current proof attempt */
Shell::Options* options;
/** currently used signature */
Kernel::Signature* signature;
/** Term sharing structure */
Indexing::TermSharing* sharing;
/** Currently used statistics */
Shell::Statistics* statistics;
unsigned char maxSineLevel;
DHMap<unsigned, unsigned>* predicateSineLevels;
ProofExtra proofExtra;
/** Time remaining until the end of the time-limit in milliseconds */
int remainingTime() const;
/** set to true when coloring is used for symbol elimination or interpolation */
bool colorUsed;
/**
* A global way of accessing "the problem vampire is working on", mainly for checking its properties.
* Note that if in some special cases there is more than one Problem instance used at one time moment,
* one should know which is the main one and that one should be set/reset here.
*
* (In an ideal world, there would be no need for this function, as the correct Problem object would
* be explicitly passed to all the functions interested in knowing...)
*/
Kernel::Problem* getMainProblem() { return _problem; }
void setMainProblem(Kernel::Problem* p) {
_problem = p;
_higherOrder = _problem->isHigherOrder();
}
bool higherOrder() const {
return _higherOrder;
}
void setHigherOrder(bool value) {
_higherOrder = value;
}
private:
Kernel::Problem* _problem;
bool _higherOrder;
}; // class Environment
extern Environment env;
}
#endif