diff --git a/CMakeLists.txt b/CMakeLists.txt index 49ef034..a9e01d3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,8 +62,10 @@ add_subdirectory(src) add_subdirectory(test/little) + install(TARGETS qaspcli qasp RUNTIME PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE WORLD_READ WORLD_WRITE ARCHIVE PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ GROUP_WRITE WORLD_READ WORLD_WRITE LIBRARY PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ GROUP_WRITE WORLD_READ WORLD_WRITE + PUBLIC_HEADER PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ GROUP_WRITE WORLD_READ WORLD_WRITE DESTINATION "include/qasp" ) \ No newline at end of file diff --git a/include/qasp/qasp.hpp b/include/qasp/qasp.hpp new file mode 100644 index 0000000..f57952e --- /dev/null +++ b/include/qasp/qasp.hpp @@ -0,0 +1 @@ +#include "qasp.h" \ No newline at end of file diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d77f6e9..2f60b48 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,5 +1,6 @@ file(GLOB_RECURSE SOURCES "*.cpp") file(GLOB_RECURSE HEADERS "*.hpp") +file(GLOB_RECURSE PUBHDRS "${CMAKE_SOURCE_DIR}/include/qasp/qasp.*") add_library(qasp ${SOURCES} ${HEADERS}) add_executable(qaspcli main.cc) @@ -43,3 +44,6 @@ target_compile_options(qaspcli set_target_properties(qaspcli PROPERTIES OUTPUT_NAME "qasp") + +set_target_properties(qaspcli + PROPERTIES PUBLIC_HEADER "${PUBHDRS}") \ No newline at end of file diff --git a/test/big/CMakeLists.txt b/test/big/CMakeLists.txt new file mode 100644 index 0000000..6fe6ba8 --- /dev/null +++ b/test/big/CMakeLists.txt @@ -0,0 +1,36 @@ +file(GLOB SOURCES "*.qasp") + +foreach(SOURCE ${SOURCES}) + + cmake_path(GET SOURCE STEM TEST_NAME) + cmake_path(GET SOURCE PARENT_PATH TEST_PATH) + + add_test( + NAME "[FILE] ${TEST_PATH}-${TEST_NAME}" + COMMAND /bin/sh -c "${PROJECT_BINARY_DIR}/bin/qasp ${SOURCE} -n0 -q | diff -s ${TEST_PATH}/${TEST_NAME}.expected -" + WORKING_DIRECTORY . + ) + + add_test( + NAME "[FILE] ${TEST_PATH}-${TEST_NAME} --look-ahead" + COMMAND /bin/sh -c "${PROJECT_BINARY_DIR}/bin/qasp ${SOURCE} -n0 -q -l | diff -s ${TEST_PATH}/${TEST_NAME}.expected -" + WORKING_DIRECTORY . + ) + + add_test( + NAME "[FILE] ${TEST_PATH}-${TEST_NAME} --counter-example" + COMMAND /bin/sh -c "${PROJECT_BINARY_DIR}/bin/qasp ${SOURCE} -n0 -q -c | diff -s ${TEST_PATH}/${TEST_NAME}.expected -" + WORKING_DIRECTORY . + ) + + add_test( + NAME "[FILE] ${TEST_PATH}-${TEST_NAME} --counter-example --look-ahead" + COMMAND /bin/sh -c "${PROJECT_BINARY_DIR}/bin/qasp ${SOURCE} -n0 -q -l -c | diff -s ${TEST_PATH}/${TEST_NAME}.expected -" + WORKING_DIRECTORY . + ) + +endforeach() + + + + diff --git a/test/big/Test01.expected b/test/big/Test01.expected new file mode 100644 index 0000000..fabcd96 --- /dev/null +++ b/test/big/Test01.expected @@ -0,0 +1 @@ +COHERENT diff --git a/test/big/Test01.qasp b/test/big/Test01.qasp new file mode 100644 index 0000000..dd07070 --- /dev/null +++ b/test/big/Test01.qasp @@ -0,0 +1,103 @@ +%@exists +x01 | nx01. +x02 | nx02. +x03 | nx03. +x04 | nx04. +x05 | nx05. +x06 | nx06. +x07 | nx07. +x08 | nx08. +x09 | nx09. +x10 | nx10. +x11 | nx11. +x12 | nx12. +x13 | nx13. +x14 | nx14. +x15 | nx15. +%@forall +x16 | nx16. +x17 | nx17. +x18 | nx18. +x19 | nx19. +x20 | nx20. +%@constraint +:- nx3, nx20, nx1, nx6, nx11. +:- x15, x3, x20, nx6, nx4. +:- x18, nx8, nx11, nx20, nx4. +:- x4, x13, nx17, nx20, nx12. +:- x5, x12, nx20, nx4, nx11. +:- x9, x2, x13, x3, nx16. +:- x10, x18, x6, nx2, nx7. +:- x10, x3, nx2, nx19, nx1. +:- x20, x10, x13, nx17, nx4. +:- x11, x2, nx13, nx5, nx16. +:- x19, x5, nx20, nx10, nx11. +:- x2, x14, x17, x3, nx20. +:- x3, x19, nx12, nx14, nx17. +:- x10, x6, nx11, nx13, nx5. +:- nx20, nx3, nx14, nx2, nx8. +:- x11, x12, x13, nx17, nx3. +:- x6, x12, x15, x5, nx14. +:- x9, x3, x14, nx17, nx12. +:- x4, nx5, nx8, nx20, nx9. +:- x11, x1, x14, x8, x6. +:- x1, x15, x14, nx6, nx16. +:- x1, x17, x12, x6, nx11. +:- x1, x11, x9, nx18, nx20. +:- x13, x12, nx9, nx11, nx16. +:- x20, nx1, nx2, nx17, nx16. +:- x6, x20, x5, nx8, nx4. +:- x19, x16, nx14, nx13, nx18. +:- x12, x14, x7, x10, x6. +:- x15, x7, x13, nx9, nx4. +:- x5, x10, x9, nx15, nx3. +:- x1, x2, x10, nx13, nx5. +:- x17, x12, x3, nx20, nx11. +:- x13, x4, x10, nx3, nx9. +:- x2, x17, x6, nx1, nx14. +:- x3, x2, x15, x20, nx18. +:- x7, x18, nx6, nx14, nx17. +:- x13, x20, nx11, nx9, nx18. +:- x6, x11, nx16, nx17, nx5. +:- x5, nx15, nx13, nx4, nx9. +:- x16, x4, x12, nx18, nx10. +:- x20, x9, nx16, nx6, nx2. +:- x17, x2, x12, nx19, nx14. +:- x19, x3, x11, x15, x20. +:- x12, x17, nx19, nx7, nx5. +:- x2, x16, x13, nx7, nx6. +:- x11, x20, nx6, nx7, nx17. +:- x9, x8, x7, nx10, nx11. +:- x15, x10, x18, x3, x11. +:- x17, x2, nx9, nx14, nx6. +:- x18, x19, x14, nx15, nx5. +:- x17, x5, nx13, nx18, nx12. +:- x17, x1, nx14, nx10, nx20. +:- x5, x9, x20, nx19, nx11. +:- x3, x7, x2, x4, nx1. +:- x17, x10, nx11, nx15, nx5. +:- x12, x10, x1, x9, nx5. +:- x3, x9, x19, nx12, nx13. +:- x18, x20, x2, x16, nx11. +:- x15, x1, nx17, nx3, nx7. +:- x6, x2, x12, nx1, nx10. +:- x7, x2, x4, nx3, nx11. +:- x14, nx16, nx18, nx4, nx5. +:- x7, x12, x14, nx13, nx15. +:- x8, x19, nx12, nx10, nx14. +:- x12, x15, x4, nx5, nx9. +:- x15, x17, nx16, nx20, nx1. +:- x8, x9, nx19, nx20, nx6. +:- x16, x2, x19, nx8, nx15. +:- x8, nx13, nx20, nx2, nx3. +:- x11, x20, x13, nx14, nx6. +:- x6, x2, x14, nx11, nx16. +:- x19, x2, nx15, nx17, nx8. +:- x18, x17, nx11, nx6, nx9. +:- x14, x12, x11, x3, nx20. +:- x15, x2, nx3, nx1, nx7. +:- x3, x13, nx12, nx20, nx18. +:- x15, nx17, nx14, nx13, nx8. +:- x3, nx7, nx19, nx4, nx18. +:- x7, x15, nx9, nx6, nx20. +:- x9, x5, x2, nx15, nx1.