flisboac / adl Goto Github PK
View Code? Open in Web Editor NEWAbstract Domain Library, a C++ library implementing the octagon domain in CPU and GPU. (may add more abstract domains in the future!)
License: MIT License
Abstract Domain Library, a C++ library implementing the octagon domain in CPU and GPU. (may add more abstract domains in the future!)
License: MIT License
The name of the classes and header files follow the names of the enum's constants.
This module unit includes all of its inner modules in its main .hpp
file. Also, an additional .cfg.hpp
should be responsible for all preprocessor verifications, if any.
All of this module's types (e.g. namespace-level typedefs, classes, enums, structs, unions) must be forward-declared in the module's .fwd.hpp
header. Inner artifacts (e.g. module, component) are prohibited to forward-declare types anywhere else.
So, github does not let me delete issues. Playing with the issues system in a final repository is out of question now. Lesson learned.
Signature:
template <
typename ValueType
typename ValueTraits>
template <
std::size_t ArraySize,
typename ValueType_,
template VarType_,
template = std::enable_if_t<
std::is_convertible<ValueType, ValueType_>::value
&& common_var<VarType_>::is_oct_space>
oct_cons<ValueType, ValueTraits>::oct_cons(
oct_cons<ValueType_, VarType_> (&constraints)[ArraySize]
);
template <
typename ValueType
typename ValueTraits>
template <
std::size_t ArraySize,
typename ValueType_,
template VarType_,
template = std::enable_if_t<
std::is_convertible<ValueType, ValueType_>::value
&& common_var<VarType_>::is_oct_space>
std::size_t insert(oct_cons<ValueType_, VarType_> (&constraints)[ArraySize]);
template <
typename ValueType
typename ValueTraits>
template <typename IterType>
std::size_t insert(IterType begin, IterType end);
This includes migrating all functions from adl::operators and adl::dsl namespaces into the adl::oct namespace.
E.g. template <VarType_, typename = common_var_t<VarType_>> void function(VarType_)
into void function(oct_var)
, void function(octdiff_var)
, ...
Also, all global operator<<
would use this as an option. Preferably, to_string()
would use to_string(std::ostream)
, to avoid duplicating code.
A "traits"-like class with the implementations for all the operators. Accepts mark_timers.
So, github does not let me delete issues. Playing with the issues system in a final repository is out of question now. Lesson learned.
This module contains the CPU implementation of a DBM and all of the operators for the octagon domain.
For use in CPU execution profiling.
Guidelines for implementations:
adl_*CLASS
adl_*CLASS
adl_*API
adl_IMPL
inline
.Examples for template types:
// Declaration
template<typename T> struct my_type;
// Definition
template<typename T> struct my_type {
void function();
template <typename F> void tpl_function(F);
void inline_function() {}
};
// Member function definition
template <typename T>
inline void my_type<T>::function() {}
// Template member function definition
template <typename T>
template <typename F>
inline void my_type<T>::tpl_function(F) {}
// Specialization declaration (if any)
template<> struct adl_CLASS my_type<int> {
void function();
template <typename F> void tpl_function(F);
void inline_function() {}
};
// Specialization: Member function definition
template <>
adl_IMPL void my_type<int>::function() {}
// Specialization: Template member function definition
template <>
template <typename F>
inline void my_type<int>::tpl_function(F) {}
// Specialization: Template member function specialized definition
template <>
template <>
adl_IMPL void my_type<int>::tpl_function<int>(F) {}
Examples for non-template types:
// Declaration
struct my_type;
// Definition
struct my_type {
void function();
template <typename F> void tpl_function(F);
void inline_function() {}
};
// Specialization: Member function definition
adl_IMPL void my_type::function() {}
// Specialization: Template member function definition
inline void my_type::tpl_function(F) {}
Examples for functions:
// Declaration
adl_API void function();
template <typename F> void tpl_function(F);
template <> adl_API void tpl_function<int>(F);
adl_API void inline_function() {}
// Definition
adl_IMPL void function() {}
template <typename F>
inline void tpl_function(F) {}
template <> adl_IMPL void tpl_function<int>(F) {}
The rest follows standard convention (constexpr at declaration and definition, etc).
This module unit includes all of its inner modules in its main .hpp
file. Also, an additional .cfg.hpp
should be responsible for all preprocessor verifications, if any.
This module implements an octagonal domain-exclusive DSL. This DSL includes user-literals and operators that can be used by the user to define constraints, systems and problems in the octagonal domain. Each of the parent's class that participates in the DSL should have a specific include header file.
Because the DSL does not declare types (as of now), there will be no .fwd.hpp
header file.
A timer that will be used for operator timing measures.
The API still needs to be fleshed out, but in a nutshell, it will use std::chrono
functionality to measure timings on various places of interest in the algorithms.' Imagine:
adl::util::timer_list timers;
for (...) { // suppose 5 iterations
timer.start();
// (processing, suppose 5th was fastest)
timer.stop();
}
timers.size(); // 5
timers.fastest(); // an adl::util::timer_list::entry
timers.slowest(); // an adl::util::timer_list::entry
timers.fastest().index(); // 4 (starts at 0)
timers.min(); // an adl::util::timer_list::entry
timers.max(); // an adl::util::timer_list::entry
timers.fastest().duration(); // a std::duration
timers.sum(); // a std::duration
timers.average(); // a std::duration
timers[1].duration(); // a std::duration
The module unit adl
includes all of the inner modules in the project. Every module unit has a main .hpp
file. Also, an additional .cfg.hpp
should be responsible for all preprocessor verifications, if any.
The following main sub-modules are contemplated in this first sprint:
adl
adl/oct
adl/util
adl/oct/dsl
All of the main sub-modules' types (e.g. namespace-level typedefs, classes, enums, structs, unions) must be forward-declared in the module's .fwd.hpp
header. Inner artifacts (e.g. module, component) are prohibited to forward-declare types anywhere else.
Should contain enumerations and values that globally apply to the octagon domain module or to the project as a whole.
adl/error_code
adl/oct/domain_space
adl/oct/oper_kind
adl/oct/dbm_layout
This module unit includes all of its inner modules in its main .hpp
file. Also, an additional .cfg.hpp
should be responsible for all preprocessor verifications, if any.
All of this module's types (e.g. namespace-level typedefs, classes, enums, structs, unions) must be forward-declared in the module's .fwd.hpp
header. Inner artifacts (e.g. module, component) are prohibited to forward-declare types anywhere else.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.