Skip to content

Commit

Permalink
docs: update docstring removing @brief
Browse files Browse the repository at this point in the history
  • Loading branch information
TendTo committed Mar 14, 2024
1 parent c31670f commit af49c78
Show file tree
Hide file tree
Showing 21 changed files with 35 additions and 50 deletions.
5 changes: 3 additions & 2 deletions benchmark/BenchmarkProgram.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,16 @@ namespace dlinear::benchmark {
class BenchmarkProgram {
public:
/**
* @brief Create an instance of a BenchmarkProgram.
* Create an instance of a BenchmarkProgram.
*
* The object can than be used to run the benchmarks.
* @param argc number of command line arguments. Passed by the main function
* @param argv array of command line arguments. Passed by the main function
*/
BenchmarkProgram(int argc, const char *argv[]);

/**
* @brief Run the benchmarks.
* Run the benchmarks.
* @return exit status
*/
int Run();
Expand Down
5 changes: 3 additions & 2 deletions benchmark/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
* @author dlinear
* @date 28 Aug 2023
* @copyright 2023 dlinear
* @brief Brief description
* @brief Main entry point for the benchmark program.
*
* Long Description
* The main function is used to start the benchmark program.
*/
#include <csignal>

#include "benchmark/BenchmarkProgram.h"

using dlinear::benchmark::BenchmarkProgram;
Expand Down
2 changes: 1 addition & 1 deletion benchmark/util/BenchArgParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class BenchArgParser {
void validateOptions();

/**
* @brief Load all the files found in the path parameter matching the provided
* Load all the files found in the path parameter matching the provided
* fileExtension and return them as a vector of strings.
* @return vector of strings containing the files found in the path parameter
*/
Expand Down
3 changes: 0 additions & 3 deletions benchmark/util/ConfigFileReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
* @author dlinear
* @date 28 Aug 2023
* @copyright 2023 dlinear
* @brief Brief description
*
* Long Description
*/

#include "ConfigFileReader.h"
Expand Down
4 changes: 2 additions & 2 deletions dlinear/solver/CompleteSoplexTheorySolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class CompleteSoplexTheorySolver : public SoplexTheorySolver {
*
* It invokes the LP solver and returns the result, as well as the actual precision of the solution, if any.
* If the LP problem is infeasible (or strictly infeasible), it will also update the explanation
* @link theory_rows_to_explanation_ @endlink.
* @ref theory_rows_to_explanation_.
* @param actual_precision The actual precision of the solution, if any. Starts from the input, and is updated if the
* LP solver returns a better precision
* @return The result of the SAT check
Expand Down Expand Up @@ -120,7 +120,7 @@ class CompleteSoplexTheorySolver : public SoplexTheorySolver {
std::vector<size_t> IteratorNqRowsInExplanation() const;

/**
* Get the explanation from @link theory_rows_to_explanation_ @endlink.
* Get the explanation from @ref theory_rows_to_explanation_.
* @param[out] explanation The explanation to be updated
*/
void GetExplanation(LiteralSet& explanation);
Expand Down
2 changes: 1 addition & 1 deletion dlinear/solver/Context.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
namespace dlinear {

/**
* @brief Context class that holds a set of constraints and provide
* Context class that holds a set of constraints and provide
* Assert/Push/Pop/CheckSat functionalities.
*
* @note The implementation details are in context_impl.h file.
Expand Down
7 changes: 2 additions & 5 deletions dlinear/solver/SatSolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,34 +75,31 @@ class SatSolver {
virtual void AddLearnedClause(const LiteralSet &literals) = 0;
/**
* Check the satisfiability of the current configuration.
*
* @return a witness, satisfying model if the problem is SAT.
* @return empty optional if UNSAT
*/
virtual std::optional<Model> CheckSat() = 0;
/**
* Get the list of Literal which correspond to a theory literal that have been inserted into the SAT solver.
*
* @return vector of literals
*/
const std::vector<Literal> &theory_literals() const { return theory_literals_; }

protected:
/**
* Add a clause @p f to the internal SAT solver.
* @p f must be a clause. That is, it is either a literal (b or ¬b)
* @pre @p f must be a clause. That is, it is either a literal (b or ¬b)
* or a disjunction of literals (l₁ ∨ ... ∨ lₙ).
*
* @param f clause to add
*/
virtual void AddClauseToSat(const Formula &f) = 0;
/**
* Add a variable to the internal SAT solver.
*
* Also update the two mapping between each symbolic Variable and the
* internal SAT solver's variable (@ref var_to_sat_) and the other way around
* (@ref sat_to_var_).
* If the variable had already been mapped, this function does nothing.
*
* @param var variable to add
*/
virtual void MakeSatVar(const Variable &var) = 0;
Expand Down
9 changes: 4 additions & 5 deletions dlinear/solver/SoplexTheorySolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class SoplexTheorySolver : public TheorySolver {
/**
* Parse a row and return the vector of coefficients to apply to the decisional variables.
*
* Parse an formula representing a row in order to produce store the rhs term in @link spx_rhs_ @endlink and create a
* Parse an formula representing a row in order to produce store the rhs term in @ref spx_rhs_ and create a
* vector of coefficients for the row to pass to the LP solver
* @param formula symbolic formula representing the row
* @return vector of coefficients to apply to the decisional variables in the row
Expand All @@ -143,11 +143,10 @@ class SoplexTheorySolver : public TheorySolver {
void SetSPXVarCoeff(soplex::DSVectorRational& coeffs, const Variable& var, const mpq_class& value) const;
void CreateArtificials(int spx_row);

// Exact LP solver (SoPlex)
soplex::SoPlex spx_;
soplex::SoPlex spx_; ///< SoPlex exact LP solver

std::vector<mpq_class> spx_rhs_;
std::vector<LpRowSense> spx_sense_;
std::vector<mpq_class> spx_rhs_; ///< Right-hand side of the rows
std::vector<LpRowSense> spx_sense_; ///< Sense of the rows
};

} // namespace dlinear
4 changes: 2 additions & 2 deletions dlinear/solver/TheorySolverBoundIterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @licence Apache-2.0 license
* @brief TheorySolverBoundIterator class.
*
* It is used to iterate over the bounds of a theory solver without copying each @ref TheorySolverBoundVector::Bound.
* It is used to iterate over the bounds of a theory solver without copying each @ref dlinear::TheorySolverBoundVector::Bound.
* Usually the results of bound violation.
*/
#pragma once
Expand Down Expand Up @@ -57,7 +57,7 @@ class TheorySolverBoundIterator {
*/
TheorySolverBoundIterator(internal_iterator begin_bounds_it, internal_iterator end_bounds_it);
/**
* @brief Construct an iterator from a pair of iterators, @p bounds.
* Construct an iterator from a pair of iterators, @p bounds.
* @param bounds pair of iterators to the bounds, begin and end
*/
explicit TheorySolverBoundIterator(std::pair<internal_iterator, internal_iterator> bounds);
Expand Down
16 changes: 8 additions & 8 deletions dlinear/solver/TheorySolverBoundVector.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,22 +119,22 @@ class TheorySolverBoundVector {
/**
* Clear the vector and reset the active bounds.
*
* Active bounds are set to @link inf_l_ @endlink and @link inf_u_ @endlink.
* Active bounds are set to @ref inf_l_ and @ref inf_u_.
*/
void Clear();
/**
* Clear the vector, update @link inf_l_ @endlink and @link inf_u_ @endlink and reset the active bounds.
* Clear the vector, update @ref inf_l_ and @ref inf_u_ and reset the active bounds.
*
* More specifically, @link inf_l_ @endlink and @link inf_u_ @endlink are set to -@p inf and @p inf respectively.
* Active bounds are set to the new values of @link inf_l_ @endlink and @link inf_u_ @endlink.
* More specifically, @ref inf_l_ and @ref inf_u_ are set to -@p inf and @p inf respectively.
* Active bounds are set to the new values of @ref inf_l_ and @ref inf_u_.
* @param inf new inf value
*/
void Clear(mpq_class inf);
/**
* Clear the vector, update @link inf_l_ @endlink and @link inf_u_ @endlink and reset the active bounds.
* Clear the vector, update @ref inf_l_ and @ref inf_u_ and reset the active bounds.
*
* More specifically, @link inf_l_ @endlink and @link inf_u_ @endlink are set to @p inf_l and @p inf_u respectively.
* Active bounds are set to the new values of @link inf_l_ @endlink and @link inf_u_ @endlink.
* More specifically, @ref inf_l_ and @ref inf_u_ are set to @p inf_l and @p inf_u respectively.
* Active bounds are set to the new values of @ref inf_l_ and @ref inf_u_.
* @param inf_l new lower bound
* @param inf_u new upper bound
*/
Expand Down Expand Up @@ -249,7 +249,7 @@ class TheorySolverBoundVector {

private:
/**
* Return an iterator over @link bounds_ @endlink after the last lower bound and to the first upper bound.
* Return an iterator over @ref bounds_ after the last lower bound and to the first upper bound.
* @return iterator after the last lower bound and to the first upper bound
*/
[[nodiscard]] inline BoundVector::const_iterator LowerBoundEnd() const { return bounds_.cbegin() + n_lower_bounds_; }
Expand Down
3 changes: 0 additions & 3 deletions dlinear/symbolic/NaiveCnfizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
* @author dlinear
* @date 18 Aug 2023
* @copyright 2023 dlinear
* @brief Brief description
*
* Long Description
*/

#include "NaiveCnfizer.h"
Expand Down
2 changes: 1 addition & 1 deletion dlinear/symbolic/Nnfizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace dlinear {
* When @code push_negation_into_relationals @endcode is true, it pushed
* negations into relational formulas by flipping relational
* @par Example:
* @f$ ¬(x >= 10) @f$ becomes @f$ (x < 10) @f$.
* @f$ ¬(x \ge 10) @f$ becomes @f$ (x < 10) @f$
*
* @see https://en.wikipedia.org/wiki/Negation_normal_form
*/
Expand Down
3 changes: 0 additions & 3 deletions dlinear/symbolic/PredicateAbstractor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
* @author dlinear
* @date 17 Aug 2023
* @copyright 2023 dlinear
* @brief Brief description
*
* Long Description
*/

#include "PredicateAbstractor.h"
Expand Down
2 changes: 1 addition & 1 deletion dlinear/util/Box.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ class Box {
[[nodiscard]] std::pair<Box, Box> bisect_int(int i) const;

/**
* @brief Bisects the box at @p i -th dimension.
* Bisects the box at @p i -th dimension.
* @pre @p i-th variable is bisectable.
* @pre @p i-th variable is of continuous type.
* @param i index of the dimension to bisect
Expand Down
4 changes: 2 additions & 2 deletions dlinear/util/SortedVector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -357,9 +357,9 @@ class SortedVector {

private:
/**
* Use the @link compare_ @endlink function to check if two elements are equal.
* Use the @ref compare_ function to check if two elements are equal.
*
* Since the function only checks ordering, to make sure two elements are equal @link compare_ @endlink must be used twice.
* Since the function only checks ordering, to make sure two elements are equal @ref compare_ must be used twice.
* @param lhs left-hand side element
* @param rhs right-hand side element
* @return true if the elements are equal
Expand Down
4 changes: 2 additions & 2 deletions dlinear/util/Stats.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ class Stats {
*/
[[nodiscard]] const Timer &timer() const { return timer_; }
/**
* @brief Convert the current state of the object to a formatted string, only including the specific
* Convert the current state of the object to a formatted string, only including the specific
* part the Stat object is concerned about
* @return string representing a partial state of the Stats
*/
[[nodiscard]] virtual std::string ToSegmentString() const;
/**
* @brief Convert the current state of the object to a formatted string
* Convert the current state of the object to a formatted string
* @return string representing the state of the Stats
*/
[[nodiscard]] virtual std::string ToString() const;
Expand Down
1 change: 0 additions & 1 deletion dlinear/util/Timer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* @author dlinear
* @date 16 Aug 2023
* @copyright 2023 dlinear
* @brief Brief description
*/

#include "Timer.h"
Expand Down
3 changes: 0 additions & 3 deletions dlinear/util/filesystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
* @author dlinear
* @date 15 Aug 2023
* @copyright 2023 dlinear
* @brief Brief description
*
* Long Description
*/

#include "filesystem.h"
Expand Down
2 changes: 1 addition & 1 deletion dlinear/util/interrupt.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ extern volatile std::atomic_bool g_interrupted; ///< Flag to indicate an interr

/**
* Signal handler for SIGINT.
* Set the @link g_interrupted @endlink flag to true.
* Set the @ref g_interrupted flag to true.
*/
void interrupt_handler(int);

Expand Down
2 changes: 1 addition & 1 deletion docs/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ SHORT_NAMES = NO
# description.)
# The default value is: NO.

JAVADOC_AUTOBRIEF = NO
JAVADOC_AUTOBRIEF = YES

# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line
# such as
Expand Down
2 changes: 1 addition & 1 deletion docs/presentation/examples/gauss/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class GaussBenchmark {
};

/**
* @brief Usage:
* Usage:
* ./gauss [size] [seed] [output_file] [diff_file]
*/
int main(int argc, char const* argv[]) {
Expand Down

0 comments on commit af49c78

Please sign in to comment.