diff options
author | Pedro Souza <pedro@masba.net> | 2024-04-04 01:52:22 -0300 |
---|---|---|
committer | Pedro Souza <pedro@masba.net> | 2024-04-04 01:52:22 -0300 |
commit | 5a2f6687f681fa0ceff19a42ec9ddce479e67c48 (patch) | |
tree | 97fbf0acee446c267c2a71e243b239c4b61c8632 /truth_table.h | |
parent | c5921aec313cefa8bd6e8f4c70f057c137133028 (diff) |
Diffstat (limited to 'truth_table.h')
-rw-r--r-- | truth_table.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/truth_table.h b/truth_table.h new file mode 100644 index 0000000..37e535a --- /dev/null +++ b/truth_table.h @@ -0,0 +1,28 @@ +#ifndef TRUTH_TABLE_HG_ +#define TRUTH_TABLE_HG_ +#include <stdint.h> +#include <stdlib.h> +#include <string.h> +#include "tree.h" + +struct truth_table { + uint32_t *lines; + uint8_t lines_count; + char *letters; + size_t letters_count; +}; + +struct expr_input_iter { + struct truth_table *src; + uint32_t acc; + uint32_t count; +}; + +struct expr_input_iter expr_input_iter_init(struct truth_table *tt); +int32_t expr_input_iter_next(struct expr_input_iter *self); + +struct truth_table *truth_table_create(node *root, uint32_t letters_bitfield); +void truth_table_destroy(struct truth_table *tt); +void truth_table_fprint(FILE *stream, struct truth_table *tt); + +#endif // TRUTH_TABLE_HG_ |