next up previous contents index
Next: Scenario ``step_by_step'' Up: Morphine - Reference Manual Previous: Scenario ``source''

Subsections

     
Scenario ``display''

Scenario which contains everything related to the display of trace events. In particular the attributes to be displayed can be specified, as well as the way lists and terms are displayed. Arguments of predicates can be skipped. Many procedures allow you to customize the display.

Commands

print_event {p}    
Prints the current trace event according to the value of the display parameters. The name of the printed attributes can be get with the command print_displayed_attributes/0.
type of command : opium

print_displayed_attributes    
Prints the names of the attributes displayed by print_event/0.
type of command : opium

print_full_event {pf}    
Prints the current trace event with all the attributes on.
type of command : opium

print_full_displayed_attributes    
Prints the names of the attributes printed by print_full_event/0.
type of command : opium

indent(OnOff)    
Sets relative indentation on/off. If a tracing process is on, it sets the depth at which the indentation has to start to the current depth. Otherwise the starting depth is 1.
OnOff : is_member([on, off])
type of command : opium

absolute_indent(Depth)    
Sets the indentation on and sets the depth at which the indentation has to start to Depth.
Depth : integer
type of command : opium

toggle(AttributeName)    
Toggles attribute display of print_event command. For example, if attribute decl_module is off, you can type ``toggle(decl_module)'' to switch it on. You can list all the attributes you can toggle thanks to list_attribute_aliases/0 command.
AttributeName : atom
type of command : opium

Procedures

write_indent(IndentFlag, IndentValue, IndentDepth, CurrDepth)    
Procedure which displays an indentation - if indentation is on - according to the current depth and the indentation starting depth. If IndentFlag is on, it prints N times IndentValue, where N is CurrDepth - IndentDepth if this is positive, 1 otherwise.

write_attribute(AttributeName, AttributeValue)    
Procedure which displays an attribute of the trace line. AttributeName is a member of the following list: [chrono, call, depth, port, proc_type, decl_module, def_module, arity, mode_number, args, deter, goal_path, non_arg_var]. To customize the way arguments are displayed, you should rather modify write_arg.

write_arg_attribute(Procedure, ListArg, ArgFlag, TypeFlag)    
Procedure which displays the arguments of the trace event when the current procedure is Module:Name/Arity-ModeNum. If only the nth argument of a procedure needs a special treatment, you should customize write_arg/1.

write_nth_arg(Arg, N, Procedure)    
Procedure which displays the Nth argument of procedure Procedure in DeclModule.

write_arg(Arg)    
Procedure which prints an argument.

write_term(Term)    
Procedure which displays a structured term, taking into account the term_display parameter.

write_list(List)    
Procedure which displays a list, taking into account the list_display parameter.

write_ersatz    
Procedure which writes ``...'' as a replacement for the hidden parts of the arguments.

write_comma    
Procedure which writes ``, ''.

write_trace(X)    
Prints its argument on the trace window.

read_input(Input)    
Procedure which reads an input from within the current input stream of Morphine.

display_stack(Stack)    
Procedure that displays the ancestors stack.

display_list_var_names(ListVarNames)    
Display the names of the currently live variables given by current_live_var_names_and_types/1.

Parameters

attribute_display(Chrono, Call, Port, Depth, Deter, PredOrFunc, DeclModule, DefModule, Name, Arity, ModeNumber, ListArg, ListNonArgVar, Type, GoalPath)    
Parameter which contains the flags for the selective display of attributes. If the value of one argument is ``on'' then the corresponding attribute is displayed.
Chrono : is_member([on, off])
Call : is_member([on, off])
Port : is_member([on, off])
Depth : is_member([on, off])
Deter : is_member([on, off])
PredOrFunc : is_member([on, off])
DeclModule : is_member([on, off])
DefModule : is_member([on, off])
Name : is_member([on, off])
Arity : is_member([on, off])
ModeNumber : is_member([on, off])
ListArg : is_member([on, off])
ListNonArgVar : is_member([on, off])
Type : is_member([on, off])
GoalPath : is_member([on, off])
default value : attribute_display(on, on, on, on, off, off, off, off, on, off, off, on, off, off, on)
type of parameter : single

arguments_display(Type)    
Parameter which tells how arguments shall be displayed. If Type is ``simple'', then arguments are displayed without taking the list_display and term_display parameters into account.
Type : is_member([normal, simple])
default value : arguments_display(normal)
type of parameter : single

list_display(Type, Range)    
Parameter which tells how lists shall be displayed. If Type is ``normal'', lists are displayed in the standard Prolog way. If Type is ``nest'', the nested lists are displayed only till level Range (included). If Type is ``truncate'', only the first Range elements of the lists are displayed.
Type : is_member([normal, nest, truncate])
Range : integer
default value : list_display(normal, 0)
type of parameter : single

term_display(Type, Range)    
Parameter which tells how structured terms shall be displayed. If Type is ``normal'', terms are displayed in the standard Prolog way. If Type is ``nest'', the nested terms are displayed only till level Range (included). If Type is ``truncate'', only the first Range elements of the term are displayed.
Type : is_member([normal, nest, truncate])
Range : integer
default value : term_display(normal, 0)
type of parameter : single

indent_display(OnOff, IndentationValue, Depth)    
Paramater which tells whether indentation is ``on'' or ``off'', what has to be printed as indentation value, and at which depth the indentation has to be started.
OnOff : is_member([on, off])
IndentationValue : atomic
Depth : integer
default value : indent_display(on, ' ', 1)
type of parameter : single

indent_display_limit(IndentLimit)    
Parameter which tells up to which depth the trace events shall be indented.
IndentLimit : integer
default value : indent_display_limit(30)
type of parameter : single

arg_undisplay(Name, ArgNo)    
Parameter which tells which arguments of which predicates have to be NOT displayed. There must be one ``arg_undisplay'' clause for each argument which shall not be displayed.
Name : is_proc
ArgNo : integer
default value : none
type of parameter : multiple


next up previous contents index
Next: Scenario ``step_by_step'' Up: Morphine - Reference Manual Previous: Scenario ``source''
jahier@irisa.fr