home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / lifeos2.zip / LIFE-1.02 / TESTS / REFOUT / LIBTEST.REF < prev    next >
Text File  |  1996-06-04  |  35KB  |  1,405 lines

  1. 1
  2. 2
  3. 3
  4. ball caught
  5.  
  6.  
  7. testing: set_extension(ms,dos)
  8.     ms.dos
  9.  
  10.  
  11. testing: set_extension(wild.fun,life)
  12.     wild.life
  13.  
  14.  
  15. testing: remove_path(/a/b/c/d)
  16.     d
  17.  
  18.  
  19. testing: remove_path(a)
  20.     a
  21.  
  22.  
  23. testing: sort_remove_all(x,[a,b,c,x,d,e,x])
  24.     [a,b,c,d,e]
  25.  
  26.  
  27. testing: ad_remove_all(_A: a,[_A,b,c,_A,d,e,_A])
  28.     [b,c,d,e]
  29.  
  30.  
  31. testing: gen_quicksort([abc,def,123,h,bruno,richard,peter],order => ` $>)
  32.     [richard,peter,h,def,bruno,abc,123]
  33.  
  34.  
  35. testing: gen_member(a,[b,c,d,e,a],test => ` :==)
  36.     true
  37.  
  38.  
  39. testing: gen_union([a,b,c],[d,e,f,b],test => ` :==)
  40.     [a,c,d,e,f,b]
  41.  
  42.  
  43. testing: gen_make_set([a,_A: repeat,c,e,_A,d,a,_A,b,c],test => ` ===)
  44.     [a,c,e,d,a,repeat,b,c]
  45.  
  46.  
  47. testing: gen_make_set([a,_A: repeat,c,e,_A,d,a,_A,b,c],test => ` :==)
  48.     [e,d,a,repeat,b,c]
  49.  
  50.  
  51. testing: gen_intersect([a,b,c,d,3,4],[e,b,c,a,5,6,3],test => ` :==)
  52.     [a,b,c,3]
  53.  
  54.  
  55. testing: gen_difference([a,b,c,d,e,f],[f,b,a],test => ` :==)
  56.     [c,d,e]
  57.  
  58.  
  59. testing: gen_difference([f,b,a],[a,b,c,d,e,f],test => ` :==)
  60.     []
  61.  
  62.  
  63. testing: term_size(p(a,b,c))
  64.     4
  65.  
  66.  
  67. testing: term_size(_A: [a,b,c|_A])
  68.     6
  69.  
  70. *** Yes
  71. > > 
  72. *** Yes
  73. X = @.
  74. --1>  No manual entry for ,
  75.  No manual entry for [
  76.  No manual entry for ]
  77.  No manual entry for {
  78.  No manual entry for }
  79.  No manual entry for .
  80.  No manual entry for !
  81.  No manual entry for :
  82.  No manual entry for {}
  83.  No manual entry for end_of_file
  84.  No manual entry for =
  85.  No manual entry for <-
  86.  No manual entry for ->
  87.  No manual entry for ;
  88.  No manual entry for -
  89.  No manual entry for :-
  90.  No manual entry for `
  91.  No manual entry for |
  92.  No manual entry for @
  93.  No manual entry for ::
  94.  No manual entry for apply
  95.  No manual entry for bool
  96.  No manual entry for bool_pred
  97.  No manual entry for built_in
  98.  No manual entry for call_once
  99.  No manual entry for disj
  100.  No manual entry for false
  101.  No manual entry for cond
  102.  No manual entry for int
  103.  No manual entry for cons
  104.  No manual entry for nil
  105.  No manual entry for string
  106.  No manual entry for real
  107.  No manual entry for succeed
  108.  No manual entry for true
  109.  No manual entry for time
  110.  No manual entry for op
  111.  No manual entry for load
  112.  No manual entry for dynamic
  113.  No manual entry for static
  114.  No manual entry for delay_check
  115.  No manual entry for non_strict
  116.  No manual entry for input_file
  117.  No manual entry for call_handler
  118.  No manual entry for xf
  119.  No manual entry for yf
  120.  No manual entry for fx
  121.  No manual entry for fy
  122.  No manual entry for xfx
  123.  No manual entry for xfy
  124.  No manual entry for yfx
  125.  No manual entry for assert
  126.  No manual entry for asserta
  127.  No manual entry for clause
  128.  No manual entry for retract
  129.  No manual entry for setq
  130.  No manual entry for print_codes
  131.  No manual entry for get
  132.  No manual entry for put
  133.  No manual entry for open_in
  134.  No manual entry for open_out
  135.  No manual entry for set_input
  136.  No manual entry for set_output
  137.  No manual entry for exists_file
  138.  No manual entry for close
  139.  No manual entry for simple_load
  140.  No manual entry for put_err
  141.  No manual entry for chdir
  142.  No manual entry for write
  143.  No manual entry for writeq
  144.  No manual entry for pretty_write
  145.  No manual entry for pretty_writeq
  146.  No manual entry for write_canonical
  147.  No manual entry for page_width
  148.  No manual entry for print_depth
  149.  No manual entry for parse
  150.  No manual entry for read
  151.  No manual entry for read_token
  152.  No manual entry for ops
  153.  No manual entry for write_err
  154.  No manual entry for writeq_err
  155.  No manual entry for nonvar
  156.  No manual entry for var
  157.  No manual entry for is_function
  158.  No manual entry for is_predicate
  159.  No manual entry for is_sort
  160.  No manual entry for *
  161.  No manual entry for +
  162.  No manual entry for /
  163.  No manual entry for //
  164.  No manual entry for mod
  165.  No manual entry for /\
  166.  No manual entry for \/
  167.  No manual entry for \
  168.  No manual entry for >>
  169.  No manual entry for <<
  170.  No manual entry for floor
  171.  No manual entry for ceiling
  172.  No manual entry for exp
  173.  No manual entry for log
  174.  No manual entry for cos
  175.  No manual entry for sin
  176.  No manual entry for tan
  177.  No manual entry for sqrt
  178.  No manual entry for <
  179.  No manual entry for =<
  180.  No manual entry for >
  181.  No manual entry for >=
  182.  No manual entry for =\=
  183.  No manual entry for =:=
  184.  No manual entry for and
  185.  No manual entry for or
  186.  No manual entry for not
  187.  No manual entry for xor
  188.  No manual entry for ===
  189.  No manual entry for \===
  190.  No manual entry for features
  191.  No manual entry for feature_values
  192.  No manual entry for root_sort
  193.  No manual entry for strip
  194.  No manual entry for copy_pointer
  195.  No manual entry for has_feature
  196.  No manual entry for <<-
  197.  No manual entry for &
  198.  No manual entry for copy_term
  199.  No manual entry for :=<
  200.  No manual entry for :<
  201.  No manual entry for :>=
  202.  No manual entry for :>
  203.  No manual entry for :==
  204.  No manual entry for :><
  205.  No manual entry for :\=<
  206.  No manual entry for :\<
  207.  No manual entry for :\>=
  208.  No manual entry for :\>
  209.  No manual entry for :\==
  210.  No manual entry for :\><
  211.  No manual entry for is_value
  212.  No manual entry for is_number
  213.  No manual entry for is_persistent
  214.  No manual entry for children
  215.  No manual entry for parents
  216.  No manual entry for least_sorts
  217.  No manual entry for subsort
  218.  No manual entry for glb
  219.  No manual entry for lub
  220.  No manual entry for str2psi
  221.  No manual entry for psi2str
  222.  No manual entry for int2str
  223.  No manual entry for asc
  224.  No manual entry for chr
  225.  No manual entry for eval
  226.  No manual entry for evalin
  227.  No manual entry for print_variables
  228.  No manual entry for get_choice
  229.  No manual entry for set_choice
  230.  No manual entry for exists_choice
  231.  No manual entry for <|
  232.  No manual entry for :=
  233.  No manual entry for abort
  234.  No manual entry for halt
  235.  No manual entry for repeat
  236.  No manual entry for fail
  237.  No manual entry for implies
  238.  No manual entry for undo
  239.  No manual entry for trace
  240.  No manual entry for step
  241.  No manual entry for verbose
  242.  No manual entry for maxint
  243.  No manual entry for cpu_time
  244.  No manual entry for quiet
  245.  No manual entry for real_time
  246.  No manual entry for local_time
  247.  No manual entry for statistics
  248.  No manual entry for gc
  249.  No manual entry for system
  250.  No manual entry for getenv
  251.  No manual entry for rlist
  252.  No manual entry for residuate
  253.  No manual entry for mresiduate
  254.  No manual entry for tprove
  255.  No manual entry for strcon
  256.  No manual entry for strlen
  257.  No manual entry for substr
  258.  No manual entry for random
  259.  No manual entry for initrandom
  260.  No manual entry for set_module
  261.  No manual entry for open_module
  262.  No manual entry for public
  263.  No manual entry for private
  264.  No manual entry for display_modules
  265.  No manual entry for trace_input
  266.  No manual entry for substitute
  267.  No manual entry for current_module
  268.  No manual entry for module_name
  269.  No manual entry for combined_name
  270.  No manual entry for aborthook
  271.  No manual entry for global
  272.  No manual entry for persistent
  273.  No manual entry for display_persistent
  274.  No manual entry for alias
  275.  No manual entry for private_feature
  276.  No manual entry for split_double
  277.  No manual entry for string_address
  278.  No manual entry for deref_length
  279.  No manual entry for argv
  280.  No manual entry for public_symbols
  281.  No manual entry for begin_raw
  282.  No manual entry for get_raw
  283.  No manual entry for put_raw
  284.  No manual entry for end_raw
  285.  No manual entry for in_raw
  286.  No manual entry for window_flag
  287.  No manual entry for reset_window_flag
  288.  No manual entry for #
  289.  No manual entry for $<
  290.  No manual entry for $>
  291.  No manual entry for $>=
  292.  No manual entry for $\==
  293.  No manual entry for =>
  294.  No manual entry for ^
  295.  No manual entry for \+
  296.  No manual entry for $==
  297.  No manual entry for $=<
  298.  No manual entry for query
  299.  No manual entry for declaration
  300.  No manual entry for error
  301.  No manual entry for abs
  302.  No manual entry for append
  303.  No manual entry for bagof
  304.  No manual entry for beep
  305.  No manual entry for bi_load_path
  306.  No manual entry for copy_rules
  307.  No manual entry for display_module_status
  308.  No manual entry for genint
  309.  No manual entry for inherited_modules
  310.  No manual entry for init
  311.  No manual entry for length
  312.  No manual entry for life_ext
  313.  No manual entry for list
  314.  No manual entry for listing
  315.  No manual entry for load_module
  316.  No manual entry for load_path
  317.  No manual entry for load_suffixes
  318.  No manual entry for loaded_file
  319.  No manual entry for map
  320.  No manual entry for maprel
  321.  No manual entry for max
  322.  No manual entry for member
  323.  No manual entry for min
  324.  No manual entry for module
  325.  No manual entry for nl
  326.  No manual entry for nl_err
  327.  No manual entry for open
  328.  No manual entry for open_modules
  329.  No manual entry for pause
  330.  No manual entry for project
  331.  No manual entry for reduce
  332.  No manual entry for run
  333.  No manual entry for str
  334.  No manual entry for strval
  335.  No manual entry for import
  336.  No manual entry for bestof
  337. In module: built_ins,
  338.  
  339.  reconsult(File1,File2,...) ?
  340.  
  341.   input: File1, File2,... : strings (file names)
  342.  
  343.   reconsult(File1,File2,...) is a facility offered to avoid restarting 
  344.   Wild_Life each time you make a minor modification to a file. It works 
  345.   properly in 90% of the cases, but there are some limitations. 
  346.  
  347.   1) reconsult may only be used with expand_load(true).
  348.   2) reconsult retracts the definitions of the functions and predicates 
  349.      occurring in the previous version of the file, then reloads the 
  350.      file, reexecuting the queries and directives. 
  351.  
  352.   3) Warnings:
  353.  
  354.      - if a function or predicate was defined across multiple files,
  355.        the whole definition is retracted, not only the rules that 
  356.        appeared in the reconsulted file.
  357.      - Sort declarations are never retracted. It means that the sort 
  358.        hierarchy can be only be extended.
  359.      - Some directives have non-retractable side-effects: 
  360.        public,private,private_feature,dynamic,static,non_strict,
  361.        strict,op,global,persistent.
  362.      - If a query in the file asserts rules, these rules are not 
  363.        retracted when reconsulting the file. This should anyway never 
  364.        occur: use expanders, and end your rules with a dot.
  365.  
  366.   4) Files are identified by the complete name (path included) used 
  367.      to load them. It means that you may have problems if you don't 
  368.      use the same name to load and reconsult the file.
  369.   
  370.  
  371.  No manual entry for import_clauses
  372.  No manual entry for associate_expanders
  373.  No manual entry for quiet_associate_expanders
  374.  No manual entry for add_expanders_a
  375.  No manual entry for add_expanders_z
  376.  No manual entry for remove_expanders
  377.  No manual entry for term_expansion
  378.  No manual entry for term_xpand
  379.  No manual entry for expand_load
  380.  No manual entry for load_exp
  381.  No manual entry for import_exp
  382.  No manual entry for new_suffix
  383. In module: built_ins,
  384.  
  385.  add_man(X,S) ?
  386.  
  387.   input: X is a symbol name, or a list of symbol names;
  388.          S is a string containing the information describing X. 
  389.  
  390.   add_man stores the information describing its first argument. 
  391.   
  392.  
  393. In module: built_ins,
  394.  
  395.  man X ?
  396.  
  397.   input: X is a symbol name.
  398.  
  399.   "man" reads information about X stored by "add_man",
  400.   and writes it on the standard output. 
  401.   
  402.  
  403.  No manual entry for acc_info
  404.  No manual entry for pred_info
  405.  No manual entry for pass_info
  406.  No manual entry for clear_acc_def
  407.  No manual entry for is_passed
  408.  No manual entry for is_acc
  409.  No manual entry for expandable
  410.  No manual entry for get_acc_info
  411.  No manual entry for get_pass_info
  412.  No manual entry for list_of_accs
  413.  No manual entry for dcg
  414.  No manual entry for check_expansion_flag
  415.  No manual entry for set_error_expander
  416.  No manual entry for reset_error_expander
  417.  No manual entry for non_expanded_warning
  418.  No manual entry for std_expander
  419.  No manual entry for comma
  420.  No manual entry for clauses
  421.  No manual entry for context
  422.  No manual entry for code
  423.  No manual entry for define
  424.  No manual entry for macro
  425.  No manual entry for -->
  426.  No manual entry for :--
  427.  No manual entry for grammars_expander
  428.  No manual entry for accumulators_expander
  429.  No manual entry for with
  430.  No manual entry for is
  431.  No manual entry for insert
  432.  No manual entry for inv
  433.  No manual entry for glob
  434.  No manual entry for acc_auto
  435.  No manual entry for in
  436.  No manual entry for out
  437.  No manual entry for set_C
  438.  No manual entry for reset_C
  439.  No manual entry for check_expansion
  440.  No manual entry for meta
  441. In module: expanders,
  442.  
  443. Head :-& Tail.
  444.  
  445.       This expander lets the user write a list traversal in one clause.
  446.  
  447.       ex:
  448.       foo(X) :-& process(X).
  449.  
  450.          is translated into:
  451.  
  452.       foo([]) :- !.
  453.       foo([X|Tail]) :-
  454.           process(X),
  455.           foo(Tail).
  456.  
  457.       The "list" argument is always the first one. The expanded predicate may
  458.       have other arguments: they are passed to the recursive call.
  459.  
  460.       ex:
  461.       add_feats(X,Term) :-& Term.X = @.
  462.  
  463.          is translated into:
  464.  
  465.       add_feats([]) :- !.
  466.       add_feats([X|Tail],Term) :- Term.X = @, add_feats(Tail,Term).
  467.  
  468.  
  469.       Rules may end with "." only if at least one option of expand load is 
  470.       true. Otherwise, they must end with "?".
  471.  
  472.  No manual entry for pred_list_expander
  473. In module: expanders,
  474.  
  475. Head ->& Tail.
  476.  
  477.       This expander maps 'Tail' on a list.
  478.  
  479.       ex:
  480.       foo(X) ->& process(X).
  481.  
  482.          is translated into:
  483.  
  484.       foo([X|Tail]) -> [process(X)|foo(Tail)].
  485.       foo([]) -> [].
  486.  
  487.       The "list" argument is always the first one. The expanded predicate may
  488.       have other arguments: they are passed to the recursive call.
  489.  
  490.       ex:
  491.       map_plus(X,Val) ->&  X + Val.
  492.  
  493.          is translated into:
  494.  
  495.       map_plus([X|Tail],Val) ->  [X+Val|map_plus(Tail,Val)].
  496.       map_plus([]) -> [].
  497.  
  498.       Rules may end with "." only if at least one option of expand load is 
  499.       true. Otherwise, they must end with "?".
  500.  
  501. In module: control,
  502.  
  503.  catch(X), throw(X): control utilities.
  504.  
  505.   throw(X) causes backtracking to the choice point created before the 
  506.   call to catch(X).
  507.  
  508.   X is bound to a choice point. It may be convenient to use a global (non
  509.   persistent) variable to store it.
  510.   
  511.  
  512. In module: control,
  513.  
  514.  catch(X), throw(X): control utilities.
  515.  
  516.   throw(X) causes backtracking to the choice point created before the 
  517.   call to catch(X).
  518.  
  519.   X is bound to a choice point. It may be convenient to use a global (non
  520.   persistent) variable to store it.
  521.   
  522.  
  523. In module: files,
  524.  
  525.  NewName = set_extension(FileName,Extension)?
  526.  
  527.   input: Filename:string, Extension:string
  528.  
  529.   output: NewName:string
  530.  
  531.   Changes the extension of a UNIX filename to 'Extension'.
  532.  
  533.   Examples:
  534.  
  535.   set_extension("charley.pl","lf")  -> "charley.lf"
  536.   set_extension("long","hair") -> "long.hair"
  537.   set_extension("~/a.b/c","d") -> "~/a.b/c.d"
  538.   
  539.  
  540. In module: files,
  541.  
  542.  NewName = remove_extension(FileName)?
  543.  
  544.   input: Filename:string
  545.  
  546.   output: NewName:string
  547.  
  548.   removes the extension of a UNIX filename.
  549.  
  550.   Examples:
  551.  
  552.     remove_extension("charley.pl")  -> "charley"
  553.     remove_extension("long") -> "long"
  554.     remove_extension("~/a.b/c") -> "~/a.b/c"
  555.   
  556.  
  557. In module: files,
  558.  
  559.  File = remove_path(CompleteName)?
  560.  
  561.   input: CompleteName:string
  562.  
  563.   output: File:string
  564.  
  565.   Removes the UNIX path from a file name.
  566.  
  567.   Examples:
  568.  
  569.   remove_path("/user/loud_mouth/noises/hello.au") -> "hello.au".
  570.   remove_path("clap.au") -> "clap.au".
  571.   
  572.  
  573. In module: io,
  574.  
  575.  writeln(args...):
  576.        input: a variable numbers of arguments
  577.  
  578.        outputs its arguments on the standard output using "write", 
  579.        followed by a new line.
  580.  
  581. In module: sets,
  582.  
  583.  gen_member(Elt,Set,test => Test) -> Res
  584.  
  585.        input: Elt: any psi term. 
  586.               Set: a set of terms.
  587.               Test: the test used for checking membership. Must be a boolean 
  588.                     function of two arguments
  589.  
  590.        output: Res: a boolean.
  591.  
  592.        Tests if Elt belongs to set, using Test.
  593.  
  594. In module: sets,
  595.  
  596.  gen_union(Set1,Set2,test => Test) -> Set3
  597.  
  598.        input: Set1 and Set2: sets. 
  599.               Test: the test used for checking equality between members of the
  600.                     two sets. Must be a boolean function of two arguments
  601.  
  602.        output: Set3: a set.
  603.  
  604.        Set3 is Set1 union Set2
  605.  
  606. In module: sets,
  607.  
  608.  gen_make_set(List,test => Test) -> Set
  609.  
  610.        input: List: list;
  611.               Test: the test used for checking equality between members of the
  612.                     set. Must be a boolean function of two arguments
  613.  
  614.        output: Set: a set.
  615.  
  616.        Set is list with no redundant element.
  617.  
  618. In module: sets,
  619.  
  620.  gen_intersect(Set1,Set2,test => Test) -> Set3
  621.  
  622.        input: Set1 and Set2: sets. 
  623.               Test: the test used for checking equality between members of the
  624.                     two sets. Must be a boolean function of two arguments
  625.  
  626.        output: Set3: a set.
  627.  
  628.        Set3 is the intersection of the two sets Set1 and Set2
  629.  
  630. In module: sets,
  631.  
  632.  gen_difference(Set1,Set2,test => Test) -> Set3
  633.  
  634.        input: Set1 and Set2: sets. 
  635.               Test: the test used for checking equality between members of the
  636.                     two sets. Must be a boolean function of two arguments
  637.  
  638.        output: Set3: a set.
  639.  
  640.        Set3 is  Set1 - (Set1 inter Set2)
  641.  
  642. In module: sets,
  643.  
  644.  gen_member_and_rest(Elt,Set1,Rest,test => Test) -> Bool
  645.  
  646.        input: Set1,Rest: sets.
  647.               Elt: any psi term.
  648.               Test: the test used for checking equality between Elt and the
  649.                     members of Set1.
  650.                     Must be a boolean function of two arguments.
  651.  
  652.        output: Rest: a set.
  653.                Bool: a boolean.
  654.  
  655.        Bool is true if Elt belongs to Set1, false otherwise. If Bool is true, 
  656.        Rest is bound to a set containing the elements of Set1 minus the
  657.        recognised occurrence of Elt.
  658.  
  659. In module: sets,
  660.  
  661.  gen_remove(Elt,Set,test => Test) -> Set2
  662.  
  663.        input: Elt: any psi term. 
  664.               Set: a set of terms.
  665.               Test: the test used for checking membership. Must be a boolean 
  666.                     function of two arguments
  667.  
  668.        output: Set2: a set.
  669.  
  670.        Set2 is Set1 with no occurrence of Elt
  671.  
  672. In module: sets,
  673.  
  674.  gen_remove_all(Elt,Set,test => Test) -> Set2
  675.  
  676.        input: Elt: any psi term. 
  677.               Set: a set of terms.
  678.               Test: Any test (boolean function of two arguments)
  679.  
  680.        output: Set2: a set.
  681.  
  682.        Set2 is Set1 with no elt Elt2  such that Test(Elt,Elt2) is true
  683.  
  684. In module: sets,
  685.  
  686.  gen_insert(Elt,Set,test => Test) -> Set2
  687.  
  688.        input: Elt: any psi term. 
  689.               Set: a set of terms.
  690.               Test: the test used for checking membership. Must be a boolean 
  691.                     function of two arguments
  692.  
  693.        output: Set2: a set.
  694.  
  695.        Elt is added to Set to form Set2 if it was not present in Set.
  696.  
  697. In module: sets,
  698.  
  699.  gen_order_included(Set1,Set2,test => Test) -> Res
  700.  
  701.        input: Set1,Set2: sets. 
  702.               Test: the test used for checking membership. Must be a boolean 
  703.                     function of two arguments
  704.  
  705.        output: Res: result
  706.  
  707.        Res is true(true) if Set1 is strictly included in Set2,
  708.               true       if Set1 has the exactly the same elements as Set2,
  709.               false otherwise.
  710.  
  711.        Set1 and Set2 are supposed to be ordered in the same way.
  712.  
  713. In module: sets,
  714.  
  715.  gen_included(Set1,Set2,test => Test) -> Res
  716.  
  717.        input: Set1,Set2: sets. 
  718.               Test: the test used for checking membership. Must be a boolean 
  719.                     function of two arguments
  720.  
  721.        output: Res: result
  722.  
  723.        Res is true(true) if Set1 is strictly included in Set2,
  724.               true       if Set1 has the exactly the same elements as Set2,
  725.               false otherwise.
  726.  
  727. In module: sets,
  728.  
  729.  gen_part(Set1,Set2,Inter,Rest1,Rest2,test => Test)
  730.  
  731.           input: Set1,Set2: sets;
  732.                  Test: the test used for checking membership. Must be a boolean 
  733.                        function of two arguments.
  734.           output: Inter,Rest1,Rest2: sets
  735.  
  736.           Inter is the intersection of Set1 and Set2;
  737.           Rest1 is Set1 \ Inter.
  738.           Rest2 is Set2 \ Inter.
  739.  
  740. In module: sets,
  741.  
  742.  sort_member(Elt,Set) -> Res
  743.  
  744.        input: Elt: any psi term. 
  745.               Set: a set of terms.
  746.  
  747.        output: Res: a boolean.
  748.  
  749.        Tests if Elt belongs to set, using :==.
  750.  
  751. In module: sets,
  752.  
  753.  sort_union(Set1,Set2) -> Set3
  754.  
  755.        input: Set1 and Set2: sets. 
  756.  
  757.        output: Set3: a set.
  758.  
  759.        Set3 is Set1 union Set2.
  760.        The test that checks the identity of two elements is :== .
  761.  
  762. In module: sets,
  763.  
  764.  sort_make_set(Set1) -> Set2
  765.  
  766.        input: Set1: sets. 
  767.  
  768.        output: Set2: a set.
  769.  
  770.        Gets rid of redundant elements in Set1.
  771.        The test that checks the identity of two elements is :== .
  772.  
  773. In module: sets,
  774.  
  775.  sort_intersect(Set1,Set2) -> Set3
  776.  
  777.        input: Set1 and Set2: sets. 
  778.  
  779.        output: Set3: a set.
  780.  
  781.        Set3 is the intersection of the two sets Set1 and Set2.
  782.        The test that checks the identity of two elements is :== .
  783.  
  784. In module: sets,
  785.  
  786.  sort_difference(Set1,Set2) -> Set3
  787.  
  788.        input: Set1 and Set2: sets. 
  789.  
  790.        output: Set3: a set.
  791.  
  792.        Set3 is  Set1 - (Set1 inter Set2).
  793.        The test that checks the identity of two elements is :== .
  794.  
  795. In module: sets,
  796.  
  797.  sort_member_and_rest(Elt,Set1,Rest) -> Bool
  798.  
  799.        input: Set1,Rest: sets.
  800.               Elt: any psi term.
  801.  
  802.        output: Rest: a set.
  803.                Bool: a boolean.
  804.  
  805.        Bool is true if Elt belongs to Set1, false otherwise. If Bool is true, 
  806.        Rest is bound to a set containing the elements of Set1 minus the
  807.        recognised occurrence of Elt.
  808.        The test that checks the identity of two elements is :== .
  809.  
  810. In module: sets,
  811.  
  812.  sort_remove(Elt,Set) -> Set2
  813.  
  814.        input: Elt: any psi term. 
  815.               Set: a set of terms.
  816.  
  817.        output: Set2: a set.
  818.  
  819.        Set2 is Set1 with no occurrence of Elt.
  820.        The test that checks the identity of two elements is :== .
  821.  
  822. In module: sets,
  823.  
  824.  sort_insert(Elt,Set) -> Set2
  825.  
  826.        input: Elt: any psi term. 
  827.               Set: a set of terms.
  828.        output: Set2: a set.
  829.  
  830.        Elt is added to Set to form Set2 if no element of the same sort was
  831.        present in Set.
  832.        The test that checks the identity of two elements is :== .
  833.  
  834. In module: sets,
  835.  
  836.  sort_order_included(Set1,Set2) -> Res
  837.  
  838.        input: Set1,Set2: sets. 
  839.  
  840.        output: Res: result
  841.  
  842.        Res is true(true) if Set1 is strictly included in Set2,
  843.               true       if Set1 has the exactly the same elements as Set2,
  844.               false otherwise.
  845.  
  846.        Set1 and Set2 are supposed to be ordered in the same way.
  847.        The test that checks the identity of two elements is :== .
  848.  
  849. In module: sets,
  850.  
  851.  sort_included(Set1,Set2) -> Res
  852.  
  853.        input: Set1,Set2: sets. 
  854.  
  855.        output: Res: result
  856.  
  857.        Res is true(true) if Set1 is strictly included in Set2,
  858.               true       if Set1 has the exactly the same elements as Set2,
  859.               false otherwise.
  860.        The test that checks the identity of two elements is :== .
  861.  
  862. In module: sets,
  863.  
  864.  sort_part(Set1,Set2,Inter,Rest1,Rest2)
  865.  
  866.           input: Set1,Set2: sets;
  867.  
  868.           output: Inter,Rest1,Rest2: sets
  869.  
  870.           Inter is the intersection of Set1 and Set2;
  871.           Rest1 is Set1 \ Inter.
  872.           Rest2 is Set2 \ Inter.
  873.           The test that checks the identity of two elements is :== .
  874.  
  875. In module: sets,
  876.  
  877.  ad_member(Elt,Set) -> Res
  878.  
  879.        input: Elt: any psi term. 
  880.               Set: a set of terms.
  881.  
  882.        output: Res: a boolean.
  883.  
  884.        Tests if Elt belongs to set, using ===.
  885.  
  886. In module: sets,
  887.  
  888.  ad_union(Set1,Set2) -> Set3
  889.  
  890.        input: Set1 and Set2: sets. 
  891.  
  892.        output: Set3: a set.
  893.  
  894.        Set3 is Set1 union Set2.
  895.        The test that checks the identity of two elements is === .
  896.  
  897. In module: sets,
  898.  
  899.  ad_make_set(Set1) -> Set2
  900.  
  901.        input: Set1: sets. 
  902.  
  903.        output: Set2: a set.
  904.  
  905.        Gets rid of redundant elements in Set1.
  906.        The test that checks the identity of two elements is === .
  907.  
  908. In module: sets,
  909.  
  910.  ad_intersect(Set1,Set2) -> Set3
  911.  
  912.        input: Set1 and Set2: sets. 
  913.  
  914.        output: Set3: a set.
  915.  
  916.        Set3 is the intersection of the two sets Set1 and Set2.
  917.        The test that checks the identity of two elements is === .
  918.  
  919. In module: sets,
  920.  
  921.  ad_difference(Set1,Set2) -> Set3
  922.  
  923.        input: Set1 and Set2: sets. 
  924.  
  925.        output: Set3: a set.
  926.  
  927.        Set3 is  Set1 - (Set1 inter Set2).
  928.        The test that checks the identity of two elements is === .
  929.  
  930. In module: sets,
  931.  
  932.  ad_member_and_rest(Elt,Set1,Rest) -> Bool
  933.  
  934.        input: Set1,Rest: sets.
  935.               Elt: any psi term.
  936.  
  937.        output: Rest: a set.
  938.                Bool: a boolean.
  939.  
  940.        Bool is true if Elt belongs to Set1, false otherwise. If Bool is true, 
  941.        Rest is bound to a set containing the elements of Set1 minus the
  942.        recognised occurrence of Elt.
  943.        The test that checks the identity of two elements is === .
  944.  
  945. In module: sets,
  946.  
  947.  ad_remove(Elt,Set) -> Set2
  948.  
  949.        input: Elt: any psi term. 
  950.               Set: a set of terms.
  951.  
  952.        output: Set2: a set.
  953.  
  954.        Set2 is Set1 with no occurrence of Elt.
  955.        The test that checks the identity of two elements is === .
  956.  
  957. In module: sets,
  958.  
  959.  ad_insert(Elt,Set) -> Set2
  960.  
  961.        input: Elt: any psi term. 
  962.               Set: a set of terms.
  963.        output: Set2: a set.
  964.  
  965.        Elt is added to Set to form Set2 if it was not already present in
  966.        Set.
  967.        The test that checks the identity of two elements is === .
  968.  
  969. In module: sets,
  970.  
  971.  ad_order_included(Set1,Set2) -> Res
  972.  
  973.        input: Set1,Set2: sets. 
  974.  
  975.        output: Res: result
  976.  
  977.        Res is true(true) if Set1 is strictly included in Set2,
  978.               true       if Set1 has the exactly the same elements as Set2,
  979.               false otherwise.
  980.  
  981.        Set1 and Set2 are supposed to be ordered in the same way.
  982.        The test that checks the identity of two elements is === .
  983.  
  984. In module: sets,
  985.  
  986.  ad_included(Set1,Set2) -> Res
  987.  
  988.        input: Set1,Set2: sets. 
  989.  
  990.        output: Res: result
  991.  
  992.        Res is true(true) if Set1 is strictly included in Set2,
  993.               true       if Set1 has the exactly the same elements as Set2,
  994.               false otherwise.
  995.        The test that checks the identity of two elements is === .
  996.  
  997. In module: sets,
  998.  
  999.  ad_part(Set1,Set2,Inter,Rest1,Rest2)
  1000.  
  1001.           input: Set1,Set2: sets;
  1002.  
  1003.           output: Inter,Rest1,Rest2: sets
  1004.  
  1005.           Inter is the intersection of Set1 and Set2;
  1006.           Rest1 is Set1 \ Inter.
  1007.           Rest2 is Set2 \ Inter.
  1008.  
  1009.           The test that checks the identity of two elements is === .
  1010.  
  1011. In module: sets,
  1012.  
  1013. pick(Term,List)?
  1014.  
  1015.          input: List
  1016.          output: Term, List
  1017.  
  1018.          Enumerates all the possible values of 'Term' in 'List' and removes
  1019.          them from the list.
  1020.  
  1021.          Useful when several variables have to have mutually different values
  1022.          from a single domain.
  1023.  
  1024. In module: lists,
  1025.  
  1026.  sort_remove_all(Sort,List) -> List2
  1027.  
  1028.   input: Sort: sort. 
  1029.          List: a list of terms.
  1030.   output: List2: a list.
  1031.  
  1032.   List2 is List1 with no element of sort Sort
  1033.  
  1034. In module: lists,
  1035.  
  1036.  ad_remove_all(Elt,List) -> List2
  1037.  
  1038.   input: Elt: any psi term. 
  1039.          List: a list of terms.
  1040.   output: List2: a list.
  1041.  
  1042.   List2 is List1 with no element unified with Elt
  1043.  
  1044. In module: lists,
  1045.  
  1046.  gen_quicksort(List,order => Order) -> List2.
  1047.  
  1048.   input: List: a list of elements.
  1049.          Order: an order on these elements (a boolean function).
  1050.   output: List2: a list.
  1051.  
  1052.   List2 is the ordered version of List1.
  1053.  
  1054. In module: structures,
  1055.  
  1056.  Structural Comparison Operators:
  1057.  
  1058.   +>=,+=<,+>,+<,+><,==,+\>=,+\=<,+\>,+\<,+\><,\==
  1059.  
  1060.   All these operators are of type xfx, precedence 600.
  1061.   They are implemented as boolean functions.
  1062.  
  1063.   They all have two arguments that may be any psi-term.
  1064.   They never residuate.
  1065.  
  1066.   The usual naming conventions for comparison operators are preserved
  1067.   here. For example:
  1068.  
  1069.   X +>= Y returns true if X is structurally greater or identical to Y,  
  1070.                   false otherwise.
  1071.  
  1072.   X == Y returns true if X is structurally identical to Y,   
  1073.                  false otherwise.
  1074.   
  1075.  
  1076. In module: structures,
  1077.  
  1078.  Structural Comparison Operators:
  1079.  
  1080.   +>=,+=<,+>,+<,+><,==,+\>=,+\=<,+\>,+\<,+\><,\==
  1081.  
  1082.   All these operators are of type xfx, precedence 600.
  1083.   They are implemented as boolean functions.
  1084.  
  1085.   They all have two arguments that may be any psi-term.
  1086.   They never residuate.
  1087.  
  1088.   The usual naming conventions for comparison operators are preserved
  1089.   here. For example:
  1090.  
  1091.   X +>= Y returns true if X is structurally greater or identical to Y,  
  1092.                   false otherwise.
  1093.  
  1094.   X == Y returns true if X is structurally identical to Y,   
  1095.                  false otherwise.
  1096.   
  1097.  
  1098. In module: structures,
  1099.  
  1100.  Structural Comparison Operators:
  1101.  
  1102.   +>=,+=<,+>,+<,+><,==,+\>=,+\=<,+\>,+\<,+\><,\==
  1103.  
  1104.   All these operators are of type xfx, precedence 600.
  1105.   They are implemented as boolean functions.
  1106.  
  1107.   They all have two arguments that may be any psi-term.
  1108.   They never residuate.
  1109.  
  1110.   The usual naming conventions for comparison operators are preserved
  1111.   here. For example:
  1112.  
  1113.   X +>= Y returns true if X is structurally greater or identical to Y,  
  1114.                   false otherwise.
  1115.  
  1116.   X == Y returns true if X is structurally identical to Y,   
  1117.                  false otherwise.
  1118.   
  1119.  
  1120. In module: structures,
  1121.  
  1122.  Structural Comparison Operators:
  1123.  
  1124.   +>=,+=<,+>,+<,+><,==,+\>=,+\=<,+\>,+\<,+\><,\==
  1125.  
  1126.   All these operators are of type xfx, precedence 600.
  1127.   They are implemented as boolean functions.
  1128.  
  1129.   They all have two arguments that may be any psi-term.
  1130.   They never residuate.
  1131.  
  1132.   The usual naming conventions for comparison operators are preserved
  1133.   here. For example:
  1134.  
  1135.   X +>= Y returns true if X is structurally greater or identical to Y,  
  1136.                   false otherwise.
  1137.  
  1138.   X == Y returns true if X is structurally identical to Y,   
  1139.                  false otherwise.
  1140.   
  1141.  
  1142. In module: structures,
  1143.  
  1144.  Structural Comparison Operators:
  1145.  
  1146.   +>=,+=<,+>,+<,+><,==,+\>=,+\=<,+\>,+\<,+\><,\==
  1147.  
  1148.   All these operators are of type xfx, precedence 600.
  1149.   They are implemented as boolean functions.
  1150.  
  1151.   They all have two arguments that may be any psi-term.
  1152.   They never residuate.
  1153.  
  1154.   The usual naming conventions for comparison operators are preserved
  1155.   here. For example:
  1156.  
  1157.   X +>= Y returns true if X is structurally greater or identical to Y,  
  1158.                   false otherwise.
  1159.  
  1160.   X == Y returns true if X is structurally identical to Y,   
  1161.                  false otherwise.
  1162.   
  1163.  
  1164. In module: structures,
  1165.  
  1166.  Structural Comparison Operators:
  1167.  
  1168.   +>=,+=<,+>,+<,+><,==,+\>=,+\=<,+\>,+\<,+\><,\==
  1169.  
  1170.   All these operators are of type xfx, precedence 600.
  1171.   They are implemented as boolean functions.
  1172.  
  1173.   They all have two arguments that may be any psi-term.
  1174.   They never residuate.
  1175.  
  1176.   The usual naming conventions for comparison operators are preserved
  1177.   here. For example:
  1178.  
  1179.   X +>= Y returns true if X is structurally greater or identical to Y,  
  1180.                   false otherwise.
  1181.  
  1182.   X == Y returns true if X is structurally identical to Y,   
  1183.                  false otherwise.
  1184.   
  1185.  
  1186. In module: structures,
  1187.  
  1188.  Structural Comparison Operators:
  1189.  
  1190.   +>=,+=<,+>,+<,+><,==,+\>=,+\=<,+\>,+\<,+\><,\==
  1191.  
  1192.   All these operators are of type xfx, precedence 600.
  1193.   They are implemented as boolean functions.
  1194.  
  1195.   They all have two arguments that may be any psi-term.
  1196.   They never residuate.
  1197.  
  1198.   The usual naming conventions for comparison operators are preserved
  1199.   here. For example:
  1200.  
  1201.   X +>= Y returns true if X is structurally greater or identical to Y,  
  1202.                   false otherwise.
  1203.  
  1204.   X == Y returns true if X is structurally identical to Y,   
  1205.                  false otherwise.
  1206.   
  1207.  
  1208. In module: structures,
  1209.  
  1210.  Structural Comparison Operators:
  1211.  
  1212.   +>=,+=<,+>,+<,+><,==,+\>=,+\=<,+\>,+\<,+\><,\==
  1213.  
  1214.   All these operators are of type xfx, precedence 600.
  1215.   They are implemented as boolean functions.
  1216.  
  1217.   They all have two arguments that may be any psi-term.
  1218.   They never residuate.
  1219.  
  1220.   The usual naming conventions for comparison operators are preserved
  1221.   here. For example:
  1222.  
  1223.   X +>= Y returns true if X is structurally greater or identical to Y,  
  1224.                   false otherwise.
  1225.  
  1226.   X == Y returns true if X is structurally identical to Y,   
  1227.                  false otherwise.
  1228.   
  1229.  
  1230. In module: structures,
  1231.  
  1232.  Structural Comparison Operators:
  1233.  
  1234.   +>=,+=<,+>,+<,+><,==,+\>=,+\=<,+\>,+\<,+\><,\==
  1235.  
  1236.   All these operators are of type xfx, precedence 600.
  1237.   They are implemented as boolean functions.
  1238.  
  1239.   They all have two arguments that may be any psi-term.
  1240.   They never residuate.
  1241.  
  1242.   The usual naming conventions for comparison operators are preserved
  1243.   here. For example:
  1244.  
  1245.   X +>= Y returns true if X is structurally greater or identical to Y,  
  1246.                   false otherwise.
  1247.  
  1248.   X == Y returns true if X is structurally identical to Y,   
  1249.                  false otherwise.
  1250.   
  1251.  
  1252. In module: structures,
  1253.  
  1254.  Structural Comparison Operators:
  1255.  
  1256.   +>=,+=<,+>,+<,+><,==,+\>=,+\=<,+\>,+\<,+\><,\==
  1257.  
  1258.   All these operators are of type xfx, precedence 600.
  1259.   They are implemented as boolean functions.
  1260.  
  1261.   They all have two arguments that may be any psi-term.
  1262.   They never residuate.
  1263.  
  1264.   The usual naming conventions for comparison operators are preserved
  1265.   here. For example:
  1266.  
  1267.   X +>= Y returns true if X is structurally greater or identical to Y,  
  1268.                   false otherwise.
  1269.  
  1270.   X == Y returns true if X is structurally identical to Y,   
  1271.                  false otherwise.
  1272.   
  1273.  
  1274. In module: structures,
  1275.  
  1276.  Structural Comparison Operators:
  1277.  
  1278.   +>=,+=<,+>,+<,+><,==,+\>=,+\=<,+\>,+\<,+\><,\==
  1279.  
  1280.   All these operators are of type xfx, precedence 600.
  1281.   They are implemented as boolean functions.
  1282.  
  1283.   They all have two arguments that may be any psi-term.
  1284.   They never residuate.
  1285.  
  1286.   The usual naming conventions for comparison operators are preserved
  1287.   here. For example:
  1288.  
  1289.   X +>= Y returns true if X is structurally greater or identical to Y,  
  1290.                   false otherwise.
  1291.  
  1292.   X == Y returns true if X is structurally identical to Y,   
  1293.                  false otherwise.
  1294.   
  1295.  
  1296. In module: structures,
  1297.  
  1298.  Structural Comparison Operators:
  1299.  
  1300.   +>=,+=<,+>,+<,+><,==,+\>=,+\=<,+\>,+\<,+\><,\==
  1301.  
  1302.   All these operators are of type xfx, precedence 600.
  1303.   They are implemented as boolean functions.
  1304.  
  1305.   They all have two arguments that may be any psi-term.
  1306.   They never residuate.
  1307.  
  1308.   The usual naming conventions for comparison operators are preserved
  1309.   here. For example:
  1310.  
  1311.   X +>= Y returns true if X is structurally greater or identical to Y,  
  1312.                   false otherwise.
  1313.  
  1314.   X == Y returns true if X is structurally identical to Y,   
  1315.                  false otherwise.
  1316.   
  1317.  
  1318. In module: terms,
  1319.  
  1320. add_features(List,Term)?
  1321.  
  1322.   input : Term: a psi-term;
  1323.           List: a list of feature names
  1324.   output: Term
  1325.  
  1326.   The features in List are added to Term
  1327.  
  1328. In module: terms,
  1329.  
  1330. share_features(List,Term1,Term2)?
  1331.  
  1332.   input : Term1,Term2: psi-terms;
  1333.           List: a list of feature names
  1334.   output: Term1,Term2
  1335.  
  1336.   After execution, the features in List are shared by Term1 and Term2
  1337.  
  1338. In module: terms,
  1339.  
  1340. remove_feature(Term,Feature)?
  1341.  
  1342.   input : Term,Feature
  1343.   output: Term
  1344.  
  1345.   Removes 'Feature' from 'Term' if present.
  1346.  
  1347. In module: terms,
  1348.  
  1349. N=term_size(Term)?
  1350.  
  1351.   input : Term
  1352.   output: N
  1353.  
  1354.   Counts the number of nodes in a given psi-term.
  1355.  
  1356. In module: times,
  1357.  
  1358. start_timer(?Timer,+String),print_timer(Timer),reset_timer(Timer)
  1359.  
  1360.          Simple timing utilities.
  1361.  
  1362.          Example use:
  1363.  
  1364.              start_timer(X,"CPU time is now:"),
  1365.              ...,
  1366.              print_timer(X),
  1367.              reset_timer(X),
  1368.              ...,
  1369.              print_timer(X).
  1370.  
  1371. In module: times,
  1372.  
  1373. start_timer(?Timer,+String),print_timer(Timer),reset_timer(Timer)
  1374.  
  1375.          Simple timing utilities.
  1376.  
  1377.          Example use:
  1378.  
  1379.              start_timer(X,"CPU time is now:"),
  1380.              ...,
  1381.              print_timer(X),
  1382.              reset_timer(X),
  1383.              ...,
  1384.              print_timer(X).
  1385.  
  1386. In module: times,
  1387.  
  1388. start_timer(?Timer,+String),print_timer(Timer),reset_timer(Timer)
  1389.  
  1390.          Simple timing utilities.
  1391.  
  1392.          Example use:
  1393.  
  1394.              start_timer(X,"CPU time is now:"),
  1395.              ...,
  1396.              print_timer(X),
  1397.              reset_timer(X),
  1398.              ...,
  1399.              print_timer(X).
  1400.  
  1401.  
  1402. *** Yes
  1403. X = @.
  1404. --1> 
  1405.