#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <vector>
#include <cstdlib>

#include <sylvan.h>

int solve() {
    LACE_ME;

    return 0;
}

int main() {
    lace_init(0, 0);
    lace_startup(0, NULL, NULL);

    sylvan_init_package(1LL<<21, 1LL<<25, 1LL<<20, 1LL<<24);
    sylvan_init_bdd(6);

    solve();
    return 0;
}

#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <vector>
#include <cstdlib>

#include <sylvan.h>
#include <sylvan_obj.hpp>

using namespace sylvan;

int solve() {
    LACE_ME;
<% n = 0 -%>
<% self.board.each_with_index do |row, i| -%>
  <% row.each_with_index do |field, j| -%>
    <% next if field == Field::WALL %>
    Bdd man_<%= "#{i}_#{j}" %> = Bdd::bddVar(<%= n += 1 %>);
    Bdd block_<%= "#{i}_#{j}" %> = Bdd::bddVar(<%= n += 1 %>);
  <% end -%>
<% end -%>

<% initial_state = self.board.each_with_index.map do |row, i|
  row.each_with_index.map do |field, j|
    next if field == Field::WALL
    ["#{field != Field::MAN ? '!' : ''}man_#{i}_#{j}",
     "#{field != Field::BLOCK ? '!' : ''}block_#{i}_#{j}"]
  end
end
-%>
    Bdd initial_state = <%= initial_state.join(' * ') %>;

    FILE* file = fopen("start.dot", "w");
    sylvan_fprintdot_nc(file, initial_state.GetBDD());
    fclose(file);

    return 0;
}

int main() {
    lace_init(0, 0);
    lace_startup(0, NULL, NULL);

    sylvan_init_package(1LL<<21, 1LL<<25, 1LL<<20, 1LL<<24);
    sylvan_init_bdd(6);

    solve();
    return 0;
}

Add initial state to screen converter
Add initial state to screen converter
