Giter Site home page Giter Site logo

martelli-montanari's Introduction

martelli-montanari

An implementation of Martelli-Montanari unification algorithm for Prolog written in Prolog, based on the article "A. Martelli, U. Montanari, An Efficient Unification Algorithm" in ACM TOPLAS, 1982. Martelli-Montanari algorithm advantages are sound unification (it realizes the occur check: unification of a variable V and a structure S that contains it will fail, avoiding loops);

Usage: The predicate unify_mm/2 has to be called to realize the unification

unify_mm(List, System)

where List is the list of terms to unify and System is the triangular system of multi-equations. Examples:

?- unify_mm([X,f(X)],T_sys) Error: cycle false.

?- unify_mm([X1,f(X2,X3),f(X3,X2)],T_sys) T_sys = [[X3,X2]=nil, [X1]=f(X2,X3)].

T_sys contains the triangular system, i.e the system solved: the structure List=t you get in the T_sys system means that the variables in the List are all unified to term t.

martelli-montanari's People

Contributors

pulmro avatar

Stargazers

davdelvecchio avatar Frank Shearar avatar justinzwd avatar Dustin Van Tate Testa avatar Elena Hervás avatar Keith Pinson avatar Al Nejati avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.