diff --git a/env b/env
index a0eb41b..9a086eb 100644
--- a/env
+++ b/env
@@ -1,2 +1 @@
-export PATH="$HOME/.c3/bin:$PATH"
-export LD_LIBRARY_PATH="$HOME/.c3/lib:$LD_LIBRARY_PATH"
+export LD_LIBRARY_PATH="$PWD/libkc3/.libs:$LD_LIBRARY_PATH"
diff --git a/lib/kc3/0.1/complex.facts b/lib/kc3/0.1/complex.facts
index a390845..1f8c1bf 100644
--- a/lib/kc3/0.1/complex.facts
+++ b/lib/kc3/0.1/complex.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
version: 1}
replace {Complex, :is_a, :module}
replace {Complex, :symbol, Complex.cast}
diff --git a/lib/kc3/0.1/f128.facts b/lib/kc3/0.1/f128.facts
index 9acc7c4..4f7cba0 100644
--- a/lib/kc3/0.1/f128.facts
+++ b/lib/kc3/0.1/f128.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
version: 1}
replace {F128, :is_a, :module}
replace {F128, :symbol, F128.cast}
diff --git a/lib/kc3/0.1/f32.facts b/lib/kc3/0.1/f32.facts
index 83d2d79..8396522 100644
--- a/lib/kc3/0.1/f32.facts
+++ b/lib/kc3/0.1/f32.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
version: 1}
replace {F32, :is_a, :module}
replace {F32, :symbol, F32.cast}
diff --git a/lib/kc3/0.1/f64.facts b/lib/kc3/0.1/f64.facts
index 76afff9..0f771c5 100644
--- a/lib/kc3/0.1/f64.facts
+++ b/lib/kc3/0.1/f64.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
version: 1}
replace {F64, :is_a, :module}
replace {F64, :symbol, F64.cast}
diff --git a/lib/kc3/0.1/gl/dvec2.c3 b/lib/kc3/0.1/gl/dvec2.c3
deleted file mode 100644
index 114f995..0000000
--- a/lib/kc3/0.1/gl/dvec2.c3
+++ /dev/null
@@ -1,6 +0,0 @@
-defmodule GL.Dvec2 do
-
- defstruct [x: (F64) 0,
- y: (F64) 0]
-
-end
diff --git a/lib/kc3/0.1/gl/dvec2.kc3 b/lib/kc3/0.1/gl/dvec2.kc3
new file mode 100644
index 0000000..114f995
--- /dev/null
+++ b/lib/kc3/0.1/gl/dvec2.kc3
@@ -0,0 +1,6 @@
+defmodule GL.Dvec2 do
+
+ defstruct [x: (F64) 0,
+ y: (F64) 0]
+
+end
diff --git a/lib/kc3/0.1/gl/dvec3.c3 b/lib/kc3/0.1/gl/dvec3.c3
deleted file mode 100644
index 6d2bbeb..0000000
--- a/lib/kc3/0.1/gl/dvec3.c3
+++ /dev/null
@@ -1,7 +0,0 @@
-defmodule GL.Dvec3 do
-
- defstruct [x: (F64) 0,
- y: (F64) 0,
- z: (F64) 0]
-
-end
diff --git a/lib/kc3/0.1/gl/dvec3.kc3 b/lib/kc3/0.1/gl/dvec3.kc3
new file mode 100644
index 0000000..6d2bbeb
--- /dev/null
+++ b/lib/kc3/0.1/gl/dvec3.kc3
@@ -0,0 +1,7 @@
+defmodule GL.Dvec3 do
+
+ defstruct [x: (F64) 0,
+ y: (F64) 0,
+ z: (F64) 0]
+
+end
diff --git a/lib/kc3/0.1/gl/object.c3 b/lib/kc3/0.1/gl/object.c3
deleted file mode 100644
index 6c9efa4..0000000
--- a/lib/kc3/0.1/gl/object.c3
+++ /dev/null
@@ -1,12 +0,0 @@
-defmodule GL.Object do
-
- defstruct [vertex: (GL.Vertex[]) {},
- triangle: (GL.Triangle[]) {},
- gl_mode: (U32) 0,
- gl_vao: (U32) 0,
- gl_vbo: (U32) 0,
- gl_ebo: (U32) 0]
-
- def clean = cfn Void "gl_object_clean" (GL.Object)
-
-end
diff --git a/lib/kc3/0.1/gl/object.kc3 b/lib/kc3/0.1/gl/object.kc3
new file mode 100644
index 0000000..6c9efa4
--- /dev/null
+++ b/lib/kc3/0.1/gl/object.kc3
@@ -0,0 +1,12 @@
+defmodule GL.Object do
+
+ defstruct [vertex: (GL.Vertex[]) {},
+ triangle: (GL.Triangle[]) {},
+ gl_mode: (U32) 0,
+ gl_vao: (U32) 0,
+ gl_vbo: (U32) 0,
+ gl_ebo: (U32) 0]
+
+ def clean = cfn Void "gl_object_clean" (GL.Object)
+
+end
diff --git a/lib/kc3/0.1/gl/sphere.c3 b/lib/kc3/0.1/gl/sphere.c3
deleted file mode 100644
index 4ba9ce4..0000000
--- a/lib/kc3/0.1/gl/sphere.c3
+++ /dev/null
@@ -1,9 +0,0 @@
-defmodule GL.Sphere do
-
- defstruct [object: %GL.Object{},
- segments_u: (Uw) 3,
- segments_v: (Uw) 2]
-
- def clean = cfn Void "gl_sphere_clean" (GL.Sphere)
-
-end
diff --git a/lib/kc3/0.1/gl/sphere.kc3 b/lib/kc3/0.1/gl/sphere.kc3
new file mode 100644
index 0000000..4ba9ce4
--- /dev/null
+++ b/lib/kc3/0.1/gl/sphere.kc3
@@ -0,0 +1,9 @@
+defmodule GL.Sphere do
+
+ defstruct [object: %GL.Object{},
+ segments_u: (Uw) 3,
+ segments_v: (Uw) 2]
+
+ def clean = cfn Void "gl_sphere_clean" (GL.Sphere)
+
+end
diff --git a/lib/kc3/0.1/gl/triangle.c3 b/lib/kc3/0.1/gl/triangle.c3
deleted file mode 100644
index 1e496b0..0000000
--- a/lib/kc3/0.1/gl/triangle.c3
+++ /dev/null
@@ -1,7 +0,0 @@
-defmodule GL.Triangle do
-
- defstruct [a: (U32) 0,
- b: (U32) 1,
- c: (U32) 2]
-
-end
diff --git a/lib/kc3/0.1/gl/triangle.kc3 b/lib/kc3/0.1/gl/triangle.kc3
new file mode 100644
index 0000000..1e496b0
--- /dev/null
+++ b/lib/kc3/0.1/gl/triangle.kc3
@@ -0,0 +1,7 @@
+defmodule GL.Triangle do
+
+ defstruct [a: (U32) 0,
+ b: (U32) 1,
+ c: (U32) 2]
+
+end
diff --git a/lib/kc3/0.1/gl/vec2.c3 b/lib/kc3/0.1/gl/vec2.c3
deleted file mode 100644
index 5cc7a88..0000000
--- a/lib/kc3/0.1/gl/vec2.c3
+++ /dev/null
@@ -1,6 +0,0 @@
-defmodule GL.Vec2 do
-
- defstruct [x: (F32) 0,
- y: (F32) 0]
-
-end
diff --git a/lib/kc3/0.1/gl/vec2.kc3 b/lib/kc3/0.1/gl/vec2.kc3
new file mode 100644
index 0000000..5cc7a88
--- /dev/null
+++ b/lib/kc3/0.1/gl/vec2.kc3
@@ -0,0 +1,6 @@
+defmodule GL.Vec2 do
+
+ defstruct [x: (F32) 0,
+ y: (F32) 0]
+
+end
diff --git a/lib/kc3/0.1/gl/vec3.c3 b/lib/kc3/0.1/gl/vec3.c3
deleted file mode 100644
index bb3d548..0000000
--- a/lib/kc3/0.1/gl/vec3.c3
+++ /dev/null
@@ -1,7 +0,0 @@
-defmodule GL.Vec3 do
-
- defstruct [x: (F32) 0,
- y: (F32) 0,
- z: (F32) 0]
-
-end
diff --git a/lib/kc3/0.1/gl/vec3.kc3 b/lib/kc3/0.1/gl/vec3.kc3
new file mode 100644
index 0000000..bb3d548
--- /dev/null
+++ b/lib/kc3/0.1/gl/vec3.kc3
@@ -0,0 +1,7 @@
+defmodule GL.Vec3 do
+
+ defstruct [x: (F32) 0,
+ y: (F32) 0,
+ z: (F32) 0]
+
+end
diff --git a/lib/kc3/0.1/gl/vertex.c3 b/lib/kc3/0.1/gl/vertex.c3
deleted file mode 100644
index cc90688..0000000
--- a/lib/kc3/0.1/gl/vertex.c3
+++ /dev/null
@@ -1,7 +0,0 @@
-defmodule GL.Vertex do
-
- defstruct [position: %GL.Vec3{},
- normal: %GL.Vec3{},
- tex_coord: %GL.Vec2{}]
-
-end
diff --git a/lib/kc3/0.1/gl/vertex.kc3 b/lib/kc3/0.1/gl/vertex.kc3
new file mode 100644
index 0000000..cc90688
--- /dev/null
+++ b/lib/kc3/0.1/gl/vertex.kc3
@@ -0,0 +1,7 @@
+defmodule GL.Vertex do
+
+ defstruct [position: %GL.Vec3{},
+ normal: %GL.Vec3{},
+ tex_coord: %GL.Vec2{}]
+
+end
diff --git a/lib/kc3/0.1/integer.facts b/lib/kc3/0.1/integer.facts
index 3c36642..313c57f 100644
--- a/lib/kc3/0.1/integer.facts
+++ b/lib/kc3/0.1/integer.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
version: 1}
replace {Integer, :is_a, :module}
replace {Integer, :symbol, Integer.cast}
diff --git a/lib/kc3/0.1/map.facts b/lib/kc3/0.1/map.facts
index 1e77a2a..6dd56a4 100644
--- a/lib/kc3/0.1/map.facts
+++ b/lib/kc3/0.1/map.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
version: 1}
add {Map, :is_a, :module}
add {Map, :symbol, Map.cast}
diff --git a/lib/kc3/0.1/ptr.facts b/lib/kc3/0.1/ptr.facts
index aba9455..7d7a113 100644
--- a/lib/kc3/0.1/ptr.facts
+++ b/lib/kc3/0.1/ptr.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
version: 1}
replace {Ptr, :is_a, :module}
replace {Ptr, :symbol, Ptr.cast}
diff --git a/lib/kc3/0.1/ptr_free.facts b/lib/kc3/0.1/ptr_free.facts
index ccdd3d9..320da15 100644
--- a/lib/kc3/0.1/ptr_free.facts
+++ b/lib/kc3/0.1/ptr_free.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
version: 1}
replace {PtrFree, :is_a, :module}
replace {PtrFree, :symbol, PtrFree.cast}
diff --git a/lib/kc3/0.1/ratio.facts b/lib/kc3/0.1/ratio.facts
index 2fcee68..750d4b5 100644
--- a/lib/kc3/0.1/ratio.facts
+++ b/lib/kc3/0.1/ratio.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
version: 1}
replace {Ratio, :is_a, :module}
replace {Ratio, :symbol, Ratio.cast}
diff --git a/lib/kc3/0.1/s16.facts b/lib/kc3/0.1/s16.facts
index b7c9b40..08ec873 100644
--- a/lib/kc3/0.1/s16.facts
+++ b/lib/kc3/0.1/s16.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
version: 1}
replace {S16, :is_a, :module}
replace {S16, :symbol, S16.cast}
diff --git a/lib/kc3/0.1/s32.facts b/lib/kc3/0.1/s32.facts
index bd47184..c2e110f 100644
--- a/lib/kc3/0.1/s32.facts
+++ b/lib/kc3/0.1/s32.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
version: 1}
replace {S32, :is_a, :module}
replace {S32, :symbol, S32.cast}
diff --git a/lib/kc3/0.1/s64.facts b/lib/kc3/0.1/s64.facts
index 8d32745..7bb761e 100644
--- a/lib/kc3/0.1/s64.facts
+++ b/lib/kc3/0.1/s64.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
version: 1}
replace {S64, :is_a, :module}
replace {S64, :symbol, S64.cast}
diff --git a/lib/kc3/0.1/s8.facts b/lib/kc3/0.1/s8.facts
index 3d4dce0..bb5b3cd 100644
--- a/lib/kc3/0.1/s8.facts
+++ b/lib/kc3/0.1/s8.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
version: 1}
replace {S8, :is_a, :module}
replace {S8, :symbol, S8.cast}
diff --git a/lib/kc3/0.1/str.facts b/lib/kc3/0.1/str.facts
index 459033c..b25372e 100644
--- a/lib/kc3/0.1/str.facts
+++ b/lib/kc3/0.1/str.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
version: 1}
replace {Str, :is_a, :module}
replace {Str, :symbol, Str.cast}
diff --git a/lib/kc3/0.1/sw.facts b/lib/kc3/0.1/sw.facts
index 01309e7..986e73e 100644
--- a/lib/kc3/0.1/sw.facts
+++ b/lib/kc3/0.1/sw.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
version: 1}
replace {Sw, :is_a, :module}
replace {Sw, :symbol, Sw.cast}
diff --git a/lib/kc3/0.1/sym.facts b/lib/kc3/0.1/sym.facts
index dd32895..6fd21c4 100644
--- a/lib/kc3/0.1/sym.facts
+++ b/lib/kc3/0.1/sym.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
version: 1}
replace {Sym, :is_a, :module}
replace {Sym, :symbol, Sym.cast}
diff --git a/lib/kc3/0.1/u16.facts b/lib/kc3/0.1/u16.facts
index 70c376a..9028492 100644
--- a/lib/kc3/0.1/u16.facts
+++ b/lib/kc3/0.1/u16.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
version: 1}
replace {U16, :is_a, :module}
replace {U16, :symbol, U16.cast}
diff --git a/lib/kc3/0.1/u32.facts b/lib/kc3/0.1/u32.facts
index 4d4d606..1bc592a 100644
--- a/lib/kc3/0.1/u32.facts
+++ b/lib/kc3/0.1/u32.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
version: 1}
replace {U32, :is_a, :module}
replace {U32, :symbol, U32.cast}
diff --git a/lib/kc3/0.1/u64.facts b/lib/kc3/0.1/u64.facts
index cd5339b..e490099 100644
--- a/lib/kc3/0.1/u64.facts
+++ b/lib/kc3/0.1/u64.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
version: 1}
replace {U64, :is_a, :module}
replace {U64, :symbol, U64.cast}
diff --git a/lib/kc3/0.1/u8.facts b/lib/kc3/0.1/u8.facts
index c2459e1..12b1575 100644
--- a/lib/kc3/0.1/u8.facts
+++ b/lib/kc3/0.1/u8.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
version: 1}
replace {U8, :is_a, :module}
replace {U8, :symbol, U8.cast}
diff --git a/lib/kc3/0.1/uw.facts b/lib/kc3/0.1/uw.facts
index 99fe9d1..4feef1e 100644
--- a/lib/kc3/0.1/uw.facts
+++ b/lib/kc3/0.1/uw.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
version: 1}
replace {Uw, :is_a, :module}
replace {Uw, :symbol, Uw.cast}
diff --git a/lib/kc3/0.1/var.facts b/lib/kc3/0.1/var.facts
index 7b74bd2..ff2934a 100644
--- a/lib/kc3/0.1/var.facts
+++ b/lib/kc3/0.1/var.facts
@@ -1,3 +1,3 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
version: 1}
replace {Var, :is_a, :module}
diff --git a/lib/kc3/0.1/void.facts b/lib/kc3/0.1/void.facts
index 5243ce3..e6ff745 100644
--- a/lib/kc3/0.1/void.facts
+++ b/lib/kc3/0.1/void.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
version: 1}
replace {Void, :is_a, :module}
replace {Void, :symbol, Void.cast}
diff --git a/libkc3/env.c b/libkc3/env.c
index 2b828c3..9be9d9b 100644
--- a/libkc3/env.c
+++ b/libkc3/env.c
@@ -2012,7 +2012,7 @@ s_env * env_init_args (s_env *env, int *argc, char ***argv)
s_str dir;
sw r;
assert(env);
- if (*argc && *argv) {
+ if (argc && argv && *argc && *argv) {
env->argc = (*argc)--;
env->argv = (*argv)++;
str_init_1(&argv0, NULL, env->argv[0]);
diff --git a/libkc3/facts.c b/libkc3/facts.c
index 3d2f225..efdc262 100644
--- a/libkc3/facts.c
+++ b/libkc3/facts.c
@@ -188,7 +188,7 @@ sw facts_dump (s_facts *facts, s_buf *buf)
tag_init_var(&predicate, &g_sym_Tag);
tag_init_var(&object, &g_sym_Tag);
if ((r = buf_write_1(buf,
- "%{module: C3.Facts.Dump,\n"
+ "%{module: KC3.Facts.Dump,\n"
" version: 1}\n")) < 0)
return r;
result += r;
@@ -317,7 +317,7 @@ sw facts_load (s_facts *facts, s_buf *buf, const s_str *path)
assert(facts);
assert(buf);
if ((r = buf_read_1(buf,
- "%{module: C3.Facts.Dump,\n"
+ "%{module: KC3.Facts.Dump,\n"
" version: 1}\n")) <= 0) {
err_write_1("facts_load: invalid or missing header: ");
err_puts(path->ptr.pchar);
diff --git a/libkc3_window/cairo/xcb/demo/configure b/libkc3_window/cairo/xcb/demo/configure
index 0daf1a3..eb0762f 100755
--- a/libkc3_window/cairo/xcb/demo/configure
+++ b/libkc3_window/cairo/xcb/demo/configure
@@ -17,10 +17,10 @@ export SRC_TOP="$(dirname "$PWD")"
. ../../../../config.subr
-PROG=c3_window_cairo_xcb_demo
-PROG_ASAN=c3_window_cairo_xcb_demo_asan
-PROG_COV=c3_window_cairo_xcb_demo_cov
-PROG_DEBUG=c3_window_cairo_xcb_demo_debug
+PROG=kc3_window_cairo_xcb_demo
+PROG_ASAN=kc3_window_cairo_xcb_demo_asan
+PROG_COV=kc3_window_cairo_xcb_demo_cov
+PROG_DEBUG=kc3_window_cairo_xcb_demo_debug
echo "PROG = $PROG" >> ${CONFIG_MK}
echo "PROG_ASAN = $PROG_ASAN" >> ${CONFIG_MK}
diff --git a/libkc3_window/sdl2/demo/configure b/libkc3_window/sdl2/demo/configure
index 3fae7b7..9c1e950 100755
--- a/libkc3_window/sdl2/demo/configure
+++ b/libkc3_window/sdl2/demo/configure
@@ -17,10 +17,10 @@ export SRC_TOP="$(dirname "$PWD")"
. ../../../config.subr
-PROG=c3_window_sdl2_demo
-PROG_ASAN=c3_window_sdl2_demo_asan
-PROG_COV=c3_window_sdl2_demo_cov
-PROG_DEBUG=c3_window_sdl2_demo_debug
+PROG=kc3_window_sdl2_demo
+PROG_ASAN=kc3_window_sdl2_demo_asan
+PROG_COV=kc3_window_sdl2_demo_cov
+PROG_DEBUG=kc3_window_sdl2_demo_debug
echo "PROG = $PROG" >> ${CONFIG_MK}
echo "PROG_ASAN = $PROG_ASAN" >> ${CONFIG_MK}
diff --git a/libkc3_window/sdl2/window_sdl2.c b/libkc3_window/sdl2/window_sdl2.c
index dc7551d..fa02a9b 100644
--- a/libkc3_window/sdl2/window_sdl2.c
+++ b/libkc3_window/sdl2/window_sdl2.c
@@ -119,7 +119,7 @@ s_window_sdl2 * window_sdl2_init (s_window_sdl2 *window,
{
s_window_sdl2 tmp = {0};
assert(window);
- title = title ? title : "C3.Window.Sdl2";
+ title = title ? title : "KC3.Window.Sdl2";
window_init((s_window *) &tmp, x, y, w, h, title, sequence_count);
tmp.button = window_sdl2_default_button_cb;
tmp.key = window_sdl2_default_key_cb;
diff --git a/test/Makefile b/test/Makefile
index 0981d55..da98a29 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -18,10 +18,10 @@ CLEANFILES = \
*.lo \
*.o \
.libs \
- ic3/*.diff \
- ic3/*.err \
- ic3/*.out \
- ic3/*.ret \
+ ikc3/*.diff \
+ ikc3/*.err \
+ ikc3/*.out \
+ ikc3/*.ret \
libkc3_test \
libkc3_test_asan \
libkc3_test_cov \
@@ -71,31 +71,31 @@ lldb_test: debug
test: libkc3_test
time ./libkc3_test
- IC3=${SRC_TOP}/ic3/ic3 time ./ic3_test
+ IKC3=${SRC_TOP}/ikc3/ikc3 time ./ikc3_test
test_asan: libkc3_test_asan
time ./libkc3_test_asan
- IC3=${SRC_TOP}/ic3/ic3_asan time ./ic3_test
+ IKC3=${SRC_TOP}/ikc3/ikc3_asan time ./ikc3_test
test_cov:
time ./libkc3_test_cov
- IC3=${SRC_TOP}/ic3/ic3_cov time ./ic3_test
+ IKC3=${SRC_TOP}/ikc3/ikc3_cov time ./ikc3_test
test_debug: libkc3_test_debug
time ./libkc3_test_debug
- IC3=${SRC_TOP}/ic3/ic3_debug time ./ic3_test
+ IKC3=${SRC_TOP}/ikc3/ikc3_debug time ./ikc3_test
-test_ic3:
- IC3=${SRC_TOP}/ic3/ic3 time ./ic3_test
+test_ikc3:
+ IKC3=${SRC_TOP}/ikc3/ikc3 time ./ikc3_test
-test_ic3_asan:
- IC3=${SRC_TOP}/ic3/ic3_asan time ./ic3_test
+test_ikc3_asan:
+ IKC3=${SRC_TOP}/ikc3/ikc3_asan time ./ikc3_test
-test_ic3_cov:
- IC3=${SRC_TOP}/ic3/ic3_cov time ./ic3_test
+test_ikc3_cov:
+ IKC3=${SRC_TOP}/ikc3/ikc3_cov time ./ikc3_test
-test_ic3_debug:
- IC3=${SRC_TOP}/ic3/ic3_debug time ./ic3_test
+test_ikc3_debug:
+ IKC3=${SRC_TOP}/ikc3/ikc3_debug time ./ikc3_test
test_libkc3: libkc3_test
time ./libkc3_test
@@ -106,7 +106,7 @@ test_libkc3_cov: libkc3_test_cov
test_valgrind: libkc3_test
valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes ./libkc3_test
-.PHONY: all asan cov debug clean clean_cov distclean ic3_test_cov libkc3_test_cov test test_asan test_cov test_debug test_ic3 test_valgrind
+.PHONY: all asan cov debug clean clean_cov distclean ikc3_test_cov libkc3_test_cov test test_asan test_cov test_debug test_ikc3 test_valgrind
include config.mk
include sources.mk
diff --git a/test/env_test.c b/test/env_test.c
index 78eb1e4..0ac6cee 100644
--- a/test/env_test.c
+++ b/test/env_test.c
@@ -44,7 +44,7 @@ TEST_CASE(env_eval_call)
env_init(&env, 0, NULL);
test_context("env_eval_call(1 + 2) -> 3");
call_init(&call);
- call.ident.module = sym_1("C3");
+ call.ident.module = sym_1("KC3");
call.ident.sym = sym_1("operator_add");
call.arguments = list_new_1("[1, 2]");
tag_init_u8(&expected, 3);
diff --git a/test/facts_test.c b/test/facts_test.c
index e041074..9663d71 100644
--- a/test/facts_test.c
+++ b/test/facts_test.c
@@ -265,7 +265,7 @@ TEST_CASE(facts_load)
s_str path;
facts_init(&facts);
str_init_1(&path, NULL, "facts_test_load_file.facts");
- TEST_EQ(facts_load_file(&facts, &path), 760);
+ TEST_EQ(facts_load_file(&facts, &path), 761);
TEST_EQ(facts_count(&facts), 23);
while (p[i]) {
fact_test_init_1(&fact, p[i]);
@@ -467,7 +467,7 @@ TEST_CASE(facts_open_file)
}
facts_init(&facts);
str_init_1(&path, NULL, "facts_test_open_file.1.facts");
- TEST_EQ(facts_open_file(&facts, &path), 760);
+ TEST_EQ(facts_open_file(&facts, &path), 761);
TEST_EQ(facts_count(&facts), 23);
i = 0;
while (p[i]) {
@@ -502,7 +502,7 @@ TEST_CASE(facts_open_file)
exit(1);
}
str_init_1(&path, NULL, "facts_test_open_file.2.facts");
- TEST_EQ(facts_open_file(&facts, &path), 1523);
+ TEST_EQ(facts_open_file(&facts, &path), 1524);
TEST_EQ(facts_count(&facts), 46);
i = 0;
while (p[i]) {
@@ -534,7 +534,7 @@ TEST_CASE(facts_open_file)
exit(1);
}
str_init_1(&path, NULL, "facts_test_open_file.3.facts");
- TEST_EQ(facts_open_file(&facts, &path), 1550);
+ TEST_EQ(facts_open_file(&facts, &path), 1551);
TEST_EQ(facts_count(&facts), 0);
i = 0;
while (p[i]) {
diff --git a/test/facts_test_dump_file.expected.facts b/test/facts_test_dump_file.expected.facts
index a49fe23..19ea675 100644
--- a/test/facts_test_dump_file.expected.facts
+++ b/test/facts_test_dump_file.expected.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
version: 1}
add {-18446744073709551616, -18446744073709551616, -18446744073709551616}
add {-4294967296, -4294967296, -4294967296}
diff --git a/test/facts_test_load_file.facts b/test/facts_test_load_file.facts
index 2ea637c..d86dd0a 100644
--- a/test/facts_test_load_file.facts
+++ b/test/facts_test_load_file.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
version: 1}
add {a, a, a}
add {-18446744073709551616, -18446744073709551616, -18446744073709551616}
diff --git a/test/facts_test_open_file.1.expected.facts b/test/facts_test_open_file.1.expected.facts
index 61a8b67..3b9a294 100644
--- a/test/facts_test_open_file.1.expected.facts
+++ b/test/facts_test_open_file.1.expected.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
version: 1}
add {a, a, a}
add {-18446744073709551616, -18446744073709551616, -18446744073709551616}
diff --git a/test/facts_test_open_file.1.in.facts b/test/facts_test_open_file.1.in.facts
index 2ea637c..d86dd0a 100644
--- a/test/facts_test_open_file.1.in.facts
+++ b/test/facts_test_open_file.1.in.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
version: 1}
add {a, a, a}
add {-18446744073709551616, -18446744073709551616, -18446744073709551616}
diff --git a/test/facts_test_open_file.2.expected.facts b/test/facts_test_open_file.2.expected.facts
index 637ad54..1ec9bf1 100644
--- a/test/facts_test_open_file.2.expected.facts
+++ b/test/facts_test_open_file.2.expected.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
version: 1}
add {a, a, a}
add {-18446744073709551616, -18446744073709551616, -18446744073709551616}
diff --git a/test/facts_test_open_file.2.in.facts b/test/facts_test_open_file.2.in.facts
index 637ad54..1ec9bf1 100644
--- a/test/facts_test_open_file.2.in.facts
+++ b/test/facts_test_open_file.2.in.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
version: 1}
add {a, a, a}
add {-18446744073709551616, -18446744073709551616, -18446744073709551616}
diff --git a/test/facts_test_open_file.3.expected.facts b/test/facts_test_open_file.3.expected.facts
index e089a6d..000d31f 100644
--- a/test/facts_test_open_file.3.expected.facts
+++ b/test/facts_test_open_file.3.expected.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
version: 1}
add {a, a, a}
add {-18446744073709551616, -18446744073709551616, -18446744073709551616}
diff --git a/test/facts_test_open_file.3.in.facts b/test/facts_test_open_file.3.in.facts
index 43cba38..d2b5e7b 100644
--- a/test/facts_test_open_file.3.in.facts
+++ b/test/facts_test_open_file.3.in.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
version: 1}
add {a, a, a}
add {-18446744073709551616, -18446744073709551616, -18446744073709551616}
diff --git a/test/facts_test_save.expected.facts b/test/facts_test_save.expected.facts
index a49fe23..19ea675 100644
--- a/test/facts_test_save.expected.facts
+++ b/test/facts_test_save.expected.facts
@@ -1,4 +1,4 @@
-%{module: C3.Facts.Dump,
+%{module: KC3.Facts.Dump,
version: 1}
add {-18446744073709551616, -18446744073709551616, -18446744073709551616}
add {-4294967296, -4294967296, -4294967296}
diff --git a/test/ikc3/access.in b/test/ikc3/access.in
index 462ab9a..31f4601 100644
--- a/test/ikc3/access.in
+++ b/test/ikc3/access.in
@@ -24,7 +24,7 @@ quote map.a.b.c + map.a.b.c
map.a.b.c + map.a.b.c
quote "0 #{map.a.b.c} 2"
"0 #{map.a.b.c} 2"
-quote op = %C3.Operator{}
-op = %C3.Operator{}
+quote op = %KC3.Operator{}
+op = %KC3.Operator{}
quote op.sym
op.sym
diff --git a/test/ikc3/access.out.expected b/test/ikc3/access.out.expected
index 50f61e9..dff8b47 100644
--- a/test/ikc3/access.out.expected
+++ b/test/ikc3/access.out.expected
@@ -24,7 +24,7 @@ map.a.b.c + map.a.b.c
2
"0 #{map.a.b.c} 2"
"0 1 2"
-op = %C3.Operator{}
-%C3.Operator{sym: :+, symbol_value: ?, operator_precedence: 0, operator_associativity: :left}
+op = %KC3.Operator{}
+%KC3.Operator{sym: :+, symbol_value: ?, operator_precedence: 0, operator_associativity: :left}
op.sym
:+
diff --git a/test/ikc3/call.in b/test/ikc3/call.in
index c865ba5..b589450 100644
--- a/test/ikc3/call.in
+++ b/test/ikc3/call.in
@@ -8,7 +8,7 @@ quote Test.test(1, 2)
quote Test.test(1, 2, 3)
quote first([1, 2])
first([1, 2])
-quote C3.first([2, 3])
-C3.first([2, 3])
+quote KC3.first([2, 3])
+KC3.first([2, 3])
quote (1 + 2)
(1 + 2)
diff --git a/test/ikc3/def.out.expected b/test/ikc3/def.out.expected
index e2980a2..f8b5f99 100644
--- a/test/ikc3/def.out.expected
+++ b/test/ikc3/def.out.expected
@@ -83,9 +83,9 @@ fn (x) { List.reverse(x) }
reverse([1, 2, 3])
[3, 2, 1]
module()
-C3
+KC3
search_modules()
-[C3]
+[KC3]
reverse
fn (x) { List.reverse(x) }
def reverse = fn (x) { [:reversed | List.reverse(x)] }
@@ -95,9 +95,9 @@ fn (x) { [:reversed | List.reverse(x)] }
reverse([1, 2, 3])
[:reversed, 3, 2, 1]
module()
-C3
+KC3
search_modules()
-[C3]
+[KC3]
reverse
fn (x) { [:reversed | List.reverse(x)] }
def reverse = fn (x) { List.reverse(x) }
@@ -107,8 +107,8 @@ fn (x) { List.reverse(x) }
reverse([1, 2, 3])
[3, 2, 1]
module()
-C3
+KC3
search_modules()
-[C3]
+[KC3]
reverse
fn (x) { List.reverse(x) }
diff --git a/test/ikc3/defoperator.in b/test/ikc3/defoperator.in
index be7fb0c..62c9192 100644
--- a/test/ikc3/defoperator.in
+++ b/test/ikc3/defoperator.in
@@ -1,7 +1,7 @@
-quote %C3.Operator{}
-%C3.Operator{}
-quote def operator_muul = %C3.Operator{sym: :****, symbol_value: cfn Tag "tag_mul" (Tag, Tag, Result), operator_precedence: 11, operator_associativity: :left}
-def operator_muul = %C3.Operator{sym: :****, symbol_value: cfn Tag "tag_mul" (Tag, Tag, Result), operator_precedence: 11, operator_associativity: :left}
+quote %KC3.Operator{}
+%KC3.Operator{}
+quote def operator_muul = %KC3.Operator{sym: :****, symbol_value: cfn Tag "tag_mul" (Tag, Tag, Result), operator_precedence: 11, operator_associativity: :left}
+def operator_muul = %KC3.Operator{sym: :****, symbol_value: cfn Tag "tag_mul" (Tag, Tag, Result), operator_precedence: 11, operator_associativity: :left}
quote 4 **** 4
4 **** 4
quote 4 **** 4 **** 4
diff --git a/test/ikc3/defoperator.out.expected b/test/ikc3/defoperator.out.expected
index 3e92379..5a32f3e 100644
--- a/test/ikc3/defoperator.out.expected
+++ b/test/ikc3/defoperator.out.expected
@@ -1,6 +1,6 @@
-%C3.Operator{}
-%C3.Operator{sym: :+, symbol_value: ?, operator_precedence: 0, operator_associativity: :left}
-def operator_muul = %C3.Operator{sym: :****, symbol_value: cfn Tag "tag_mul" (Tag, Tag, Result), operator_precedence: 11, operator_associativity: :left}
+%KC3.Operator{}
+%KC3.Operator{sym: :+, symbol_value: ?, operator_precedence: 0, operator_associativity: :left}
+def operator_muul = %KC3.Operator{sym: :****, symbol_value: cfn Tag "tag_mul" (Tag, Tag, Result), operator_precedence: 11, operator_associativity: :left}
operator_muul
4 **** 4
16
diff --git a/test/ikc3_test b/test/ikc3_test
index d2938bc..99fbef3 100755
--- a/test/ikc3_test
+++ b/test/ikc3_test
@@ -1,5 +1,5 @@
#!/bin/sh
-cd "$(dirname $0)/ic3" || exit
+cd "$(dirname $0)/ikc3" || exit
TEST_COLOR_KO="[0;91m"
TEST_COLOR_OK="[0;92m"
@@ -8,11 +8,11 @@ TEST_COUNT=0
TEST_KO=0
TEST_OK=0
-if [ "x$IC3" = "x" ]; then
- if [ -f ../../ic3/ic3 ]; then
- IC3=../../ic3/ic3
- elif [ -f ../../ic3 ]; then
- IC3=../../ic3
+if [ "x$IKC3" = "x" ]; then
+ if [ -f ../../ikc3/ikc3 ]; then
+ IKC3=../../ikc3/ikc3
+ elif [ -f ../../ikc3 ]; then
+ IKC3=../../ikc3
fi
fi
@@ -29,10 +29,10 @@ test_ok() {
}
if [ $# = 0 ]; then
- if [ "x${IC3_TEST_TARGETS}" = "x" ]; then
+ if [ "x${IKC3_TEST_TARGETS}" = "x" ]; then
TARGETS="$(ls -1 *.in | sed -e 's/[.]in$//')"
else
- TARGETS="${IC3_TEST_TARGETS}"
+ TARGETS="${IKC3_TEST_TARGETS}"
fi
else
TARGETS="$@"
@@ -40,7 +40,7 @@ fi
for TARGET in $TARGETS; do
RESULT=test_ok
- $IC3 < ${TARGET}.in > ${TARGET}.out 2>&1
+ $IKC3 < ${TARGET}.in > ${TARGET}.out 2>&1
echo $? > ${TARGET}.ret
if ! diff -abu ${TARGET}.out.expected ${TARGET}.out > ${TARGET}.diff
then