Re: [eclipse-clp-users] Getting legaly named variables / Unifiying Term Lists

From: Kish Shen <kisshen_at_cisco.com>
Date: Wed, 10 Feb 2010 22:58:52 +0000
I may not have been too clear in my example that Y and Z are first 
assigned the names Var#3 and Var#4 as you specified, and only changed to 
Var#1 and Var#2 because they were unified with W and X respectively in 
union/3. So I added writelns before calling union:

set_var_name_counter('Var', 1),set_var_name([W,X,Y,Z], 'Var'), L1 = 
[pred(W,X)], L2 = [pred(Y,Z),pred2(Y,Z)], 
writeln('L1'=L1),writeln('L2'=L2),union(L1,L2, L)

and this prints:

L1 = [pred(Var#1, Var#2)]
L2 = [pred(Var#3, Var#4), pred2(Var#3, Var#4)]

as you expect

Cheers,

Kish
-- 
This e-mail may contain confidential and privileged material for the
sole use of the intended recipient. Any review, use, distribution or
disclosure by others is strictly prohibited. If you are not the intended
recipient (or authorized to receive for the recipient), please contact
the sender by reply e-mail and delete all copies of this message.
Cisco Systems Limited (Company Number: 02558939), is registered in
England and Wales with its registered office at 1 Callaghan Square,
Cardiff, South Glamorgan CF10 5BT.
Received on Wed Feb 10 2010 - 22:59:39 CET

This archive was generated by hypermail 2.2.0 : Thu Feb 02 2012 - 02:31:58 CET