Closed Kalashnikovni closed 3 years ago
Fixing the following error:
denise@statechart:~/Materias/Doctorado/modelicacc$ make
cc -I. -std=c++14 -Wall -Werror -Wno-reorder -O3 -ggdb -MM -MT obj/debug/flatter/connectors.o -MF obj/debug/flatter/connectors.d flatter/connectors.cpp
cc -I. -c flatter/connectors.cpp -o obj/debug/flatter/connectors.o -std=c++14 -Wall -Werror -Wno-reorder -O3 -ggdb
flatter/connectors.cpp: In member function ‘Modelica::AST::EquationList Connectors::buildLoop(Modelica::AST::Indexes, Modelica::AST::EquationList)’:
flatter/connectors.cpp:1530:9: error: ‘ContainsExpressionFlatter’ was not declared in this scope
1530 | ContainsExpressionFlatter co(ei);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./flatter/connectors.h:23,
from flatter/connectors.cpp:18:
flatter/connectors.cpp:1533:19: error: ‘co’ was not declared in this scope; did you mean ‘cos’?
1533 | if (Apply(co, left) || Apply(co, right)) {
| ^~
./ast/ast_types.h:104:42: note: in definition of macro ‘Apply’
104 | #define Apply(X, Y) boost::apply_visitor(X, Y)
| ^
make: *** [Makefile:58: obj/debug/flatter/connectors.o] Error 1
Given the graph described by the set-vertices, and set-edges:
The result of applying connectedComponents is:
The result is not correct, as, for example, [2:1:2]x[2:1:2] should be represented by [1:1:1]x[1:1:1], as the set-edge E_Cell_l_Cell_r exists.