[gringo] 06/11: debian/patches: drop various upstream applied patches

Thomas Krennwallner tkren-guest at moszumanska.debian.org
Wed Nov 1 16:16:05 UTC 2017


This is an automated email from the git hooks/post-receive script.

tkren-guest pushed a commit to branch devel
in repository gringo.

commit 4407c8da2f67dea5b85e508ed0631bc0dae3329b
Author: Thomas Krennwallner <tkren at kr.tuwien.ac.at>
Date:   Wed Nov 1 08:58:50 2017 +0000

    debian/patches: drop various upstream applied patches
    
    - gringo-alpha-fpu-getcw.patch
    - gringo-broken-std-exception_ptr.patch
    - gringo-fix-body-literals-as-auxiliary.patch
    - reproducible-build.patch
---
 debian/patches/gringo-alpha-fpu-getcw.patch        |  23 --
 .../patches/gringo-broken-std-exception_ptr.patch  | 179 ------------
 .../gringo-fix-body-literals-as-auxiliary.patch    | 302 ---------------------
 debian/patches/reproducible-build.patch            |  24 --
 debian/patches/series                              |   4 -
 5 files changed, 532 deletions(-)

diff --git a/debian/patches/gringo-alpha-fpu-getcw.patch b/debian/patches/gringo-alpha-fpu-getcw.patch
deleted file mode 100644
index d8cf944..0000000
--- a/debian/patches/gringo-alpha-fpu-getcw.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From: Thomas Krennwallner <tkren at kr.tuwien.ac.at>
-Date: Sat, 17 Dec 2016 07:27:31 +0100
-Subject: alpha FTBFS: _FPU_GETCW is undefined
-Forwarded: https://github.com/potassco/clasp/pull/3
-
-===================================================================
----
- app/clingo/src/clasp/clasp_app.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/app/clingo/src/clasp/clasp_app.cpp b/app/clingo/src/clasp/clasp_app.cpp
-index 31f2b70..cb4294e 100644
---- a/app/clingo/src/clasp/clasp_app.cpp
-+++ b/app/clingo/src/clasp/clasp_app.cpp
-@@ -32,7 +32,7 @@
- #endif
- #include <clasp/clause.h>
- 
--#if defined( __linux__ )
-+#if defined( __linux__ ) && !defined(__alpha__)
- #include <fpu_control.h>
- #if defined(_FPU_EXTENDED) && defined(_FPU_SINGLE) && defined(_FPU_DOUBLE)
- #define FPU_SWITCH_DOUBLE(oldW) _FPU_GETCW(oldW);\
diff --git a/debian/patches/gringo-broken-std-exception_ptr.patch b/debian/patches/gringo-broken-std-exception_ptr.patch
deleted file mode 100644
index e852a89..0000000
--- a/debian/patches/gringo-broken-std-exception_ptr.patch
+++ /dev/null
@@ -1,179 +0,0 @@
-From: Thomas Krennwallner <tkren at kr.tuwien.ac.at>
-Date: Wed, 14 Dec 2016 08:37:15 +0100
-Subject: add support for architectures with broken std::exception_ptr
- std::exception_ptr is currently not supported on armel, see libstdc++
- bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58938
-Forwarded: not-needed
-
-===================================================================
----
- libgringo/gringo/control.hh | 22 +++++++++++++++++++++-
- libgringo/src/control.cc    | 39 ++++++++++++++++++++++++++++++++-------
- 2 files changed, 53 insertions(+), 8 deletions(-)
-
-diff --git a/libgringo/gringo/control.hh b/libgringo/gringo/control.hh
-index 6338d6f..197eb1e 100644
---- a/libgringo/gringo/control.hh
-+++ b/libgringo/gringo/control.hh
-@@ -270,11 +270,31 @@ void inline clingo_expect(bool expr) {
-     if (!expr) { throw std::runtime_error("unexpected"); }
- }
- 
--void handleCError(bool ret, std::exception_ptr *exc = nullptr);
-+#ifndef BROKEN_STD_EXCEPTION_PTR
-+typedef std::exception_ptr clingo_exception_holder_t;
- void handleCXXError();
-+#else
-+typedef std::shared_ptr<std::string> clingo_exception_holder_t;
-+void handleCXXError(const char *what, clingo_error_t err);
-+#endif
-+
-+void handleCError(bool ret, clingo_exception_holder_t *exc = nullptr);
- 
- #define GRINGO_CLINGO_TRY try
-+
-+#ifndef BROKEN_STD_EXCEPTION_PTR
- #define GRINGO_CLINGO_CATCH catch (...) { Gringo::handleCXXError(); return false; } return true
-+#else
-+#define GRINGO_CLINGO_CATCH \
-+    catch (Gringo::GringoError const &e)       { Gringo::handleCXXError(e.what(), clingo_error_runtime); return false; } \
-+    catch (Gringo::ClingoError const &e)       { return false; } \
-+    catch (Gringo::MessageLimitError const &e) { Gringo::handleCXXError(e.what(), clingo_error_runtime); return false; } \
-+    catch (std::bad_alloc const &e)            { Gringo::handleCXXError(e.what(), clingo_error_bad_alloc); return false; } \
-+    catch (std::runtime_error const &e)        { Gringo::handleCXXError(e.what(), clingo_error_runtime); return false; } \
-+    catch (std::logic_error const &e)          { Gringo::handleCXXError(e.what(), clingo_error_logic); return false; } \
-+    catch (...)                                { Gringo::handleCXXError("", clingo_error_unknown); return false; } \
-+    return true
-+#endif
- 
- // }}}1
- 
-diff --git a/libgringo/src/control.cc b/libgringo/src/control.cc
-index 67c6691..384f3cb 100644
---- a/libgringo/src/control.cc
-+++ b/libgringo/src/control.cc
-@@ -72,18 +72,18 @@ void print(char *ret, size_t n, F f) {
- }
- 
- #ifndef GRINGO_NO_THREAD_LOCAL
--    thread_local std::exception_ptr g_lastException;
-+    thread_local clingo_exception_holder_t g_lastException;
-     thread_local std::string g_lastMessage;
-     thread_local clingo_error_t g_lastCode;
- #else
-     struct TLData {
--        std::exception_ptr lastException;
-+        clingo_exception_holder_t lastException;
-         std::string lastMessage;
-         clingo_error_t lastCode;
-     };
-     std::mutex g_tLMut;
-     std::unordered_map<std::thread::id, TLData> g_tLData;
--    std::exception_ptr &tLlastException() {
-+    clingo_exception_holder_t &tLlastException() {
-         std::lock_guard<std::mutex> lock(g_tLMut);
-         return g_tLData[std::this_thread::get_id()].lastException;
-     }
-@@ -102,9 +102,13 @@ void print(char *ret, size_t n, F f) {
- 
- } // namespace
- 
--void handleCError(bool ret, std::exception_ptr *exc) {
-+void handleCError(bool ret, clingo_exception_holder_t *exc) {
-     if (!ret) {
-+#ifndef BROKEN_STD_EXCEPTION_PTR
-         if (exc && *exc) { std::rethrow_exception(*exc); }
-+#else
-+        if (exc && *exc) { throw std::runtime_error(**exc); }
-+#endif
-         char const *msg = clingo_error_message();
-         if (!msg) { msg = "no message"; }
-         switch (static_cast<clingo_error>(clingo_error_code())) {
-@@ -117,6 +121,7 @@ void handleCError(bool ret, std::exception_ptr *exc) {
-     }
- }
- 
-+#ifndef BROKEN_STD_EXCEPTION_PTR
- void handleCXXError() {
-     try { throw; }
-     catch (Gringo::GringoError const &)       { g_lastException = std::current_exception(); g_lastCode = clingo_error_runtime; return; }
-@@ -130,6 +135,12 @@ void handleCXXError() {
-     catch (std::logic_error const &)          { g_lastException = std::current_exception(); g_lastCode = clingo_error_logic; return; }
-     g_lastCode = clingo_error_unknown;
- }
-+#else
-+void handleCXXError(const char *what, clingo_error_t err) {
-+    g_lastException = clingo_exception_holder_t(new std::string(what));
-+    g_lastCode = err;
-+}
-+#endif
- 
- // }}}1
- 
-@@ -261,7 +272,12 @@ SymbolType Symbol::type() const {
- }
- 
- #define CLINGO_CALLBACK_TRY try
-+
-+#ifndef BROKEN_STD_EXCEPTION_PTR
- #define CLINGO_CALLBACK_CATCH(ref) catch (...){ (ref) = std::current_exception(); return false; } return true
-+#else
-+#define CLINGO_CALLBACK_CATCH(ref) catch (std::exception &e){ (ref) = clingo_exception_holder_t(new std::string(e.what())); return false; } return true
-+#endif
- 
- std::string Symbol::to_string() const {
-     return ::to_string(clingo_symbol_to_string_size, clingo_symbol_to_string, sym_);
-@@ -1588,7 +1604,7 @@ void Control::add(char const *name, StringSpan params, char const *part) {
- }
- 
- void Control::ground(PartSpan parts, GroundCallback cb) {
--    using Data = std::pair<GroundCallback&, std::exception_ptr>;
-+    using Data = std::pair<GroundCallback&, clingo_exception_holder_t>;
-     Data data(cb, nullptr);
-     handleCError(clingo_control_ground(*impl_, reinterpret_cast<clingo_part_t const *>(parts.begin()), parts.size(),
-         [](clingo_location_t loc, char const *name, clingo_symbol_t const *args, size_t n, void *data, clingo_symbol_callback_t *cb, void *cbdata) -> bool {
-@@ -1612,7 +1628,7 @@ clingo_control_t *Control::to_c() const { return *impl_; }
- 
- SolveResult Control::solve(ModelCallback mh, SymbolicLiteralSpan assumptions) {
-     clingo_solve_result_bitset_t ret;
--    using Data = std::pair<ModelCallback&, std::exception_ptr>;
-+    using Data = std::pair<ModelCallback&, clingo_exception_holder_t>;
-     Data data(mh, nullptr);
-     handleCError(clingo_control_solve(*impl_, [](clingo_model_t *m, void *data, bool *ret) -> bool {
-         auto &d = *static_cast<Data*>(data);
-@@ -2590,7 +2606,7 @@ std::ostream &operator<<(std::ostream &out, Statement const &x) {
- } // namespace AST
- 
- void parse_program(char const *program, StatementCallback cb, Logger logger, unsigned message_limit) {
--    using Data = std::pair<StatementCallback &, std::exception_ptr>;
-+    using Data = std::pair<StatementCallback &, clingo_exception_holder_t>;
-     Data data(cb, nullptr);
-     handleCError(clingo_parse_program(program, [](clingo_ast_statement_t const *stm, void *data) -> bool {
-         auto &d = *static_cast<Data*>(data);
-@@ -2612,17 +2628,26 @@ void parse_program(char const *program, StatementCallback cb, Logger logger, uns
- 
- extern "C" void clingo_set_error(clingo_error_t code, char const *message) {
-     g_lastCode = code;
-+#ifndef BROKEN_STD_EXCEPTION_PTR
-     try         { g_lastException = std::make_exception_ptr(std::runtime_error(message)); }
-+#else
-+    try         { g_lastException = clingo_exception_holder_t(new std::string(message)); }
-+#endif
-     catch (...) { g_lastException = nullptr; }
- }
- extern "C" char const *clingo_error_message() {
-     if (g_lastException) {
-+#ifndef BROKEN_STD_EXCEPTION_PTR
-         try { std::rethrow_exception(g_lastException); }
-         catch (std::bad_alloc const &) { return "bad_alloc"; }
-         catch (std::exception const &e) {
-             g_lastMessage = e.what();
-             return g_lastMessage.c_str();
-         }
-+#else
-+	g_lastMessage = *g_lastException;
-+	return g_lastMessage.c_str();
-+#endif
-     }
-     return nullptr;
- }
diff --git a/debian/patches/gringo-fix-body-literals-as-auxiliary.patch b/debian/patches/gringo-fix-body-literals-as-auxiliary.patch
deleted file mode 100644
index a3ce644..0000000
--- a/debian/patches/gringo-fix-body-literals-as-auxiliary.patch
+++ /dev/null
@@ -1,302 +0,0 @@
-From: Roland Kaminski <kaminski at cs.uni-potsdam.de>
-Date: Wed, 16 Nov 2016 12:12:52 +0100
-Subject: bugfix: correctly mark body literals as auxiliary in all cases
-Origin: upstream, https://github.com/potassco/clingo/commit/d6cfb89df6bbf138ca3e259d71ca7050b322b5d5
-Bug: https://sourceforge.net/p/potassco/mailman/message/35493632/
-
----
- app/clingo/tests/lp/aggregates.lp       | 38 +++++++++++++++++++++++++++++++++
- app/clingo/tests/lp/aggregates.sol      |  2 ++
- libgringo/gringo/ground/statements.hh   | 20 ++++++++++-------
- libgringo/src/ground/statements.cc      | 20 ++++++++++-------
- libgringo/src/input/aggregates.cc       | 16 +++++++-------
- libgringo/tests/ground/instantiation.cc |  8 +++++++
- 6 files changed, 80 insertions(+), 24 deletions(-)
- create mode 100644 app/clingo/tests/lp/aggregates.lp
- create mode 100644 app/clingo/tests/lp/aggregates.sol
-
-diff --git a/app/clingo/tests/lp/aggregates.lp b/app/clingo/tests/lp/aggregates.lp
-new file mode 100644
-index 0000000..40d6748
---- /dev/null
-+++ b/app/clingo/tests/lp/aggregates.lp
-@@ -0,0 +1,38 @@
-+arg(s3). sat(s3):-ass(s3,Y_s3),lt(Y_s3,Z_s3),V_t_0=0, V_3_1=-V_t_0, V_t_2=0, V_2_1=-2*V_t_2+V_3_1, dom(V_t_3), V_t_3 #sum{Z_s3,s3}V_t_3, V_1_1=1*V_t_3+V_2_1, V_t_4=0, V_0_1=2*V_t_4+V_1_1, dom(V_1), V_1 #sum{1:V_0_1>0} V_1, V_1=1.
-+inv(s3):-ass(s3,Y_s3),lt(Y_s3,Z_s3),V_t_0=0, V_3_1=-V_t_0, V_t_2=0, V_2_1=-2*V_t_2+V_3_1, dom(V_t_3), V_t_3 #sum{Z_s3,s3} V_t_3, V_1_1=1*V_t_3+V_2_1, V_t_4=0, V_0_1=2*V_t_4+V_1_1, dom(V_1), V_1 #sum{1:V_0_1>0}V_1, V_1=0.
-+sattwo(s3):-asstwo(s3,Y_s3),lt(Y_s3,Z_s3),V_t_0=0, V_3_1=-V_t_0, V_t_2=0, V_2_1=-2*V_t_2+V_3_1, dom(V_t_3), V_t_3#sum{Z_s3,s3}V_t_3, V_1_1=1*V_t_3+V_2_1, V_t_4=0, V_0_1=2*V_t_4+V_1_1, dom(V_1), V_1 #sum{1:V_0_1>0}V_1, V_1=1.
-+invtwo(s3):-asstwo(s3,Y_s3),lt(Y_s3,Z_s3),V_t_0=0, V_3_1=-V_t_0, V_t_2=0, V_2_1=-2*V_t_2+V_3_1, dom(V_t_3), V_t_3#sum{Z_s3,s3}V_t_3, V_1_1=1*V_t_3+V_2_1, V_t_4=0, V_0_1=2*V_t_4+V_1_1, dom(V_1), V_1 #sum{1:V_0_1>0}V_1, V_1=0.
-+arg(s2).
-+sat(s2):-V_t_5=0, V_3_6=-V_t_5, V_t_7=0, V_2_6=-2*V_t_7+V_3_6, V_t_8=0, V_1_6=1*V_t_8+V_2_6, V_t_9=0, V_0_6=2*V_t_9+V_1_6, dom(V_6), V_6#sum{1:V_0_6>0}V_6, V_6=1.
-+inv(s2):-V_t_5=0, V_3_6=-V_t_5, V_t_7=0, V_2_6=-2*V_t_7+V_3_6, V_t_8=0, V_1_6=1*V_t_8+V_2_6, V_t_9=0, V_0_6=2*V_t_9+V_1_6, dom(V_6), V_6#sum{1:V_0_6>0}V_6, V_6=0.
-+sattwo(s2):-V_t_5=0, V_3_6=-V_t_5, V_t_7=0, V_2_6=-2*V_t_7+V_3_6, V_t_8=0, V_1_6=1*V_t_8+V_2_6, V_t_9=0, V_0_6=2*V_t_9+V_1_6, dom(V_6), V_6#sum{1:V_0_6>0}V_6, V_6=1.
-+invtwo(s2):-V_t_5=0, V_3_6=-V_t_5, V_t_7=0, V_2_6=-2*V_t_7+V_3_6, V_t_8=0, V_1_6=1*V_t_8+V_2_6, V_t_9=0, V_0_6=2*V_t_9+V_1_6, dom(V_6), V_6#sum{1:V_0_6>0}V_6, V_6=0.
-+arg(s1).
-+sat(s1):-ass(s2,Y_s2),lt(Y_s2,Z_s2),ass(s3,Y_s3),lt(Y_s3,Z_s3),dom(V_t_10), V_t_10#sum{Z_s2,s2}V_t_10, V_3_11=-V_t_10, V_t_12=0, V_2_11=-2*V_t_12+V_3_11, dom(V_t_13), V_t_13 #sum{Z_s3,s3}V_t_13, V_1_11=1*V_t_13+V_2_11, V_t_14=0, V_0_11=2*V_t_14+V_1_11, dom(V_11), V_11#sum{1:V_0_11>0}V_11, V_11=1.
-+inv(s1):-ass(s2,Y_s2),lt(Y_s2,Z_s2),ass(s3,Y_s3),lt(Y_s3,Z_s3),dom(V_t_10), V_t_10#sum{Z_s2,s2}V_t_10, V_3_11=-V_t_10, V_t_12=0, V_2_11=-2*V_t_12+V_3_11, dom(V_t_13), V_t_13 #sum{Z_s3,s3}V_t_13, V_1_11=1*V_t_13+V_2_11, V_t_14=0, V_0_11=2*V_t_14+V_1_11, dom(V_11), V_11#sum{1:V_0_11>0}V_11, V_11=0.
-+sattwo(s1):-asstwo(s2,Y_s2),lt(Y_s2,Z_s2),asstwo(s3,Y_s3),lt(Y_s3,Z_s3),dom(V_t_10), V_t_10#sum{Z_s2,s2}V_t_10, V_3_11=-V_t_10, V_t_12=0, V_2_11=-2*V_t_12+V_3_11, dom(V_t_13), V_t_13#sum{Z_s3,s3}V_t_13, V_1_11=1*V_t_13+V_2_11, V_t_14=0, V_0_11=2*V_t_14+V_1_11, dom(V_11), V_11#sum{1:V_0_11>0}V_11, V_11=1.
-+invtwo(s1):-asstwo(s2,Y_s2),lt(Y_s2,Z_s2),asstwo(s3,Y_s3),lt(Y_s3,Z_s3),dom(V_t_10), V_t_10#sum{Z_s2,s2}V_t_10, V_3_11=-V_t_10, V_t_12=0, V_2_11=-2*V_t_12+V_3_11, dom(V_t_13), V_t_13#sum{Z_s3,s3}V_t_13, V_1_11=1*V_t_13+V_2_11, V_t_14=0, V_0_11=2*V_t_14+V_1_11, dom(V_11), V_11#sum{1:V_0_11>0}V_11, V_11=0.
-+saturate:-ass(s3,X_1),asstwo(s3,X_1),ass(s2,X_2),asstwo(s2,X_2),ass(s1,X_3),asstwo(s1,X_3).
-+dom(0..1).
-+lt(u,0).lt(u,1).lt(1,1).lt(0,0).
-+ass(S,0):-not ass(S,1),not ass(S,u),arg(S).
-+ass(S,1):-not ass(S,u),not ass(S,0),arg(S).
-+ass(S,u):-not ass(S,0),not ass(S,1),arg(S).
-+:-arg(S),ass(S,1),inv(S).
-+:-arg(S),ass(S,0),sat(S).
-+asstwo(S,0):-ass(S,0).
-+asstwo(S,1):-ass(S,1).
-+asstwo(S,0)|asstwo(S,1)|asstwo(S,u):-ass(S,u).
-+saturate:-arg(S),asstwo(S,1),invtwo(S).
-+saturate:-arg(S),asstwo(S,0),sattwo(S).
-+asstwo(S,0):-arg(S),ass(S,u),saturate.
-+asstwo(S,1):-arg(S),ass(S,u),saturate.
-+asstwo(S,u):-arg(S),ass(S,u),saturate.
-+sattwo(S):-arg(S),ass(S,u),saturate.
-+:-not saturate.
-+#show ass/2.
-+       
-+:-ass(s1, 0),ass(s2, 0),ass(s3, 0).
-+:-ass(s1, 1),ass(s2, 0),ass(s3, 1).
-+       
-+%unfounded: saturate, asstwo(s1,0), asstwo(s1,0)
-\ No newline at end of file
-diff --git a/app/clingo/tests/lp/aggregates.sol b/app/clingo/tests/lp/aggregates.sol
-new file mode 100644
-index 0000000..94dc765
---- /dev/null
-+++ b/app/clingo/tests/lp/aggregates.sol
-@@ -0,0 +1,2 @@
-+Step: 1
-+UNSAT
-diff --git a/libgringo/gringo/ground/statements.hh b/libgringo/gringo/ground/statements.hh
-index 5b26c65..f1804e7 100644
---- a/libgringo/gringo/ground/statements.hh
-+++ b/libgringo/gringo/ground/statements.hh
-@@ -376,7 +376,7 @@ private:
- 
- class BodyAggregateLiteral : public Literal, private BodyOcc {
- public:
--    BodyAggregateLiteral(BodyAggregateComplete &complete, NAF naf);
-+    BodyAggregateLiteral(BodyAggregateComplete &complete, NAF naf, bool auxiliary);
-     virtual ~BodyAggregateLiteral() noexcept;
- 
-     // {{{2 Printable interface
-@@ -388,7 +388,7 @@ public:
-     void collect(VarTermBoundVec &vars) const override;
-     Score score(Term::VarSet const &bound, Logger &log) override;
-     std::pair<Output::LiteralId, bool> toOutput(Logger &log) override;
--    bool auxiliary() const override { return false; } // by construction
-+    bool auxiliary() const override { return auxiliary_; }
-     // }}}2
- 
- private:
-@@ -407,6 +407,7 @@ private:
-     DefinedBy defs_;
-     Potassco::Id_t offset_ = 0;
-     NAF naf_;
-+    bool auxiliary_;
-     OccurrenceType type_ = OccurrenceType::POSITIVELY_STRATIFIED;
- };
- 
-@@ -499,7 +500,7 @@ private:
- 
- class AssignmentAggregateLiteral : public Literal, private BodyOcc {
- public:
--    AssignmentAggregateLiteral(AssignmentAggregateComplete &complete);
-+    AssignmentAggregateLiteral(AssignmentAggregateComplete &complete, bool auxiliary);
-     virtual ~AssignmentAggregateLiteral() noexcept;
-     // {{{2 Printable interface
-     void print(std::ostream &out) const override;
-@@ -510,7 +511,7 @@ public:
-     void collect(VarTermBoundVec &vars) const override;
-     Score score(Term::VarSet const &bound, Logger &log) override;
-     std::pair<Output::LiteralId,bool> toOutput(Logger &log) override;
--    bool auxiliary() const override { return false; } // by construction
-+    bool auxiliary() const override { return auxiliary_; }
-     // }}}2
- 
- private:
-@@ -529,6 +530,7 @@ private:
-     DefinedBy defs_;
-     Id_t offset_ = InvalidId;
-     OccurrenceType type_ = OccurrenceType::POSITIVELY_STRATIFIED;
-+    bool auxiliary_;
- };
- 
- // }}}1
-@@ -667,7 +669,7 @@ private:
- 
- class ConjunctionLiteral : public Literal, private BodyOcc {
- public:
--    ConjunctionLiteral(ConjunctionComplete &complete);
-+    ConjunctionLiteral(ConjunctionComplete &complete, bool auxiliary);
-     virtual ~ConjunctionLiteral() noexcept;
-     // {{{2 Printable interface
-     void print(std::ostream &out) const override;
-@@ -678,7 +680,7 @@ public:
-     void collect(VarTermBoundVec &vars) const override;
-     Score score(Term::VarSet const &bound, Logger &log) override;
-     std::pair<Output::LiteralId,bool> toOutput(Logger &log) override;
--    bool auxiliary() const override { return false; } // by construction
-+    bool auxiliary() const override { return auxiliary_; }
-     // }}}2
- 
- private:
-@@ -697,6 +699,7 @@ private:
-     DefinedBy defs_;
-     Id_t offset_;
-     OccurrenceType type_ = OccurrenceType::POSITIVELY_STRATIFIED;
-+    bool auxiliary_;
- };
- 
- // }}}1
-@@ -786,7 +789,7 @@ private:
- 
- class DisjointLiteral : public Literal, private BodyOcc {
- public:
--    DisjointLiteral(DisjointComplete &complete, NAF naf);
-+    DisjointLiteral(DisjointComplete &complete, NAF naf, bool auxiliary);
-     virtual ~DisjointLiteral() noexcept;
-     // {{{2 Printable interface
-     void print(std::ostream &out) const override;
-@@ -797,7 +800,7 @@ public:
-     void collect(VarTermBoundVec &vars) const override;
-     Score score(Term::VarSet const &bound, Logger &log) override;
-     std::pair<Output::LiteralId,bool> toOutput(Logger &log) override;
--    bool auxiliary() const override { return false; } // by construction
-+    bool auxiliary() const override { return auxiliary_; }
-     // }}}2
- private:
-     // {{{2 BodyOcc interface
-@@ -816,6 +819,7 @@ private:
-     Id_t offset_ = InvalidId;
-     OccurrenceType type_ = OccurrenceType::POSITIVELY_STRATIFIED;
-     NAF naf_;
-+    bool auxiliary_;
- };
- 
- // }}}1
-diff --git a/libgringo/src/ground/statements.cc b/libgringo/src/ground/statements.cc
-index 17bbf6e..38a4562 100644
---- a/libgringo/src/ground/statements.cc
-+++ b/libgringo/src/ground/statements.cc
-@@ -888,9 +888,10 @@ void BodyAggregateAccumulate::printHead(std::ostream &out) const {
- 
- // {{{1 definition of BodyAggregateLiteral
- 
--BodyAggregateLiteral::BodyAggregateLiteral(BodyAggregateComplete &complete, NAF naf)
-+BodyAggregateLiteral::BodyAggregateLiteral(BodyAggregateComplete &complete, NAF naf, bool auxiliary)
- : complete_(complete)
--, naf_(naf) { }
-+, naf_(naf)
-+, auxiliary_(auxiliary) { }
- 
- BodyAggregateLiteral::~BodyAggregateLiteral() noexcept = default;
- 
-@@ -1138,8 +1139,9 @@ void AssignmentAggregateAccumulate::printHead(std::ostream &out) const {
- 
- // {{{1 Definition of AssignmentAggregateLiteral
- 
--AssignmentAggregateLiteral::AssignmentAggregateLiteral(AssignmentAggregateComplete &complete)
--: complete_(complete) { }
-+AssignmentAggregateLiteral::AssignmentAggregateLiteral(AssignmentAggregateComplete &complete, bool auxiliary)
-+: complete_(complete)
-+, auxiliary_(auxiliary) { }
- 
- AssignmentAggregateLiteral::~AssignmentAggregateLiteral() noexcept = default;
- 
-@@ -1206,8 +1208,9 @@ std::pair<Output::LiteralId,bool> AssignmentAggregateLiteral::toOutput(Logger &)
- 
- // {{{1 definition of ConjunctionLiteral
- 
--ConjunctionLiteral::ConjunctionLiteral(ConjunctionComplete &complete)
--: complete_(complete) { }
-+ConjunctionLiteral::ConjunctionLiteral(ConjunctionComplete &complete, bool auxiliary)
-+: complete_(complete)
-+, auxiliary_(auxiliary) { }
- 
- ConjunctionLiteral::~ConjunctionLiteral() noexcept = default;
- 
-@@ -1663,9 +1666,10 @@ void DisjointAccumulate::printHead(std::ostream &out) const {
- 
- // {{{1 definition of DisjointLiteral
- 
--DisjointLiteral::DisjointLiteral(DisjointComplete &complete, NAF naf)
-+DisjointLiteral::DisjointLiteral(DisjointComplete &complete, NAF naf, bool auxiliary)
- : complete_(complete)
--, naf_(naf) {
-+, naf_(naf)
-+, auxiliary_(auxiliary) {
- }
- 
- DisjointLiteral::~DisjointLiteral() noexcept = default;
-diff --git a/libgringo/src/input/aggregates.cc b/libgringo/src/input/aggregates.cc
-index a77d5d9..98469a8 100644
---- a/libgringo/src/input/aggregates.cc
-+++ b/libgringo/src/input/aggregates.cc
-@@ -324,8 +324,8 @@ CreateBody TupleBodyAggregate::toGround(ToGroundArg &x, Ground::UStmVec &stms) c
-                 return std::move(ret);
-             });
-         }
--        return CreateBody([&completeRef, this](Ground::ULitVec &lits, bool primary, bool) {
--            if (primary) { lits.emplace_back(gringo_make_unique<Ground::BodyAggregateLiteral>(completeRef, naf)); }
-+        return CreateBody([&completeRef, this](Ground::ULitVec &lits, bool primary, bool auxiliary) {
-+            if (primary) { lits.emplace_back(gringo_make_unique<Ground::BodyAggregateLiteral>(completeRef, naf, auxiliary)); }
-         }, std::move(split));
-     }
-     else {
-@@ -362,8 +362,8 @@ CreateBody TupleBodyAggregate::toGround(ToGroundArg &x, Ground::UStmVec &stms) c
-                 return std::move(ret);
-             });
-         }
--        return CreateBody([&completeRef, this](Ground::ULitVec &lits, bool primary, bool) {
--            if (primary) { lits.emplace_back(gringo_make_unique<Ground::AssignmentAggregateLiteral>(completeRef)); }
-+        return CreateBody([&completeRef, this](Ground::ULitVec &lits, bool primary, bool auxiliary) {
-+            if (primary) { lits.emplace_back(gringo_make_unique<Ground::AssignmentAggregateLiteral>(completeRef, auxiliary)); }
-         }, std::move(split));
-     }
- }
-@@ -752,8 +752,8 @@ CreateBody Conjunction::toGround(ToGroundArg &x, Ground::UStmVec &stms) const {
-         return std::move(ret);
-     });
- 
--    return CreateBody([&completeRef](Ground::ULitVec &lits, bool primary, bool) {
--        if (primary) { lits.emplace_back(gringo_make_unique<Ground::ConjunctionLiteral>(completeRef)); }
-+    return CreateBody([&completeRef](Ground::ULitVec &lits, bool primary, bool auxiliary) {
-+        if (primary) { lits.emplace_back(gringo_make_unique<Ground::ConjunctionLiteral>(completeRef, auxiliary)); }
-     }, std::move(split));
- }
- 
-@@ -1751,8 +1751,8 @@ CreateBody DisjointAggregate::toGround(ToGroundArg &x, Ground::UStmVec &stms) co
-             return std::move(ret);
-         });
-     }
--    return CreateBody([&completeRef, this](Ground::ULitVec &lits, bool primary, bool) {
--        if (primary) { lits.emplace_back(gringo_make_unique<Ground::DisjointLiteral>(completeRef, naf)); }
-+    return CreateBody([&completeRef, this](Ground::ULitVec &lits, bool primary, bool auxiliary) {
-+        if (primary) { lits.emplace_back(gringo_make_unique<Ground::DisjointLiteral>(completeRef, naf, auxiliary)); }
-     }, std::move(split));
- }
- 
-diff --git a/libgringo/tests/ground/instantiation.cc b/libgringo/tests/ground/instantiation.cc
-index 22817af..7bc9d87 100644
---- a/libgringo/tests/ground/instantiation.cc
-+++ b/libgringo/tests/ground/instantiation.cc
-@@ -1108,6 +1108,14 @@ TEST_CASE("ground-instantiation", "[ground]") {
-                 "-q(X):-not not -q(X), p(X).\n"
-                 " q(X):-not not  q(X), p(X).\n"));
-     }
-+    SECTION("two aggregates") {
-+        REQUIRE(
-+            "p:-#count{0,a:a}=0.\n"
-+            "p:-#count{0,a:a}=1,1<=#count{0,b:b}.\n"
-+            "{a;b}.\n" == ground(
-+                "{a;b}.\n"
-+                "p :- X = { a }, X { b }.\n"));
-+    }
- 
-     SECTION("tuple") {
-         REQUIRE("p(((),())).\n" == ground("p(((),())).\n"));
--- 
-2.11.0
-
diff --git a/debian/patches/reproducible-build.patch b/debian/patches/reproducible-build.patch
deleted file mode 100644
index 86ed8f2..0000000
--- a/debian/patches/reproducible-build.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From: Reiner Herrmann <reiner at reiner-h.de>
-Date: Wed, 7 Dec 2016 08:08:36 +0100
-Subject: Sort source files for deterministic linking order
-Origin: vendor, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=844096;msg=5
-Bug-Debian: https://bugs.debian.org/844096
-
-===================================================================
----
- SConscript | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/SConscript b/SConscript
-index 0ab4e7a..9164cd1 100644
---- a/SConscript
-+++ b/SConscript
-@@ -47,7 +47,7 @@ def find_files(env, path):
-                     target = os.path.join(root, filename[:-4] + ".hh")
-                     source = "#"+os.path.join(root, filename)
-                     env.Re2cCond(target, source)
--        return sources
-+        return sorted(sources)
-     finally:
-         os.chdir(oldcwd)
- 
diff --git a/debian/patches/series b/debian/patches/series
index 7d790fc..95843bd 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,5 +1 @@
 gringo-manpages.patch
-reproducible-build.patch
-gringo-fix-body-literals-as-auxiliary.patch
-gringo-broken-std-exception_ptr.patch
-gringo-alpha-fpu-getcw.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/gringo.git



More information about the debian-science-commits mailing list