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

  1. main :-
  2.         write(a),
  3.         _A = decimal,
  4.         write(b),
  5.         _B = range(end => _A,ground => _C,start => _A),
  6.     write(c),
  7.         cond(_A :== @,
  8.              (write(x1),_A = residuation(instance,awake => [_D: singleton(_B)|@]),write(x2)),
  9.              cond((write(u1),_A = residuation(instance,awake => _E), write(u2)),
  10.           (write(a1),add2list(_E,_D), write(a2)), succeed)),
  11.     write(d),
  12.         _C = not _A :== residuation,
  13.     write(e),
  14.         cond(_F :== @,_F = range(ground => false),succeed),
  15.     write(e1),
  16.         cond(_F .ground,
  17.          (_F .start = _B .start,
  18.           write(e2),
  19.               _F .end = _B .end),
  20.          (_F = @(end => _G,ground => _H,start => _I),
  21.           write(f),
  22.           _I :== @,
  23.           _G :== @,
  24.           write(g),
  25.           _I = _B .start,
  26.           _G = _B .end,
  27.           _H <- _B .ground,
  28.           write(h),
  29.           cond(_I :\== residuation and _I :\== @,
  30.            (fd_awake_constraints(_F .chain_min),
  31.             write(i),
  32.             cond(_G :\== residuation and _G :\== @,(fd_awake_constraints(_F .chain_max),
  33.                                 write(j),
  34.                                 fd_awake_constraints(_F .chain_min_max)),succeed)),
  35.            cond(_G :\== residuation and _G :\== @,
  36.             fd_awake_constraints(_F .chain_max),
  37.             succeed)),
  38.           write(k),
  39.           propagate_constraints)),
  40.         write(l),
  41.         nl,
  42.     write(_A),nl,
  43.         fail.
  44.  
  45. decimal -> {0;1;2;3;4;5;6;7;8;9}.
  46.  
  47. propagate_constraints :-
  48.     write(p).
  49.