Skip to content

Commit

Permalink
Anonymous submission
Browse files Browse the repository at this point in the history
  • Loading branch information
jackbergus committed Oct 10, 2023
1 parent 2fc62f9 commit 83681b6
Show file tree
Hide file tree
Showing 16 changed files with 379 additions and 17 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,19 @@ add_subdirectory(submodules/yaucl)
include_directories(submodules/yaucl/include)
include_directories(submodules/args/)
include_directories(submodules/yaucl/submodules/magic_enum/include)
include_directories(submodules/yaucl/submodules/CRoaring/)
include_directories(submodules/yaucl/submodules/CRoaring/cpp)
include_directories(submodules/yaucl/submodules/CRoaring/include)

add_library(reducerlib include/declare_cases.h src/declare_cases.cpp src/ltlf.cpp include/ltlf.h include/my_unordered_set.h src/model_reducer.cpp include/model_reducer.h src/declare_to_lydialtlf.cpp include/declare_to_lydialtlf.h src/declare_to_powerdecl.cpp include/declare_to_powerdecl.h)
target_link_libraries(reducerlib yaucl_hashing roaring antlr4_static yaucl_graph )

add_executable(reducer main.cpp)
target_link_libraries(reducer yaucl_hashing roaring antlr4_static yaucl_graph reducerlib)

add_executable(to_automaton to_automaton.cpp)
target_link_libraries(to_automaton yaucl_hashing roaring antlr4_static yaucl_graph reducerlib)


add_executable(tests tests.cpp)
target_link_libraries(tests PRIVATE Catch2::Catch2WithMain reducerlib)
Expand Down
21 changes: 20 additions & 1 deletion include/declare_cases.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
/*
* declare_cases.h
* This file is part of DECLAREd
*
* Copyright (C) 2023 - Anonymous Ⅳ
*
* DECLAREd is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DECLAREd is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DECLAREd. If not, see <http://www.gnu.org/licenses/>.
*/
//
// Created by giacomo on 19/08/23.
// Created by Anonymous Ⅳ on 19/08/23.
//

#ifndef REDUCER_DECLARE_CASES_H
Expand Down
21 changes: 20 additions & 1 deletion include/declare_to_lydialtlf.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
/*
* declare_to_lydialtlf.h
* This file is part of DECLAREd
*
* Copyright (C) 2023 - Anonymous Ⅳ
*
* <program name> is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* <program name> is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with <program name>. If not, see <http://www.gnu.org/licenses/>.
*/
//
// Created by giacomo on 26/08/23.
// Created by Anonymous Ⅳ on 26/08/23.
//

#ifndef REDUCER_DECLARE_TO_LYDIALTLF_H
Expand Down
21 changes: 20 additions & 1 deletion include/declare_to_powerdecl.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
/*
* declare_to_powerdecl.h
* This file is part of DECLAREd
*
* Copyright (C) 2023 - Anonymous Ⅳ
*
* DECLAREd is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DECLAREd is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DECLAREd. If not, see <http://www.gnu.org/licenses/>.
*/
//
// Created by giacomo on 26/08/23.
// Created by Anonymous Ⅳ on 26/08/23.
//

#ifndef REDUCER_DECLARE_TO_POWERDECL_H
Expand Down
25 changes: 23 additions & 2 deletions include/ltlf.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
/*
* ltlf.h
* This file is part of DECLAREd
*
* Copyright (C) 2023 - Anonymous Ⅳ
*
* DECLAREd is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DECLAREd is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DECLAREd. If not, see <http://www.gnu.org/licenses/>.
*/


//
// Created by giacomo on 20/08/23.
// Created by Anonymous Ⅳ on 20/08/23.
//

#ifndef REDUCER_LTLF_H
Expand Down Expand Up @@ -438,7 +459,7 @@ void to_automaton(const ltlf& f,
}

auto result = minimizeDFA(g);
// result.dot(std::cout, false);
result.dot(std::cout, false);

}

Expand Down
23 changes: 22 additions & 1 deletion include/map_inout.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
/*
* map_inout.h
* This file is part of DECLAREd
*
* Copyright (C) 2023 - Anonymous Ⅳ
*
* DECLAREd is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DECLAREd is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DECLAREd. If not, see <http://www.gnu.org/licenses/>.
*/


#pragma once
//#define DEBUG
#include <unordered_set>
Expand Down Expand Up @@ -152,4 +173,4 @@ template <typename T, typename V> struct map_inout {
out.clear();
in.clear();
}
};
};
21 changes: 20 additions & 1 deletion include/model_reducer.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
/*
* model_reducer.h
* This file is part of DECLAREd
*
* Copyright (C) 2023 - Anonymous Ⅳ
*
* DECLAREd is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DECLAREd is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DECLAREd. If not, see <http://www.gnu.org/licenses/>.
*/
//
// Created by giacomo on 22/08/23.
// Created by Anonymous Ⅳ on 22/08/23.
//

#ifndef REDUCER_MODEL_REDUCER_H
Expand Down
21 changes: 20 additions & 1 deletion include/my_unordered_set.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
/*
* my_unordered_set.h
* This file is part of DECLAREd
*
* Copyright (C) 2023 - Anonymous Ⅳ
*
* DECLAREd is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DECLAREd is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DECLAREd. If not, see <http://www.gnu.org/licenses/>.
*/
//
// Created by giacomo on 20/08/23.
// Created by Anonymous Ⅳ on 20/08/23.
//

#ifndef REDUCER_MY_UNORDERED_SET_H
Expand Down
21 changes: 21 additions & 0 deletions main.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
/*
* main.cpp
* This file is part of DECLAREd
*
* Copyright (C) 2023 - Anonymous Ⅳ
*
* DECLAREd is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DECLAREd is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DECLAREd. If not, see <http://www.gnu.org/licenses/>.
*/


#include <iostream>

#include <fstream>
Expand Down
23 changes: 21 additions & 2 deletions src/declare_cases.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
/*
* declare_cases.cpp
* This file is part of DECLAREd
*
* Copyright (C) 2023 - Anonymous Ⅳ
*
* DECLAREd is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DECLAREd is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DECLAREd. If not, see <http://www.gnu.org/licenses/>.
*/
//
// Created by giacomo on 19/08/23.
// Created by Anonymous Ⅳ on 19/08/23.
//

#include <declare_cases.h>
Expand Down Expand Up @@ -60,4 +79,4 @@ std::ostream& operator<<(std::ostream& os, const struct DeclareStraightforwardPr
else
return os << " " << ( std::quoted(d.bijection.getValue(d.to_print->right))) << ")";
}
}
}
23 changes: 21 additions & 2 deletions src/declare_to_lydialtlf.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
/*
* declare_to_lydialtlf.cpp
* This file is part of DECLAREd
*
* Copyright (C) 2023 - Anonymous Ⅳ
*
* DECLAREd is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DECLAREd is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DECLAREd. If not, see <http://www.gnu.org/licenses/>.
*/
//
// Created by giacomo on 26/08/23.
// Created by Anonymous Ⅳ on 26/08/23.
//

#include <declare_to_lydialtlf.h>
Expand Down Expand Up @@ -260,4 +279,4 @@ void stream_aaltaf_ltlf(std::ostream& os,
generate_axiom_ltlf(os, act_map, atoms, " && ");
}
}
}
}
23 changes: 22 additions & 1 deletion src/declare_to_powerdecl.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
/*
* declare_to_powerdecl.cpp
* This file is part of DECLAREd
*
* Copyright (C) 2023 - Anonymous Ⅳ
*
* DECLAREd is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DECLAREd is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DECLAREd. If not, see <http://www.gnu.org/licenses/>.
*/


//
// Created by giacomo on 26/08/23.
// Created by Anonymous Ⅳ on 26/08/23.
//

#include <declare_to_powerdecl.h>
Expand Down
23 changes: 22 additions & 1 deletion src/ltlf.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
/*
* ltlf.cpp
* This file is part of DECLAREd
*
* Copyright (C) 2023 - Anonymous Ⅳ
*
* DECLAREd is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DECLAREd is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DECLAREd. If not, see <http://www.gnu.org/licenses/>.
*/


//
// Created by giacomo on 20/08/23.
// Created by Anonymous Ⅳ on 20/08/23.
//

#include <ltlf.h>
Expand Down
23 changes: 21 additions & 2 deletions src/model_reducer.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
/*
* model_reducer.cpp
* This file is part of DECLAREd
*
* Copyright (C) 2023 - Anonymous Ⅳ
*
* DECLAREd is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DECLAREd is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DECLAREd. If not, see <http://www.gnu.org/licenses/>.
*/
//
// Created by giacomo on 22/08/23.
// Created by Anonymous Ⅳ on 22/08/23.
//

#define DEBUG
Expand Down Expand Up @@ -1066,4 +1085,4 @@ std::vector<DatalessCases> model_reducer::run(const std::vector<DatalessCases>&
if (result.empty())
result.emplace_back(TRUTH, -1, -1);
return result;
}
}
Loading

0 comments on commit 83681b6

Please sign in to comment.