GithubHelp home page GithubHelp logo

gulava's Issues

Implement constraints

How constraints could work:

  • In Subst, store instances of Constraint interface in place of actual values for vars that are constrained
  • Multiple variables can share the same Constraint, for instance to express (A != 5 || B != 10).
  • When binding a Var and it has a Constraint assigned to it, verify it is still satisfied. If so, the Constraint can choose to change the Subst and replace itself with a new Constraint, assign new Constraints to different Vars, etc.

Maybe generic type arguments can be used to indicate equivalent values

Instead of this:

    final Goal order_select(Cons<?, ?> sub, Cons<?, ?> full) {
      return conj(
          same(sub.car(), full.car()),
          order(sub.cdr(), full.cdr()));
    }

It would be nice to write:

    final <A> Goal order_select(Cons<A, ?> sub, Cons<A, ?> full) {
      return order(sub.cdr(), full.cdr());
    }

This could be called an overloading of the meaning of generic type arguments. That's not a bad thing necessarily.

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.