summaryrefslogtreecommitdiff
path: root/operetta.c
diff options
context:
space:
mode:
authorKai Stevenson <kai@kaistevenson.com>2023-06-13 01:59:43 -0700
committerKai Stevenson <kai@kaistevenson.com>2023-06-13 01:59:43 -0700
commit2f7ac38cca2ebab41b8adb76b69e0949eeae488d (patch)
tree6395841e2dbc557f619635f9b04fdd6e26a9985c /operetta.c
parent8f4eb9fc953512365f9258ffd5d11ed8950f77a9 (diff)
fixed bugs, just_is_sound works for conjunct intro
Diffstat (limited to 'operetta.c')
-rw-r--r--operetta.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/operetta.c b/operetta.c
index 2c4f555..c72a979 100644
--- a/operetta.c
+++ b/operetta.c
@@ -4,6 +4,7 @@
#include "lexer.h"
#include "parse.h"
#include "proposition.h"
+#include "eval.h"
int main(int argc, char** argv) {
/* read file */
@@ -12,12 +13,15 @@ int main(int argc, char** argv) {
int lineCount = count_lines(content);
lineSet_t lines = parse_lines(content, lineCount);
for (int i = 0; i < lines.count; i++) {
- for (int j = 0; j < lines.lines[i].aLevel; j++) {
+ line_t line = lines.lines[i];
+ printf("%d. ", i + 1);
+ for (int j = 0; j < line.aLevel; j++) {
printf(" > ");
}
- write_prop(lines.lines[i].proposition);
+ write_prop(line.proposition);
printf(" BECAUSE: ");
- write_just(lines.lines[i].justification);
+ write_just(line.justification);
+ printf(just_is_sound(line.proposition, line.justification, lines) ? " <SOUND>" : " <UNSOUND>");
printf("\n");
}
free(content);