Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: Rwbo
Title: Run the 'Open-WBO' MaxSAT Solver
Version: 0.1.2
Version: 0.1.2.9000
Authors@R: c(
person("Matthias", "Ollech", email = "ollech@gmx.com", role = c("aut", "cre")),
person("Ruben Martins, Vasco Manquinho, Ines Lynce", role = "cph",
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Rwbo (Development Version)

* Update documentation to refer to open-wbo and clarify the bundled executable
naming and static-linking limitations.

# Rwbo 0.1.2

* Build without `gmpxx.h` by default.
Expand Down
22 changes: 16 additions & 6 deletions R/run_open_wbo.R
Original file line number Diff line number Diff line change
@@ -1,22 +1,32 @@
#' Run open-wbo_static
#' Run open-wbo
#'
#' Run the bundled `open-wbo_static` binary with user-supplied parameters.
#' Run the bundled `open-wbo` binary with user-supplied parameters.
#'
#' @details
#' `args` is passed directly to the `open-wbo_static` command-line tool, so supply
#' `args` is passed directly to the `open-wbo` command-line tool, so supply
#' the path to a WCNF file along with any solver flags you want to enable. To see
#' the full list of supported options for your bundled binary, run
#' `run_open_wbo("--help")`. The help text is emitted on stderr, so it appears in
#' your console but is not returned by `run_open_wbo()`.
#'
#' The executable bundled with the package is named `open-wbo_static` (or
#' `open-wbo_static.exe` on Windows). The build aims to be as static as the
#' platform allows: non-Darwin builds attempt to use the static target, but they
#' fall back to the release binary when a static build is unavailable. macOS
#' builds always use the release binary, because the Apple toolchain does not
#' provide fully static system libraries (the `libSystem` umbrella is only
#' available dynamically), and static linking of system frameworks is not
#' supported. As a result, some system libraries remain dynamically linked and a
#' 100% static build is not guaranteed.
#'
#' Common solver options include toggles such as `-forceunsat`/`-no-forceunsat`,
#' `-adapt`/`-no-adapt`, `-print-model`/`-no-print-model`, and parameter settings
#' like `-algorithm <int>`, `-cpu-lim <int>`, `-mem-lim <int>`, and
#' `-verbosity <int>`.
#'
#' @param args Character vector of arguments passed to `open-wbo_static`.
#' @param args Character vector of arguments passed to `open-wbo`.
#'
#' @return Character string containing the output from `open-wbo_static`.
#' @return Character string containing the output from `open-wbo`.
#'
#' @examples
#' \donttest{
Expand All @@ -43,7 +53,7 @@ run_open_wbo <- function(args = character()) {
stop("open-wbo_static not found. Please reinstall Rwbo.", call. = FALSE)
}

# open-wbo_static uses non-zero exit statuses (20 for UNSAT, 30 for OPTIMUM).
# open-wbo uses non-zero exit statuses (20 for UNSAT, 30 for OPTIMUM).
output <- suppressWarnings(system2(
bin_path,
args = args,
Expand Down
20 changes: 15 additions & 5 deletions man/run_open_wbo.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.