summaryrefslogtreecommitdiff
path: root/src/theory/fp/fp_converter.h
diff options
context:
space:
mode:
authorAina Niemetz <aina.niemetz@gmail.com>2020-11-30 15:26:33 -0800
committerGitHub <noreply@github.com>2020-11-30 15:26:33 -0800
commite7924fc22d220909c1b3eb0e41a1cdb624a69be7 (patch)
tree5f0b6444ca0b9b2a677365ee546655fa84c64bfe /src/theory/fp/fp_converter.h
parent32f8874353e12f273212d153091f084617faea2e (diff)
fp_converter: Properly separate out symbolic glue code. (#5501)
File fp_converter.h encapsulates the symbolic glue code for symFPU and implements the actual word-blaster (class FpConverter). This header should not be included in any other headers in order to no pull in symFPU headers where it's not needed. However, it was included in src/theory/fp/theory_fp.h. This properly separates it out and does some clean up in TheoryFP, which still needs more love to conform to code style guidelines, and also more documentation. More love and documentation is postponed to future PRs to make reviewing easier.
Diffstat (limited to 'src/theory/fp/fp_converter.h')
-rw-r--r--src/theory/fp/fp_converter.h31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/theory/fp/fp_converter.h b/src/theory/fp/fp_converter.h
index e48d651bd..6688e8607 100644
--- a/src/theory/fp/fp_converter.h
+++ b/src/theory/fp/fp_converter.h
@@ -14,6 +14,8 @@
** Uses the symfpu library to convert from floating-point operations to
** bit-vectors and propositions allowing the theory to be solved by
** 'bit-blasting'.
+ **
+ ** !!! This header is not to be included in any other headers !!!
**/
#include "cvc4_private.h"
@@ -49,10 +51,6 @@ namespace CVC4 {
namespace theory {
namespace fp {
-typedef PairHashFunction<TypeNode, TypeNode, TypeNodeHashFunction,
- TypeNodeHashFunction>
- PairTypeNodeHashFunction;
-
/**
* This is a symfpu symbolic "back-end". It allows the library to be used to
* construct bit-vector expressions that compute floating-point operations.
@@ -302,6 +300,20 @@ class floatingPointTypeInfo : public FloatingPointSize
*/
class FpConverter
{
+ public:
+ /** Constructor. */
+ FpConverter(context::UserContext*);
+ /** Destructor. */
+ ~FpConverter();
+
+ /** Adds a node to the conversion, returns the converted node */
+ Node convert(TNode);
+
+ /** Gives the node representing the value of a given variable */
+ Node getValue(Valuation&, TNode);
+
+ context::CDList<Node> d_additionalAssertions;
+
protected:
#ifdef CVC4_USE_SYMFPU
typedef symfpuSymbolic::traits traits;
@@ -338,17 +350,6 @@ class FpConverter
/* Creates the relevant components for a variable */
uf buildComponents(TNode current);
#endif
-
- public:
- context::CDList<Node> d_additionalAssertions;
-
- FpConverter(context::UserContext *);
-
- /** Adds a node to the conversion, returns the converted node */
- Node convert(TNode);
-
- /** Gives the node representing the value of a given variable */
- Node getValue(Valuation &, TNode);
};
} // namespace fp
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback