ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
build.c
Go to the documentation of this file.
1#include "build.h"
2#include "colors.h"
3#include "kissat.h"
4#include "print.h"
5
6#include <stdio.h>
7
9
10const char *kissat_signature (void) { return "kissat-" VERSION; }
11
12const char *kissat_id (void) { return ID; }
13
14const char *kissat_compiler (void) { return COMPILER; }
15
16static const char *copyright_lines[] = {
17 "Copyright (c) 2021-2024 Armin Biere University of Freiburg",
18 "Copyright (c) 2019-2021 Armin Biere Johannes Kepler University Linz",
19 0};
20
21const char **kissat_copyright (void) { return copyright_lines; }
22
23const char *kissat_version (void) { return VERSION; }
24
25#define PREFIX(COLORS) \
26 do { \
27 if (prefix) \
28 fputs (prefix, stdout); \
29 COLOR (COLORS); \
30 } while (0)
31
32#define NL() \
33 do { \
34 fputs ("\n", stdout); \
35 COLOR (NORMAL); \
36 } while (0)
37
38void kissat_build (const char *prefix) {
39 TERMINAL (stdout, 1);
40 if (!prefix)
41 connected_to_terminal = false;
42
44 if (ID)
45 printf ("Version %s %s", VERSION, ID);
46 else
47 printf ("Version %s", VERSION);
48 NL ();
49
51 printf ("%s", COMPILER);
52 NL ();
53
55 printf ("%s", BUILD);
56 NL ();
57}
58
59void kissat_banner (const char *prefix, const char *name) {
60 TERMINAL (stdout, 1);
61 if (!prefix)
62 connected_to_terminal = false;
63
65 printf ("%s", name);
66 NL ();
67
69 NL ();
70
71 for (const char **p = kissat_copyright (), *line; (line = *p); p++) {
73 fputs (line, stdout);
74 NL ();
75 }
76
77 if (prefix) {
78 PREFIX ("");
79 NL ();
80 }
81
82 kissat_build (prefix);
83}
84
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
const char * kissat_version(void)
Definition build.c:23
const char * kissat_compiler(void)
Definition build.c:14
const char ** kissat_copyright(void)
Definition build.c:21
#define NL()
Definition build.c:32
void kissat_banner(const char *prefix, const char *name)
Definition build.c:59
const char * kissat_id(void)
Definition build.c:12
void kissat_build(const char *prefix)
Definition build.c:38
ABC_NAMESPACE_IMPL_START const char * kissat_signature(void)
Definition build.c:10
#define PREFIX(COLORS)
Definition build.c:25
#define BUILD
Definition build.h:7
#define ID
Definition build.h:6
#define COMPILER
#define BOLD
Definition colors.h:14
#define MAGENTA
Definition colors.h:17
#define TERMINAL(F, I)
Definition colors.h:34
#define VERSION
Definition espresso.h:367
Cube * p
Definition exorList.c:222
char * name
Definition main.h:24