unification 0.0.1+2

  • README.md
  • Changelog.md
  • Example
  • Installing
  • Versions
  • 4

unification #

[unification] is a concrete implementation of logical first-order unification and library to apply a first-order unification procedure [unify] given by the library on two terms of [Termtype] given by the library.

A solution of a unification problem is a substitution, that is, a mapping assigning a symbolic value to each variable of the problem's expressions. The unification algorithm reports unsolvability for a given problem or computes a complete, and minimal singleton substitution set containing the so-called most general unifier, that is, a set covering all its solutions, and containing no redundant members.

Example: #

import "package:tailcalls/tailcalls.dart";
import "package:unification/unification.dart";

var test = unify(
      new List()
        ..add(
          new Tupl(
            new Term("b0", [new Term("b1", []),new Term("b2", [])]),
            new Term("b0", [new Term("b1", []),new Term("b2", [])]),
          ),
        ),
    ).result();
var mgu = test;
print(mgu.toString());

Read more about unification in logic on Wikipedia.

Changelog #

0.0.1 #

  • Initial release.

0.0.2 #

  • Updated to use Dart 2.1.0
  • Added Examples

example/example.dart

import '../lib/unification.dart';
import 'dart:collection';

void main() {

  var res1 = unify(
    List()
      ..add(
        new Tupl(
          1,
          new Var("a"),
        ),
      ),
  );

  var res2 = unify(
    List()
      ..add(
        new Tupl(
          new Var("a"),
          new Var("b"),
        ),
      ),
  );
  
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  unification: ^0.0.1+2

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:unification/unification.dart';
  
Version Uploaded Documentation Archive
0.1.4 May 9, 2019 Go to the documentation of unification 0.1.4 Download unification 0.1.4 archive
0.1.3 Oct 18, 2018 Go to the documentation of unification 0.1.3 Download unification 0.1.3 archive
0.1.2 Sep 29, 2018 Go to the documentation of unification 0.1.2 Download unification 0.1.2 archive
0.1.1 Sep 28, 2018 Go to the documentation of unification 0.1.1 Download unification 0.1.1 archive
0.1.0 Sep 28, 2018 Go to the documentation of unification 0.1.0 Download unification 0.1.0 archive
0.0.1+2 Sep 28, 2018 Go to the documentation of unification 0.0.1+2 Download unification 0.0.1+2 archive
0.0.1+1 Dec 16, 2017 Go to the documentation of unification 0.0.1+1 Download unification 0.0.1+1 archive
0.0.1 Dec 16, 2017 Go to the documentation of unification 0.0.1 Download unification 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
0
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
20
Overall:
Weighted score of the above. [more]
4
Learn more about scoring.

We analyzed this package on May 8, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.3.0
  • pana: 0.12.15

Platforms

Detected platforms:

Error(s) prevent platform classification:

Fix dependencies in pubspec.yaml.

Analysis issues and suggestions

Fix dependencies in pubspec.yaml.

Running pub upgrade failed with the following output:

ERR: The current Dart SDK version is 2.3.0.
 
 Because unification requires SDK version >=1.8.0 <=2.1.0, version solving failed.

Health suggestions

Format bin/main2.dart.

Run dartfmt to format bin/main2.dart.

Format bin/main3.dart.

Run dartfmt to format bin/main3.dart.

Format lib/unification2.dart.

Run dartfmt to format lib/unification2.dart.

Format lib/unification3.dart.

Run dartfmt to format lib/unification3.dart.

Maintenance issues and suggestions

Fix platform conflicts. (-20 points)

Error(s) prevent platform classification:

Fix dependencies in pubspec.yaml.

Support the latest stable Dart SDK in pubspec.yaml. (-20 points)

The SDK constraint in pubspec.yaml doesn't allow the latest stable Dart SDK release.

Make sure dartdoc successfully runs on your package's source files. (-10 points)

Dependencies were not resolved.

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.8.0 <=2.1.0