This commit is contained in:
Vítor Santos Costa
2014-09-22 18:13:35 +01:00
parent f29e017c63
commit 3e255ec4a1
18 changed files with 476 additions and 196 deletions

View File

@@ -302,5 +302,11 @@ typedef enum
YAPC_ENABLE_AGC /* enable or disable atom garbage collection */
} yap_flag_t;
typedef enum yap_enum_reset_t {
YAP_EXEC_ABSMI = 0,
YAP_FULL_RESET = 1,
YAP_RESET_FROM_RESTORE = 3
} yap_reset_t;
\
#endif /* _YAPDEFS_H */

View File

@@ -859,10 +859,13 @@ Look for the next solution to the current query by forcing YAP to
backtrack to the latest goal. Notice that slots allocated since the last
YAP_RunGoal() will become invalid.
@Item `int` YAP_Reset(`void`)
Reset execution environment (similar to the [abort/0](@ref abort)
built-in). This is useful when you want to start a new query before
asking all solutions to the previous query.
@Item `int` YAP_Reset(`yap_reset_t mode`)
Reset execution environment
(similar to the abort/0 built-in). This is useful when
you want to start a new query before asking all solutions to the
previous query. 'mode` specifies how deep the Reset will go and what
to do next. It will be most often set to `YAP_FULL_RESET`.
</li>
<li>`int` YAP_ShutdownGoal(`int backtrack`)
@@ -1829,7 +1832,7 @@ extern X_API YAP_Bool YAP_GoalHasException(YAP_Term *);
/* void YAP_ClearExceptions(void) */
extern X_API void YAP_ClearExceptions(void);
extern X_API int YAP_Reset(void);
extern X_API int YAP_Reset(yap_reset_t reset);
extern X_API void YAP_Error(int myerrno, YAP_Term t, const char *buf, ...);