astra-uu-se / atlantis

CBLS solver
2 stars 1 forks source link

Redesign/fzn parser #141

Closed frejknutarlewander closed 1 year ago

frejknutarlewander commented 1 year ago

Looking at the insertions, deletions and modified files, I am sorry :no_mouth:

I have ripped out the old parser and replaced it with one written in boost.

The new parser made me change the invariant graph class and how invariants are created from the parsed FZN data.

Many parts of the code, especially adding invariants to the invariant graph, were difficult to follow and easier to rewrite to some extent.

Node Identifiers (ids) were also added to the nodes in the invariant graph. Since variables in vectors can be moved when the size of the vector changes, object references (for example in unit tests) can become out-of-date when the vector grows (the vector of variable nodes in the invariant graph).

A lot of code were also moved from the hpp header files to the cpp files.