Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ release_set:
$(eval OPT_TYPE=release)

debug_set:
$(eval OPT_FLAGS=-DDEBUG_INFO -g3 -fsanitize=undefined -fsanitize=address -fsanitize=enum -fsanitize=signed-integer-overflow -fsanitize=undefined -Wall -Wno-switch -Wno-misleading-indentation)
$(eval OPT_FLAGS=-DDEBUG_INFO -g3 -Wall -Wno-switch -Wno-misleading-indentation)
$(eval OPT_TYPE=debug)

bin/ode_shell: src/ode_shell.c build/code_converter.o build/pipe_utils.o build/commands.o build/command_corrector.o build/string_utils.o build/model_config.o build/inotify_helpers.o build/to_latex.o build/md5.o build/gnuplot_utils.o build/libfort.a build/libcompiler.a
Expand Down
257 changes: 132 additions & 125 deletions src/code_converter.c

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions src/code_converter.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef __C_CONVERTER_H
#define __C_CONVERTER_H
#define __C_CONVERTER_H

#include <stdio.h>
#include "compiler/parser.h"
#include <stdio.h>

#define EXPOSED_ODE_VALUES_NAME "__exposed_odes_values__"

Expand All @@ -11,11 +11,16 @@ struct var_declared_entry_t {
int value;
};

typedef enum solver_type_t{
typedef enum solver_type_t {
CVODE_SOLVER,
EULER_ADPT_SOLVER
} solver_type;

typedef struct solver_config_t {
unsigned int indentation_level;
solver_type solver_type;
} solver_config;

bool convert_to_c(program p, FILE *out, solver_type solver);

#endif /* __C_CONVERTER_H */
2 changes: 1 addition & 1 deletion src/compiler/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ release_set:
$(eval OPT_FLAGS=-O2)

debug_set:
$(eval OPT_FLAGS=-g3 -fsanitize=address -Wall -Wno-switch -Wno-stringop-overflow -Wno-misleading-indentation -mavx -maes)
$(eval OPT_FLAGS=-g3 -DDEBUG_INFO -Wall -Wno-switch -Wno-stringop-overflow -Wno-misleading-indentation -mavx -maes)

common: libcompiler.a

Expand Down
2 changes: 1 addition & 1 deletion src/libfort/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ release_set:
$(eval OPT_FLAGS=-O2)

debug_set:
$(eval OPT_FLAGS=-g3 -fsanitize=address -Wall -Wno-switch -Wno-stringop-overflow -Wno-misleading-indentation -mavx -maes)
$(eval OPT_FLAGS=-g3 -Wall -Wno-switch -Wno-stringop-overflow -Wno-misleading-indentation -mavx -maes)

common: libfort.a

Expand Down
2 changes: 1 addition & 1 deletion src/string/sds.c
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ int sdscmp(const sds s1, const sds s2) {
}

sds *sdssplit(const char *s, const char *sep, int *count) {
sdssplitlen(s, strlen(s), sep, strlen(sep), count);
return sdssplitlen(s, strlen(s), sep, strlen(sep), count);
Copy link

Copilot AI Sep 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original code was missing a return statement, which would cause undefined behavior. This fix correctly returns the result of sdssplitlen.

Copilot uses AI. Check for mistakes.
}

/* Split 's' with separator in 'sep'. An array
Expand Down
309 changes: 0 additions & 309 deletions teste

This file was deleted.

2 changes: 1 addition & 1 deletion tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ all: build_dir libcompiler.a
debug: debug_set all

debug_set:
$(eval OPT_FLAGS=-DDEBUG_INFO -g3 -fsanitize=undefined -fsanitize=address -fsanitize=enum -fsanitize=signed-integer-overflow -fsanitize=undefined -Wall -Wno-switch -Wno-misleading-indentation)
$(eval OPT_FLAGS=-DDEBUG_INFO -g3 -Wall -Wno-switch -Wno-misleading-indentation)
$(eval OPT_TYPE=debug)


Expand Down
Loading