Skip to content

Commit

Permalink
Fix C++ documentation does not show properly in Visual Studio Code
Browse files Browse the repository at this point in the history
This also fixes a few other problems in the C++ API, such as some container functions
do not call the 'begin' and 'end' iterator functions but merely parse on the pointers
to these member functions.
  • Loading branch information
SSoelvsten committed May 24, 2024
1 parent 9b818ca commit 42ff6c3
Show file tree
Hide file tree
Showing 2 changed files with 603 additions and 206 deletions.
52 changes: 15 additions & 37 deletions src/cal.h
Original file line number Diff line number Diff line change
Expand Up @@ -573,22 +573,22 @@ EXTERN Cal_Bdd Cal_BddManagerGetVarWithId(Cal_BddManager bddManager,
EXTERN int Cal_BddIsBddNull(Cal_BddManager bddManager, Cal_Bdd userBdd);

////////////////////////////////////////////////////////////////////////////////
/// Returns 1 if the argument BDD is constant one, 0 otherwise.
/// \brief Returns 1 if the argument BDD is constant one, 0 otherwise.
///
/// \see Cal_BddIsBddZero, Cal_BddIsBddConst
////////////////////////////////////////////////////////////////////////////////
EXTERN int Cal_BddIsBddOne(Cal_BddManager bddManager, Cal_Bdd userBdd);

////////////////////////////////////////////////////////////////////////////////
/// Returns 1 if the argument BDD is constant zero, 0 otherwise.
/// \brief Returns 1 if the argument BDD is constant zero, 0 otherwise.
///
/// \see Cal_BddIsBddOne, Cal_BddIsBddConst
////////////////////////////////////////////////////////////////////////////////
EXTERN int Cal_BddIsBddZero(Cal_BddManager bddManager, Cal_Bdd userBdd);

////////////////////////////////////////////////////////////////////////////////
/// Returns Returns 1 if the argument BDD is either constant one or constant
/// zero, otherwise returns 0.
/// \brief Returns 1 if the argument BDD is either constant one or constant
/// zero, otherwise returns 0.
///
/// \see Cal_BddIsBddOne, Cal_BddIsBddZero
////////////////////////////////////////////////////////////////////////////////
Expand All @@ -614,10 +614,11 @@ EXTERN int Cal_BddDependsOn(Cal_BddManager bddManager,
Cal_Bdd varUserBdd);

////////////////////////////////////////////////////////////////////////////////
/// \brief BDD size of `f`.
/// \brief BDD size of `fUserBdd`.
///
/// \param negout If non-zero then the number of nodes in `f` is counted. If
/// zero, the counting pretends the BDDs do not have negative-output pointers.
/// \param negout If non-zero then the number of nodes in `fUserBdd` is counted.
/// If zero, the counting pretends the BDDs do not have
/// negative-output pointers.
////////////////////////////////////////////////////////////////////////////////
EXTERN long Cal_BddSize(Cal_BddManager bddManager,
Cal_Bdd fUserBdd,
Expand Down Expand Up @@ -688,33 +689,14 @@ EXTERN void Cal_BddFunctionProfileMultiple(Cal_BddManager bddManager, Cal_Bdd *f
///
/// \param VarNamingFn A pointer to a function taking a bddManager, a BDD and
/// the pointer given by env. This function should return
/// either a null pointer or a srting that is the name of the
/// either a null pointer or a string that is the name of the
/// supplied variable. If it returns a null pointer, a
/// default name is generated based on the index of the
/// variable. It is also legal for naminFN to be null; in
/// this case, default names are generated for all variables.
/// The macro bddNamingFnNone is a null pointer of suitable
/// type.
///
/// \param TerminalIdFn A pointer to a function taking a bddManager, two longs,
/// and the pointer given by the env. It should return
/// either a null pointer. If it returns a null pointer, or
/// if `terminalIdFn` is null, then default names are
/// generated for the terminals. The macro
/// bddTerminalIdFnNone is a null pointer of suitable type.
///
/// \param fp File to print the output to.
///
/// \see Cal_BddNamingFnNone, Cal_BddTerminalIdFnNone
////////////////////////////////////////////////////////////////////////////////
EXTERN void Cal_BddPrintBdd(Cal_BddManager bddManager,
Cal_Bdd fUserBdd,
Cal_VarNamingFn_t VarNamingFn,
Cal_TerminalIdFn_t TerminalIdFn,
Cal_Pointer_t env,
FILE *fp);

////////////////////////////////////////////////////////////////////////////////
/// \brief Displays the node profile for `f` on `fp`.
///
/// \param lineLength The maximum line length.
Expand Down Expand Up @@ -804,8 +786,6 @@ EXTERN Cal_Bdd Cal_BddNot(Cal_BddManager bddManager, Cal_Bdd userBdd);

////////////////////////////////////////////////////////////////////////////////
/// \brief Substitute a BDD variable by a function.
///
/// \details Returns the BDD obtained by substituting a variable by a function.
////////////////////////////////////////////////////////////////////////////////
EXTERN Cal_Bdd Cal_BddCompose(Cal_BddManager bddManager,
Cal_Bdd fUserBdd,
Expand Down Expand Up @@ -837,8 +817,8 @@ EXTERN Cal_Bdd Cal_BddImplies(Cal_BddManager bddManager,
////////////////////////////////////////////////////////////////////////////////
/// \brief Logical If-Then-Else.
///
/// \details Returns the BDD for the logical operation `f ? g : h`, i.e. *f g +
/// f' h*.
/// \details Returns the BDD for the logical operation `f ? g : h`, i.e.
/// `f&g | ~f&h`.
///
/// \see Cal_BddAnd, Cal_BddNand, Cal_BddOr, Cal_BddNor, Cal_BddXor, Cal_BddXnor
////////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -1094,8 +1074,6 @@ EXTERN Cal_Bdd Cal_BddSatisfySupport(Cal_BddManager bddManager,
////////////////////////////////////////////////////////////////////////////////
/// \brief Fraction of valuations which make `f` true.
///
/// \details Returns the fraction of valuations which make `f` true.
///
/// \remark This fraction is independent of whatever set of variables `f` is
/// supposed to be a function of.
////////////////////////////////////////////////////////////////////////////////
Expand All @@ -1117,15 +1095,15 @@ EXTERN double Cal_BddSatisfyingFraction(Cal_BddManager bddManager,
EXTERN int Cal_BddType(Cal_BddManager bddManager, Cal_Bdd fUserBdd);

////////////////////////////////////////////////////////////////////////////////
/// \brief Returns the id of the top variable of the argument BDD.
/// \brief Returns the index of the top variable of the argument BDD.
///
/// \see Cal_BddGetIfId
////////////////////////////////////////////////////////////////////////////////
EXTERN Cal_BddId_t Cal_BddGetIfIndex(Cal_BddManager bddManager,
Cal_Bdd userBdd);

////////////////////////////////////////////////////////////////////////////////
/// \brief Returns the index of the top variable of the argument BDD.
/// \brief Returns the id of the top variable of the argument BDD.
///
/// \see Cal_BddGetIfIndex
////////////////////////////////////////////////////////////////////////////////
Expand All @@ -1139,15 +1117,15 @@ EXTERN Cal_BddId_t Cal_BddGetIfId(Cal_BddManager bddManager, Cal_Bdd userBdd);
EXTERN Cal_Bdd Cal_BddIf(Cal_BddManager bddManager, Cal_Bdd userBdd);

////////////////////////////////////////////////////////////////////////////////
/// \brief the positive cofactor of the argument BDD with respect to its top
/// \brief The positive cofactor of the argument BDD with respect to its top
/// variable.
///
/// \see Cal_BddElse
////////////////////////////////////////////////////////////////////////////////
EXTERN Cal_Bdd Cal_BddThen(Cal_BddManager bddManager, Cal_Bdd userBdd);

////////////////////////////////////////////////////////////////////////////////
/// \brief the negative cofactor of the argument BDD with respect to its top
/// \brief The negative cofactor of the argument BDD with respect to its top
/// variable.
///
/// \see Cal_BddThen
Expand Down
Loading

0 comments on commit 42ff6c3

Please sign in to comment.