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.

Unification #

A library providing implementations of first-order logical unification for dart and flutter.

Getting started #

Add the dependency to your pubspec.yaml file:

dependencies:
  unification: #latest version

Add the import statement to your source files:

import 'package:unification/unification.dart';

Or, give it a try and run the example:

dart ./example/main.dart 

Modify the example to test more less simple tasks!

Example: #

 import 'package:unify/unify.dart';

void main() {
  

  // occurs check positive:

  var term1 = t(1, 1, [
    v(1, 2),
    v(1, 2),
  ]);

  //
  var term2 = t(2, 1, [
    v(2, 2),
    t(2, 3, [
      v(2, 2),
    ]),
  ]);

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

}

Read more about unification in logic on Wikipedia.

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