Skip to content

Commit d6ac20f

Browse files
committed
[4.0.0]
1 parent 1535e52 commit d6ac20f

File tree

236 files changed

+11005
-15028
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

236 files changed

+11005
-15028
lines changed

.github/workflows/c-cpp.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
run: |
2828
autoconf
2929
./configure
30-
make
30+
make MODE=Release
3131
3232
- name: Tests
3333
working-directory: ./

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## [4.0.0] - 2025-04-11
4+
### Added
5+
- Separated parser grammars for lightweight compilation.
6+
- New implementation of evaluator, cleaner and simpler.
7+
- Support of sets and pwmaps implementation switching in runtime.
8+
- Corrected makefiles and test folders code.
9+
310
## [3.0.0] - 2024-10-09
411
### Added
512
- Implemented Ordered Sets of one-dimensional, compact MDIs.

Makefile.in

+62-30
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
21
# Target variables
3-
MODE ?= Debug
2+
MODE ?= Release
43

54
# The Directories, Source, Includes, Objects, Binary
65
ROOT := .
@@ -10,8 +9,9 @@ GTEST_CODE := $(GTEST_DIR).tar.gz
109
OBJ_DIR := $(ROOT)/obj
1110
BUILD_DIR := $(OBJ_DIR)/release
1211
AST_DIR := $(ROOT)/ast
12+
TEST_DIR := $(ROOT)/test
1313
BIN_DIR := $(ROOT)/bin
14-
ifeq ($(MODE),Debug)
14+
ifeq ($(MODE), Debug)
1515
BUILD_DIR := $(OBJ_DIR)/debug
1616
endif
1717
prefix ?= /usr/local
@@ -20,38 +20,51 @@ includedir ?= $(prefix)/include
2020
libdir ?= $(exec_prefix)/lib
2121
boost_libdir ?= $(prefix)
2222

23+
.PHONY: doc clean create-folders install install-folders lib-gtest test
24+
25+
#///////////////////////////////////////////////////////////////////////////////
26+
# Compilation ------------------------------------------------------------------
27+
#///////////////////////////////////////////////////////////////////////////////
28+
2329
# Flags, Libraries and Includes
2430
INCLUDES := -I. -I$(boost_libdir)/include
25-
CXXFLAGS := -std=c++17 -Wall -Werror -Wno-reorder -O2 -D BOOST_PHOENIX_STL_TUPLE_H_ -D BOOST_MPL_LIMIT_LIST_SIZE=30 -D BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
31+
CXXFLAGS := -std=c++17 -Wno-reorder -O3
2632
ifeq ($(MODE),Debug)
27-
CXXFLAGS += -ggdb
33+
CXXFLAGS += -ggdb -Wall -Werror
2834
endif
2935
LIB_SBGRAPH = lib/libsbgraph.a
3036

3137
all: $(LIB_SBGRAPH)
3238

39+
include util/Makefile.include
3340
include sbg/Makefile.include
3441
include parser/Makefile.include
35-
include util/Makefile.include
3642
include eval/Makefile.include
37-
include test/Makefile.include
3843

39-
$(BUILD_DIR)/%.o : %.cpp
44+
create-folders::
45+
@mkdir -p $(ROOT)/lib
46+
@mkdir -p $(OBJ_DIR)
47+
@mkdir -p $(BUILD_DIR)
48+
@mkdir -p $(BUILD_DIR)/$(AST_DIR)
49+
@mkdir -p $(BIN_DIR)
50+
51+
$(BUILD_DIR)/%.o : %.cpp | create-folders
4052
$(CC) $(INCLUDES) $(CXXFLAGS) -MM -MT $@ -MF $(patsubst %.o,%.d,$@) $<
4153
$(CC) $(INCLUDES) -c $< -o $@ $(CXXFLAGS)
4254

43-
$(LIB_SBGRAPH): create-folders $(SBG_OBJ) $(UTIL_OBJ) $(PARSER_OBJ) $(EVAL_OBJ)
44-
$(AR) rcs $(LIB_SBGRAPH) $(SBG_OBJ) $(UTIL_OBJ) $(PARSER_OBJ) $(EVAL_OBJ)
55+
LIB_SRC := $(shell find ast parser sbg eval util -type f -name "*.cpp" ! -name "main.cpp")
56+
LIB_OBJ = $(addprefix $(BUILD_DIR)/, $(LIB_SRC:.cpp=.o))
4557

46-
lib-gtest: | create-folders
47-
ifeq ("$(wildcard $(3RD_PARTY_DIR)/gtest/usr/lib)","")
48-
cd $(3RD_PARTY_DIR)/gtest; tar xvzf $(GTEST_CODE)
49-
mkdir -p $(3RD_PARTY_DIR)/gtest/build
50-
cd $(3RD_PARTY_DIR)/gtest/build; cmake ../$(GTEST_DIR) -DCMAKE_INSTALL_PREFIX=../usr
51-
cd $(3RD_PARTY_DIR)/gtest/build; make install
52-
rm -rf $(3RD_PARTY_DIR)/gtest/$(GTEST_DIR)
53-
rm -rf $(3RD_PARTY_DIR)/gtest/build
54-
endif
58+
$(LIB_SBGRAPH): create-folders $(LIB_OBJ)
59+
$(AR) rcs $(LIB_SBGRAPH) $(LIB_OBJ)
60+
61+
DEPS = $(addprefix $(BUILD_DIR)/, $(LIB_SRC:.cpp=.d))
62+
63+
-include $(DEPS)
64+
65+
#///////////////////////////////////////////////////////////////////////////////
66+
# Library Installation ---------------------------------------------------------
67+
#///////////////////////////////////////////////////////////////////////////////
5568

5669
install: | install-folders
5770
@echo "Installing SBG library headers."
@@ -73,26 +86,41 @@ install-folders:
7386
@mkdir -p $(includedir)/parser
7487
@mkdir -p $(includedir)/eval
7588

76-
create-folders::
77-
@mkdir -p $(ROOT)/lib
78-
@mkdir -p $(OBJ_DIR)
79-
@mkdir -p $(BUILD_DIR)
80-
@mkdir -p $(BUILD_DIR)/$(AST_DIR)
81-
@mkdir -p $(BIN_DIR)
89+
#///////////////////////////////////////////////////////////////////////////////
90+
# Testing ----------------------------------------------------------------------
91+
#///////////////////////////////////////////////////////////////////////////////
92+
93+
lib-gtest: | create-folders
94+
ifeq ("$(wildcard $(3RD_PARTY_DIR)/gtest/usr/lib)","")
95+
cd $(3RD_PARTY_DIR)/gtest; tar xvzf $(GTEST_CODE)
96+
mkdir -p $(3RD_PARTY_DIR)/gtest/build
97+
cd $(3RD_PARTY_DIR)/gtest/build; cmake ../$(GTEST_DIR) -DCMAKE_INSTALL_PREFIX=../usr
98+
cd $(3RD_PARTY_DIR)/gtest/build; make install
99+
rm -rf $(3RD_PARTY_DIR)/gtest/$(GTEST_DIR)
100+
rm -rf $(3RD_PARTY_DIR)/gtest/build
101+
endif
102+
103+
test: lib-gtest
104+
@cd $(TEST_DIR) && ./compile_run_tests.sh
82105

83-
.PHONY: doc
106+
#///////////////////////////////////////////////////////////////////////////////
107+
# Documentation ----------------------------------------------------------------
108+
#///////////////////////////////////////////////////////////////////////////////
84109

85110
doc:
86111
@mkdir -p $(ROOT)/doc
87112
@mkdir -p $(ROOT)/doc/html
88113
@mkdir -p $(ROOT)/doc/latex
114+
doxygen eval/EVAL.doxyfile
89115
doxygen sbg/SBG.doxyfile
90116
doxygen util/UTIL.doxyfile
91117

92-
test: lib-gtest $(SBG_TEST)
118+
#///////////////////////////////////////////////////////////////////////////////
119+
# Cleaning ---------------------------------------------------------------------
120+
#///////////////////////////////////////////////////////////////////////////////
121+
122+
TEST_DIRS := test/parser test/performance test/performance/boost test/eval
93123

94-
TEST_DIRS := test/parser test/performance test/performance/boost test/eval
95-
96124
clean:
97125
$(RM) -rf $(BIN_DIR) $(OBJ_DIR) $(LIB_SBGRAPH) $(ROOT)/lib $(ROOT)/include $(3RD_PARTY_DIR)/gtest/usr
98126
for dir in $(TEST_DIRS); do \
@@ -101,11 +129,15 @@ clean:
101129
$(RM) -rf $$dir/test_data; \
102130
done
103131

132+
#///////////////////////////////////////////////////////////////////////////////
133+
# Help -------------------------------------------------------------------------
134+
#///////////////////////////////////////////////////////////////////////////////
135+
104136
help:
105137
@echo "make MODE=<Debug|Release> prefix=<PATH> exec_prefix=<PATH> includedir=<PATH> libdir=<PATH> boost_libdir=<PATH>"
106138
@echo "Default values:"
107139
@echo ""
108-
@echo "MODE=Debug"
140+
@echo "MODE=Release"
109141
@echo "prefix=/usr/local"
110142
@echo "exec_prefix=/usr/local"
111143
@echo "includedir=/usr/local/include"

README.md

+13-4
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ The simplest way to compile this package is:
6666

6767
The makefile script accepts the following options:
6868

69-
* MODE = <Debug|Release> When set to Debug (default), adds the compiler's debug flags.
69+
* MODE = <Debug|Release> When set to Debug, adds the compiler's debug flags. Set to Release
70+
by default.
7071

7172
* prefix = <Installation prefix path> Set the prefix installation path, default: /usr/local.
7273

@@ -96,9 +97,10 @@ The SBG library is composed by four main modules:
9697

9798
* sbg
9899

99-
The first three were developed to allow for more user-friendly input. The first
100-
three were developed to allow for more user-friendly input, and the last one
101-
contains all the logical implementation of structures and operations.
100+
The library started with only sbg module, but then it was extended with the
101+
other three to enable faster debugging. While not necessary for client
102+
applications, these optional tools are useful to grasp SBG concepts and
103+
operations.
102104

103105
## Examples:
104106

@@ -117,6 +119,13 @@ Report bugs to: marzorati@cifasis-conicet.gov.ar or fernandez@cifasis-conicet.go
117119

118120
# Changelog
119121

122+
## [4.0.0] - 2025-04-11
123+
### Added
124+
- Separated parser grammars for lightweight compilation.
125+
- New implementation of evaluator, cleaner and simpler.
126+
- Support of sets and pwmaps implementation switching in runtime.
127+
- Corrected makefiles and test folders code.
128+
120129
## [3.0.0] - 2024-10-09
121130
### Added
122131
- Implemented Ordered Sets of one-dimensional, compact MDIs.

0 commit comments

Comments
 (0)