All Projects → Lleutch → ConstraintTP

Lleutch / ConstraintTP

Licence: Unlicense license
Constraint Type provider is a Type provider that provides constraints over F# Types.

Programming Languages

F#
602 projects

Projects that are alternatives of or similar to ConstraintTP

ConstraintSolver.jl
ConstraintSolver in Julia: Blog posts ->
Stars: ✭ 107 (+791.67%)
Mutual labels:  constraint-programming
HyperGraphLib
C++ Hypergraph modelling Library using Boost and OpenMP with some algorithms, including isomorphism using Gecode.
Stars: ✭ 19 (+58.33%)
Mutual labels:  constraint-programming
LocalSearchSolvers.jl
A Julia package to manage Constraint-Based Local Search (CBLS) solvers.
Stars: ✭ 18 (+50%)
Mutual labels:  constraint-programming
pycsp3
A Python Library for modeling combinatorial constrained problems
Stars: ✭ 39 (+225%)
Mutual labels:  constraint-programming
simsttab
Simple timetabling engine for schools
Stars: ✭ 21 (+75%)
Mutual labels:  constraint-programming
pymzn
A Python wrapper for the MiniZinc tool pipeline.
Stars: ✭ 54 (+350%)
Mutual labels:  constraint-programming
Decider
An Open Source .Net Constraint Programming Solver
Stars: ✭ 112 (+833.33%)
Mutual labels:  constraint-programming
codac
Codac is a library for constraint programming over reals, trajectories and sets.
Stars: ✭ 31 (+158.33%)
Mutual labels:  constraint-programming
conjure
Conjure: The Automated Constraint Modelling Tool
Stars: ✭ 84 (+600%)
Mutual labels:  constraint-programming
monadiccp
Monadic Constraint Programming framework
Stars: ✭ 25 (+108.33%)
Mutual labels:  constraint-programming
type-provider-examples
Macro-based type providers for Scala (examples)
Stars: ✭ 85 (+608.33%)
Mutual labels:  type-providers
cplex-scala
A scala library for IBM ILOG CPLEX
Stars: ✭ 20 (+66.67%)
Mutual labels:  constraint-programming
minizinc-python
Access to all MiniZinc functionality directly from Python
Stars: ✭ 92 (+666.67%)
Mutual labels:  constraint-programming
Optaplanner
AI constraint solver in Java to optimize the vehicle routing problem, employee rostering, task assignment, maintenance scheduling, conference scheduling and other planning problems.
Stars: ✭ 2,454 (+20350%)
Mutual labels:  constraint-programming
facile
Python constraint programming library
Stars: ✭ 21 (+75%)
Mutual labels:  constraint-programming
gibbous
Convex optimization for java and scala, built on Apache Commons Math
Stars: ✭ 17 (+41.67%)
Mutual labels:  constraint-programming
ordered
Entropy-controlled contexts in Python
Stars: ✭ 36 (+200%)
Mutual labels:  constraint-programming
GHOST
General meta-Heuristic Optimization Solving Toolkit
Stars: ✭ 28 (+133.33%)
Mutual labels:  constraint-programming
biteopt
Derivative-Free Optimization Method for Global Optimization (C++)
Stars: ✭ 91 (+658.33%)
Mutual labels:  constraint-programming
SeaPearl.jl
Julia hybrid constraint programming solver enhanced by a reinforcement learning driven search.
Stars: ✭ 119 (+891.67%)
Mutual labels:  constraint-programming

ConstraintTP

This project has been inspired from Dependent Type Provider

It provides compile-time constraints over basic F# types.

The goal would be to allow coders to create types according to specific rules and having value constraint over these rules at compile-time.

Rule system

The rule system is the following: We consider that each type could be shrinked down to a subset according to a specific rule. The rule would be written as a string representation of a function and would return the function itself. The type of the rule even though it is a string should, when evaluated by the fsi Session, be :

    'a -> bool

either the value given follows the rule (true) or not (false).

For instance, if one wants to define a type with all the integers multiple of 3, he would write :

    let [<Literal>] multiplesOf3Rule = "let f inputValue = inputValue % 3 = 0 \nf"

and would be called as a static parameter of ConstraintTP :

    type DivisibleBy3 = Constraint.Numbers.ConstraintInt32<Rule = multiplesOf3Rule>

What is supported so far

System of rule :

A system of rule that is quite generic and type safe through the pre-évaluation with the fsi session running behind the scene.

Basic F# types :

  • sbyte
  • byte
  • uint16
  • int16
  • uint32
  • int32
  • uint64
  • int64
  • float32
  • float

As a non-basic F# types :

  • Arrays

     type: 'a []
    

I could do any non-basic F# types like lists... However I think that there are some aspect I should work on before going further.

TODO


  • String with compile-time Regex verification as follow Type Foo = DependentType.String.Regex<".+@.+">

If one has some ideas regarding how we could take this TP to any direction please tell me, I would really appreciate.

Build process

run the following command :

.\build.cmd

Samples

Some basic samples could be found in Examples.fsx. You could also look at the slides I have prepared.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].