Ejemplo n.º 1
0
void
bip_parallel_init(int flags)
{
    if (flags & INIT_SHARED)
    {
#ifdef NEW_ORACLE
	(void) exported_built_in(in_dict("get_oracle", 3),
				p_get_oracle3, B_UNSAFE);
	(void) exported_built_in(in_dict("install_oracle", 1),
				p_install_oracle, B_SAFE);
	(void) exported_built_in(in_dict("install_pending_oracle", 0),
				p_install_pending_oracle, B_SAFE);
	(void) built_in(in_dict("recomputing", 0),
				p_recomputing, B_SAFE);
	(void) exported_built_in(in_dict("oracle_check", 1),
				p_oracle_check, B_UNSAFE);
	(void) local_built_in(in_dict("set_par_goal", 1),
				p_set_par_goal, B_UNSAFE);
	(void) local_built_in(in_dict("get_par_goal", 1),
				p_get_par_goal, B_UNSAFE|U_UNIFY);
#endif
	(void) local_built_in(in_dict("dbag_create", 1),
				p_dbag_create, B_SAFE|U_GROUND);
	(void) local_built_in(in_dict("dbag_enter", 2),
				p_dbag_enter, B_SAFE|U_NONE);
	(void) local_built_in(in_dict("dbag_dissolve", 2),
				p_dbag_dissolve, B_UNSAFE|U_UNIFY);
    }
}
Ejemplo n.º 2
0
/*
 * FUNCTION NAME:       bip_strings_init() 
 *
 * PARAMETERS:          NONE. 
 *
 * DESCRIPTION:         links the 'C' functions in this file with SEPIA 
 *                      built-in predicates.    
 */
void
bip_strings_init(int flags)
{
    if (flags & INIT_PRIVATE)
    {
	empty_string = enter_string_n("", 0, DICT_PERMANENT);
	d_sha_ = in_dict("sha", 0);
    }

    if (flags & INIT_SHARED)
    {
	built_in(in_dict("string_list", 2),    p_string_list, B_UNSAFE|U_GROUND|PROC_DEMON)
	    -> mode = BoundArg(1, NONVAR) | BoundArg(2, NONVAR);
	built_in(in_dict("utf8_list", 2),    p_utf8_list, B_UNSAFE|U_GROUND|PROC_DEMON)
	    -> mode = BoundArg(1, NONVAR) | BoundArg(2, NONVAR);
	(void) built_in(in_dict("hash_secure", 3), 	p_hash_secure,	B_UNSAFE|U_SIMPLE);
	(void) built_in(in_dict("string_length", 2), 	p_string_length,B_UNSAFE|U_SIMPLE);
	(void) built_in(in_dict("get_string_code", 3), 	p_get_string_code,	B_UNSAFE|U_SIMPLE);
	(void) b_built_in(in_dict("string_code", 4), 	p_string_code, d_.kernel_sepia);
	(void) built_in(in_dict("substring", 3), 	p_substring,	B_UNSAFE|U_SIMPLE);
	(void) built_in(in_dict("atom_length", 2), 	p_atom_length,	B_UNSAFE|U_SIMPLE);
	(void) built_in(in_dict("string_upper", 2),	p_string_upper,	B_UNSAFE|U_SIMPLE);
	(void) built_in(in_dict("string_lower", 2),	p_string_lower,	B_UNSAFE|U_SIMPLE);
	(void) built_in(in_dict("concat_atoms", 3), 	p_concat_atoms,	B_UNSAFE|U_SIMPLE|PROC_DEMON);
	(void) built_in(in_dict("concat_atom", 2), 	p_concat_atom,	B_UNSAFE|U_SIMPLE|PROC_DEMON);
	(void) built_in(in_dict("concat_strings", 3), 	p_concat_strings,B_UNSAFE|U_SIMPLE|PROC_DEMON);
	(void) built_in(in_dict("concat_string", 2), 	p_concat_string,B_UNSAFE|U_SIMPLE|PROC_DEMON);
	(void) built_in(in_dict("atomics_to_string", 2),p_concat_string,B_UNSAFE|U_SIMPLE|PROC_DEMON);
	(void) built_in(in_dict("join_string", 3), 	p_join_string,	B_UNSAFE|U_SIMPLE|PROC_DEMON);
	(void) built_in(in_dict("atomics_to_string", 3),p_join_string,	B_UNSAFE|U_SIMPLE|PROC_DEMON);
	(void) built_in(in_dict("text_to_string", 2),	p_text_to_string,	B_UNSAFE|U_SIMPLE|PROC_DEMON);
	built_in(in_dict("split_string", 4), 		p_split_string,	B_UNSAFE|U_GROUND)
	    -> mode = BoundArg(4, GROUND);
	built_in(in_dict("char_int", 2), 	p_char_int,	B_UNSAFE|U_SIMPLE)
	    -> mode = BoundArg(1, NONVAR) | BoundArg(2, NONVAR);
	(void) exported_built_in(in_dict("first_substring", 4),
						p_first_substring, B_UNSAFE|U_SIMPLE);
	exported_built_in(in_dict("string_print_length", 4),
						p_string_print_length, B_UNSAFE|U_SIMPLE) -> mode = BoundArg(3, CONSTANT);
    }
}
Ejemplo n.º 3
0
void
bip_module_init(int flags)
{
    if (!(flags & INIT_SHARED))
	return;
    (void) local_built_in(in_dict("erase_module_", 2), p_erase_module, B_SAFE);
    (void) local_built_in(in_dict("is_a_module", 1), p_is_module, B_SAFE);
    (void) local_built_in(in_dict("authorized_module", 1), p_authorized_module, B_SAFE);
    (void) built_in(in_dict("is_locked", 1), p_is_locked, B_SAFE);
    (void) built_in(in_dict("begin_module", 1), p_begin_module, B_SAFE);
    (void) local_built_in(in_dict("begin_module", 2), p_begin_module, B_SAFE);
    (void) local_built_in(in_dict("create_module_", 1), p_create_module, B_SAFE);
    (void) built_in(d_.lock, p_lock1, B_SAFE);
    (void) built_in(in_dict("lock", 2), p_lock2, B_SAFE);
    (void) built_in(in_dict("lock_pass_", 2), p_lock_pass_, B_SAFE);
    (void) built_in(in_dict("unlock", 2), p_unlock2, B_SAFE);
    (void) exported_built_in(in_dict("tool_", 2), p_tool1, B_UNSAFE);
    (void) exported_built_in(in_dict("tool_", 3), p_tool2, B_UNSAFE);
    exported_built_in(in_dict("tool_body_", 4), p_tool_body, B_UNSAFE|U_GROUND)
	-> mode = BoundArg(2, GROUND) | BoundArg(3, CONSTANT);
    (void) local_built_in(d_.localb, p_local, B_UNSAFE);
    (void) exported_built_in(in_dict("implicit_local",2), p_implicit_local, B_UNSAFE);
    (void) local_built_in(d_.exportb, p_export, B_UNSAFE);
    (void) local_built_in(in_dict("reexport_from_",3), p_reexport_from, B_UNSAFE);
    (void) local_built_in(d_.import_fromb, p_import_from, B_UNSAFE);
    (void) local_built_in(in_dict("import_", 2), p_import, B_UNSAFE);
    (void) local_built_in(in_dict("module_tag", 2), p_module_tag, B_UNSAFE);
    (void) exported_built_in(in_dict("default_module", 1), p_default_module,
    	B_UNSAFE|U_SIMPLE);
    (void) exported_built_in(in_dict("pr", 1), p_pr, B_SAFE);

}