unify 0.1.2 copy "unify: ^0.1.2" to clipboard
unify: ^0.1.2 copied to clipboard

outdated

An implementation of unification to enable logic programming in dart.

example/main.dart

import 'package:unify/unify.dart';

//void unify(  _TT s,  _TT t)

void main() {
  //

  var term1 = t(1, 1, [
    v(1, 2),
    v(1, 2),
  ]);
  //
  var term2 = t(2, 1, [
    v(2, 2),
    t(2, 3, [
      v(2, 22),
    ]),
  ]);
  //
  /*
  _T term1 = t(1, 1, [
    v(1, 2),
  ]);
  //
  _T term2 = t(2, 1, [
    t(2, 3, []),
  ]);
   */
  //
  print('voher');
  print('\nterm1 > ' + term1.toString());
  print('\nterm2 > ' + term2.toString());
  print('\nnachher');

  bool res = mgu(term1, term2);
  print('\nmgu  > ' + res.toString());
  print('\nterm1 > ' + term1.toString());
  print('\nterm2 > ' + term2.toString());

  /*
  Result res1 = unify(term1, term2);
  print('unifiable > ' + res1.unifiable.toString());
  print('term1 > ' + res1.term1.toString());
  print('term2 > ' + res1.term2.toString());
  */
}
1
likes
0
pub points
0%
popularity

Publisher

verified publisherwelopment.com

An implementation of unification to enable logic programming in dart.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

unification

More

Packages that depend on unify