Skip to content

cleanup() removes theory atoms ? #169

@MaxOstrowski

Description

@MaxOstrowski

Given this weird looking little example program, I do get an unexpected

'std::logic_error'
what(): Unknown element '0'

during the creation of the backend

#include <clingo.hh>
#include <sstream>

using namespace Clingo;

class TestApp : public Clingo::Application, private SolveEventHandler {
public:
    void main(Control &ctl, StringSpan files) override {
                ctl.add("base",{}, R"(#theory csp {
                               dom_term {};
                               &dom/0 : dom_term, any}.)");
        ctl.add("base",{}, "&dom {0}.");

        ctl.ground({{"base", {}}});

        ctl.cleanup();
        
        auto backend = ctl.backend();
    }
};

int main(int argc, char *argv[]) {
    TestApp app;
    return Clingo::clingo_main(app, {argv + 1, static_cast<size_t>(argc - 1)});
}



Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions