-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ref: introduce templated formula and expression visitors
- Loading branch information
Showing
31 changed files
with
810 additions
and
609 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
/** | ||
* @author Ernesto Casablanca ([email protected]) | ||
* @copyright 2024 dlinear | ||
* @licence BSD 3-Clause License | ||
* Sort enum. | ||
*/ | ||
* @author Ernesto Casablanca ([email protected]) | ||
* @copyright 2024 dlinear | ||
* @licence BSD 3-Clause License | ||
* Sort enum. | ||
*/ | ||
#pragma once | ||
|
||
#include <ostream> | ||
|
@@ -15,34 +15,34 @@ namespace dlinear::smt2 { | |
|
||
/** Sort of a term. */ | ||
enum class Sort { | ||
Binary, ///< Binary sort. | ||
Bool, ///< Boolean sort. | ||
Int, ///< Integer sort. | ||
Real, ///< Real sort. | ||
Binary, ///< Binary sort. | ||
Bool, ///< Boolean sort. | ||
Int, ///< Integer sort. | ||
Real, ///< Real sort. | ||
}; | ||
|
||
/** | ||
* Parse a string to a sort. | ||
* @param s string to parse | ||
* @return sort parsed from @p s | ||
*/ | ||
* Parse a string to a sort. | ||
* @param s string to parse | ||
* @return sort parsed from @p s | ||
*/ | ||
Sort ParseSort(const std::string &s); | ||
/** | ||
* Convert a sort to a variable type. | ||
* | ||
* The conversion is as follows: | ||
* - Binary -> BINARY | ||
* - Bool -> BOOLEAN | ||
* - Int -> INTEGER | ||
* - Real -> CONTINUOUS | ||
* @param sort sort to convert | ||
* @return variable type corresponding to @p sort | ||
*/ | ||
* Convert a sort to a variable type. | ||
* | ||
* The conversion is as follows: | ||
* - Binary -> BINARY | ||
* - Bool -> BOOLEAN | ||
* - Int -> INTEGER | ||
* - Real -> CONTINUOUS | ||
* @param sort sort to convert | ||
* @return variable type corresponding to @p sort | ||
*/ | ||
Variable::Type SortToType(Sort sort); | ||
|
||
std::ostream &operator<<(std::ostream &os, const Sort &sort); | ||
|
||
} // namespace dlinear::vnnlib | ||
} // namespace dlinear::smt2 | ||
|
||
#ifdef DLINEAR_INCLUDE_FMT | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.