Skip to content

Commit

Permalink
fix: use expr version v2.2.0 to have faster compile time
Browse files Browse the repository at this point in the history
  • Loading branch information
sillydan1 committed Dec 17, 2022
1 parent f5ff112 commit 2f2e6bc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
File renamed without changes.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})

add_compile_definitions(DEFAULT_EXPRESSION_VALUE="true")
CPMAddPackage(NAME expr VERSION 2.1.1 GITHUB_REPOSITORY sillydan1/expr OPTIONS "ENABLE_Z3 ON")
CPMAddPackage(NAME argvparse VERSION 1.2.3 GITHUB_REPOSITORY sillydan1/argvparse)
CPMAddPackage(NAME ctl-expr VERSION 1.1.1 GITHUB_REPOSITORY sillydan1/ctl-expr)
CPMAddPackage(NAME expr VERSION 2.2.0 GITHUB_REPOSITORY sillydan1/expr OPTIONS "ENABLE_Z3 ON")
CPMAddPackage("gh:sillydan1/argvparse@1.2.3")
CPMAddPackage("gh:sillydan1/ctl-expr@1.1.2")

CPMAddPackage("gh:yalibs/[email protected]")
CPMAddPackage("gh:yalibs/[email protected]")
Expand Down
2 changes: 1 addition & 1 deletion cmake/CPM.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set(CPM_DOWNLOAD_VERSION 0.35.0)
set(CPM_DOWNLOAD_VERSION 0.36.0)

if(CPM_SOURCE_CACHE)
# Expand relative path. This is important if the provided path contains a tilde (~)
Expand Down
10 changes: 4 additions & 6 deletions src/ntta/builder/ntta_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,23 +56,21 @@ namespace aaltitoad {
auto tta_builder::build() -> tta_t {
if(!starting_location.has_value())
throw std::logic_error("no starting location provided");
return {std::move(factory.build_heap()), starting_location.value()};
return { std::move(factory.build_heap()), starting_location.value() };
}
auto tta_builder::compile_guard(const std::optional<std::string>& guard) -> expr::compiler::compiled_expr_t {
if(!guard.has_value())
return empty_guard;
compiler->trees.erase("expression_result");
auto res = compiler->parse(guard.value());
if(res != 0)
if(compiler->parse(guard.value()) != 0)
throw std::logic_error(compiler->error);
return compiler->trees["expression_result"];
}
auto tta_builder::compile_update(const std::optional<std::string>& update) -> expr::compiler::compiled_expr_collection_t {
if(!update.has_value())
return {};
compiler->trees = {};
auto res = compiler->parse(update.value());
if(res != 0)
compiler->trees.clear();
if(compiler->parse(update.value()) != 0)
throw std::logic_error(compiler->error);
return compiler->trees;
}
Expand Down

0 comments on commit 2f2e6bc

Please sign in to comment.