front.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /* This file is part of ilk.
  2. *
  3. * Ilk is free software: you can redistribute it and/or modify
  4. * it under the terms of the GNU Lesser General Public License as published by
  5. * the Free Software Foundation, either version 3 of the License, or
  6. * (at your option) any later version.
  7. *
  8. * Ilk is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU Lesser General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU Lesser General Public License
  14. * along with ilk. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #ifndef ILK_FRONT_H
  17. #define ILK_FRONT_H
  18. /*
  19. Include:
  20. #include <dirent.h>
  21. #include <rid.h>
  22. #include <stdint.h>
  23. #include <unfy/unfy.h>
  24. #include <rls/rls.h>
  25. #include <rls/rlsp.h>
  26. #include <nit/list.h>
  27. #include <nit/set.h>
  28. #include <nit/map.h>
  29. #include <nit/err.h>
  30. #include <nit/file.h>
  31. #include <nit/buf.h>
  32. #include <nit/gap.h>
  33. #include <ilk/utilize.h>
  34. #include <ilk/front.h>
  35. */
  36. #ifndef STYLE_9
  37. #include <ilk/utilize.h>
  38. #endif
  39. void
  40. ilk_lib_init(Ilk_lib *lib, uint16_t act_max, Rls_act *act_table);
  41. void
  42. ilk_lib_dispose(Ilk_lib *lib);
  43. int
  44. ilk_sys_init(Ilk_sys *sys, Ilk_lib *lib, const char *dir_name);
  45. void
  46. ilk_sys_dispose(Ilk_sys *sys);
  47. Ilk_sys *
  48. ilk_sys(Ilk_lib *lib, const char *dir_name);
  49. void
  50. ilk_sys_rec(Ilk_sys *sys);
  51. int
  52. ilk_sys_save(Ilk_sys *sys);
  53. const char *
  54. ilk_rule_valid(const Unfy_term *head, const Unfy_list *body);
  55. Ilk_grp *
  56. ilk_rule_add(Ilk_sys *sys, const Rid id, Unfy_term *head, Unfy_list *body,
  57. uint64_t srch_cnt);
  58. Ilk_grp *
  59. ilk_act_add(Ilk_sys *sys, const Rid id, Unfy_term *head, uint16_t act_id);
  60. Unfy_stat
  61. ilk_srch_n_save(Ilk_sys *sys, Rls_srch **srch_ref, Unfy_term *term,
  62. int *limit, Rls_info *info);
  63. #endif