static void send_tracer_message(char *start, char *name, Int arity, char *mname, CELL *args) { CACHE_REGS fprintf(GLOBAL_stderr, "(%p) ", B); if (name == NULL) { #ifdef YAPOR fprintf(GLOBAL_stderr, "(%d)%s", worker_id, start); #else fprintf(GLOBAL_stderr, "%s", start); #endif } else { int i; if (arity) { if (args) fprintf(GLOBAL_stderr, "%s %s:%s(", start, mname, name); else fprintf(GLOBAL_stderr, "%s %s:%s/%lu", start, mname, name, (unsigned long int)arity); } else { fprintf(GLOBAL_stderr, "%s %s:%s", start, mname, name); } if (args) { for (i= 0; i < arity; i++) { if (i > 0) fprintf(GLOBAL_stderr, ","); Yap_plwrite(args[i], NULL, 15, Handle_vars_f|AttVar_Portray_f, 1200); } if (arity) { fprintf(GLOBAL_stderr, ")"); } } } fprintf(GLOBAL_stderr, "\n"); }
int beam_write(USES_REGS1) { Yap_StartSlots(); Yap_plwrite(ARG1, GLOBAL_Stream + LOCAL_c_output_stream, 0, 0, GLOBAL_MaxPriority); Yap_CloseSlots(); Yap_RaiseException(); return (TRUE); }
int beam_write (void) { Yap_StartSlots(); Yap_plwrite (ARG1, NULL, 0, 0, 1200); Yap_CloseSlots(); if (EX != 0L) { Term ball = Yap_PopTermFromDB(EX); EX = 0L; Yap_JumpToEnv(ball); return(FALSE); } return (TRUE); }
static bool writeTopTerm(term_t t, int prec, write_options *options) { CACHE_REGS UInt yap_flag = Use_SWI_Stream_f; int flags = options->flags; Term old_module; if (flags & PL_WRT_QUOTED) yap_flag |= Quote_illegal_f; if (options->flags & PL_WRT_NUMBERVARS) yap_flag |= Handle_vars_f; if (options->flags & PL_WRT_VARNAMES) yap_flag |= Handle_vars_f; if (options->flags & PL_WRT_IGNOREOPS) yap_flag |= Ignore_ops_f; if (flags & PL_WRT_PORTRAY) yap_flag |= Use_portray_f; if (flags & PL_WRT_BACKQUOTED_STRING) yap_flag |= BackQuote_String_f; if (flags & PL_WRT_ATTVAR_IGNORE) yap_flag |= 0L; if (flags & PL_WRT_ATTVAR_DOTS) yap_flag |= AttVar_Dots_f; if (flags & PL_WRT_ATTVAR_PORTRAY) yap_flag |= AttVar_Portray_f; if (flags & PL_WRT_BLOB_PORTRAY) yap_flag |= Blob_Portray_f; old_module = CurrentModule; CurrentModule = Yap_GetModuleFromEntry(options->module); Yap_plwrite(Yap_GetFromSlot(t), options->out, options->max_depth, yap_flag, prec); CurrentModule = old_module; return TRUE; }
void Yap_DebugPlWrite(Term t) { Yap_plwrite(t, NULL, 15, 0, 1200); }