# kitty
**Repository Path**: nlwmode_personal/kitty
## Basic Information
- **Project Name**: kitty
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2021-11-11
- **Last Updated**: 2021-11-11
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
[](https://github.com/msoeken/kitty/actions)
[](https://github.com/msoeken/kitty/actions)
[](https://github.com/msoeken/kitty/actions)
[](http://libkitty.readthedocs.io/en/latest/?badge=latest)
[](https://www.codacy.com/app/msoeken/kitty?utm_source=github.com&utm_medium=referral&utm_content=msoeken/kitty&utm_campaign=Badge_Grade)
[](https://github.com/msoeken/kitty/releases)
[](https://opensource.org/licenses/MIT)
# kitty
kitty is a C++-17 truth table library. It provides efficient implementations for basic truth table manipulations and various algorithms.
[Read the full documentation.](http://libkitty.readthedocs.io/en/latest/?badge=latest)
## Example
The following code snippet generates truth tables for the 3-variable functions `sum` and `carry` for a 1-bit full-adder with carry.
```c++
#include
dynamic_truth_table a( 3 ), b( 3 ), c( 3 );
create_nth_var( a, 0 );
create_nth_var( b, 1 );
create_nth_var( c, 2 );
const auto sum = a ^ b ^ c;
const auto carry = ternary_majority( a, b, c );
```
One can use `static_truth_table` instead of `dynamic_truth_table`, if the number of variables is known at compile-time. The interface stays the same.
```c++
#include
static_truth_table<3> a, b, c;
create_nth_var( a, 0 );
create_nth_var( b, 1 );
create_nth_var( c, 2 );
const auto sum = a ^ b ^ c;
const auto carry = ternary_majority( a, b, c );
```
## EPFL logic sythesis libraries
kitty is part of the [EPFL logic synthesis](https://lsi.epfl.ch/page-138455-en.html) libraries. The other libraries and several examples on how to use and integrate the libraries can be found in the [logic synthesis tool showcase](https://github.com/lsils/lstools-showcase).