lib for calling wild_life from C More...
Go to the source code of this file.
Functions | |
| char ** | group_features (char **f, ptr_node n) |
| group_features More... | |
| void | exit_if_true (long exitflag) |
| exit_if_true More... | |
| void | init_io () |
| void init_io More... | |
| void | init_system () |
| init_system More... | |
| void | WFInit (long argc, char *argv[]) |
| WFInit. More... | |
| int | WFInput (char *query) |
| WFInput. More... | |
| PsiTerm | WFGetVar (char *name) |
| WFGetVar. More... | |
| int | WFfeature_count_loop (ptr_node n) |
| WFfeature_count_loop. More... | |
| int | WFFeatureCount (ptr_psi_term psi) |
| WFFeatureCount. More... | |
| char * | WFType (ptr_psi_term psi) |
| WFType. More... | |
| char ** | WFFeatures (ptr_psi_term psi) |
| WFFeatures. More... | |
| double | WFGetDouble (ptr_psi_term psi, int *ok) |
| WFGetDouble. More... | |
| char * | WFGetString (ptr_psi_term psi, int *ok) |
| WFGetString. More... | |
| PsiTerm | WFGetFeature (ptr_psi_term psi, char *feature) |
| WFGetFeature. More... | |
Variables | |
| long | noisy =TRUE |
| long | file_date =3 |
| long | types_done =FALSE |
| float | garbage_time =0 |
| void exit_if_true | ( | long | exitflag | ) |
| char** group_features | ( | char ** | f, |
| ptr_node | n | ||
| ) |
group_features
| char | **f |
| ptr_node | n |
Definition at line 34 of file lib.c.
References wl_node::key, wl_node::left, NULL, and wl_node::right.
| void init_io | ( | ) |
void init_io
I/O initialization
Definition at line 69 of file lib.c.
References buffer, input_state, NULL, output_stream, stdin_state, stdin_terminal, and TRUE.
| void init_system | ( | ) |
init_system
Initial state of system to begin a query
Definition at line 94 of file lib.c.
References choice_stack, current_module, exit_if_true(), FALSE, goal_stack, init_global_vars(), mem_base, memory_check(), wl_module::module_name, NULL, prompt, PROMPT, PROMPT_BUFFER, prompt_buffer, resid_aim, stack_nil(), stack_pointer, undo_stack, user_module, var_tree, x_window_creation, and xevent_list.
| int WFfeature_count_loop | ( | ptr_node | n | ) |
WFfeature_count_loop.
| ptr_node | n |
Definition at line 336 of file lib.c.
References wl_node::left, and wl_node::right.
| int WFFeatureCount | ( | ptr_psi_term | psi | ) |
WFFeatureCount.
| ptr_psi_term | psi |
Definition at line 357 of file lib.c.
References wl_psi_term::attr_list, deref_ptr, and WFfeature_count_loop().
| char** WFFeatures | ( | ptr_psi_term | psi | ) |
WFFeatures.
| ptr_psi_term | psi |
Definition at line 391 of file lib.c.
References wl_psi_term::attr_list, deref_ptr, group_features(), NULL, and WFfeature_count_loop().
| double WFGetDouble | ( | ptr_psi_term | psi, |
| int * | ok | ||
| ) |
WFGetDouble.
| ptr_psi_term | psi |
| int | *ok |
Definition at line 416 of file lib.c.
References deref_ptr, FALSE, real, sub_type(), TRUE, wl_psi_term::type, and wl_psi_term::value_3.
| PsiTerm WFGetFeature | ( | ptr_psi_term | psi, |
| char * | feature | ||
| ) |
WFGetFeature.
| ptr_psi_term | psi |
| char | *feature |
Definition at line 468 of file lib.c.
References wl_psi_term::attr_list, wl_node::data, deref_ptr, FEATCMP, find(), and NULL.
| char* WFGetString | ( | ptr_psi_term | psi, |
| int * | ok | ||
| ) |
WFGetString.
| ptr_psi_term | psi |
| int | *ok |
Definition at line 442 of file lib.c.
References deref_ptr, FALSE, NULL, quoted_string, sub_type(), TRUE, wl_psi_term::type, and wl_psi_term::value_3.
| PsiTerm WFGetVar | ( | char * | name | ) |
WFGetVar.
| char | *name |
Definition at line 315 of file lib.c.
References wl_node::data, deref_ptr, find(), NULL, STRCMP, and var_tree.
| void WFInit | ( | long | argc, |
| char * | argv[] | ||
| ) |
WFInit.
| long | argc |
| char | *argv[] |
WFINIT(argc,argv) This routine contains the Read-Solve-Print loop.
Definition at line 133 of file lib.c.
References arg_c, arg_v, assert, begin_terminal_io(), c_query_level, env, Errorline(), exit_if_true(), FALSE, file_date, heap_copy_string(), init_built_in_types(), init_copy(), init_interrupt(), init_io(), init_memory(), init_modules(), init_print(), init_system(), init_trace(), input_state, load, main_prove(), mem_base, noisy, open_input_file(), other_base, push_goal(), quietflag, rand_array, set_current_module(), stack_pointer, stdin_cleareof(), title(), TRUE, undo_stack, user_module, var_occurred, and x_setup_builtins().
| int WFInput | ( | char * | query | ) |
WFInput.
| char | *query |
Definition at line 226 of file lib.c.
References wl_goal::aaaa_1, assert_clause(), assert_first, assert_ok, c_query_level, c_what_next, choice_stack, DEFRULES, encode_types(), FACT, fail, FALSE, goal_count, goal_stack, ignore_eff, init_parse_state(), main_prove(), wl_goal::next, NULL, parse(), prove, push_choice_point(), push_goal(), QUERY, reset_stacks(), save_parse_state(), stack_copy_psi_term(), start_chrono(), stringinput, stringparse, TRUE, wl_goal::type, undo(), undo_stack, var_occurred, WFmore, WFno, and WFyes.
| char* WFType | ( | ptr_psi_term | psi | ) |
WFType.
| ptr_psi_term | psi |
Definition at line 375 of file lib.c.
References wl_keyword::combined_name, deref_ptr, wl_definition::keyword, NULL, and wl_psi_term::type.
1.8.6