All Projects → ptarau → TypesAndProofs

ptarau / TypesAndProofs

Licence: Apache-2.0 license
Type inference algorithms and intuitionistic propositional theorem provers solving type inhabitation problems

Programming Languages

prolog
421 projects

Projects that are alternatives of or similar to TypesAndProofs

HyperKA
Knowledge Association with Hyperbolic Knowledge Graph Embeddings, EMNLP 2020
Stars: ✭ 27 (+17.39%)
Mutual labels:  type-inference
Gluon
A static, type inferred and embeddable language written in Rust.
Stars: ✭ 2,457 (+10582.61%)
Mutual labels:  type-inference
WangsAlgorithm
A classical propositional theorem prover in Haskell, using Wang's Algorithm.
Stars: ✭ 34 (+47.83%)
Mutual labels:  theorem-prover
REInfer
Runtime Extended Inference for json data.
Stars: ✭ 23 (+0%)
Mutual labels:  type-inference
Psalm
A static analysis tool for finding errors in PHP applications
Stars: ✭ 4,523 (+19565.22%)
Mutual labels:  type-inference
pyprover
Resolution theorem proving for predicate logic in pure Python.
Stars: ✭ 71 (+208.7%)
Mutual labels:  theorem-prover
samlang
Sam's Programming Language
Stars: ✭ 22 (-4.35%)
Mutual labels:  type-inference
anders
🧊 Модальний Гомотопічний Прувер
Stars: ✭ 5 (-78.26%)
Mutual labels:  theorem-prover
Jedi
Awesome autocompletion, static analysis and refactoring library for python
Stars: ✭ 5,037 (+21800%)
Mutual labels:  type-inference
phpstan-dba
PHPStan based SQL static analysis and type inference for the database access layer
Stars: ✭ 163 (+608.7%)
Mutual labels:  type-inference
DataAnalyzer.app
✨🚀 DataAnalyzer.app - Convert JSON/CSV to Typed Data Interfaces - Automatically!
Stars: ✭ 23 (+0%)
Mutual labels:  type-inference
Write You A Haskell
Building a modern functional compiler from first principles. (http://dev.stephendiehl.com/fun/)
Stars: ✭ 3,064 (+13221.74%)
Mutual labels:  type-inference
awesome-rust-formalized-reasoning
An exhaustive list of all Rust resources regarding automated or semi-automated formalization efforts in any area, constructive mathematics, formal algorithms, and program verification.
Stars: ✭ 185 (+704.35%)
Mutual labels:  theorem-prover
visions
Type System for Data Analysis in Python
Stars: ✭ 136 (+491.3%)
Mutual labels:  type-inference
cicada
Cicada Language
Stars: ✭ 9 (-60.87%)
Mutual labels:  theorem-prover
Typology
Swift type checking and semantic analysis for developer tools
Stars: ✭ 68 (+195.65%)
Mutual labels:  type-inference
Zod
TypeScript-first schema validation with static type inference
Stars: ✭ 5,371 (+23252.17%)
Mutual labels:  type-inference
LambdaNet
Probabilistic Type Inference using Graph Neural Networks
Stars: ✭ 39 (+69.57%)
Mutual labels:  type-inference
vanilla-lang
An implementation of a predicative polymorphic language with bidirectional type inference and algebraic data types
Stars: ✭ 73 (+217.39%)
Mutual labels:  type-inference
ostrich
An SMT Solver for string constraints
Stars: ✭ 18 (-21.74%)
Mutual labels:  theorem-prover

TypesAndProofs:

Type inference algorithms and intuitionistic propositional theorem provers solving type inhabitation problems. Combinatorial and random testers for the provers and type inferencers.

Type

$ go

or

swipl -s tp.pro

and then something like

?- bprove(a->b->a).
true.
?- bprove((a->b)->a).
false.

See a lot of examples of use in file tester.pro Generic benchmarking code is in bm.pro.

Given the Curry-Howard isomorphism, solving the type inhabitation problem is equivalent to finding propositional implicational intuitionistic tautology proofs.

These tools implement Prolog-based algorithms on the two sides of the Curry-Howard isomorphism, including combinatorial and random testers, centered around:

  • generating all candidate type expressions
  • generating all simple types
  • generating random candidate type expressions
  • generating random simple types

Some theory background needed for grasping what they do:

  • elements of sequent calculus and natural deduction
  • type inference algorithms for lambda terms
  • normal forms of lambda terms
  • combinatorial generation of trees, set partitions
  • random set-partition generation with urn-algorithms
  • random term generation with Boltzmann samplers
  • Gentzen's LJ calculus
  • Vorobiev-Hudelmaier-Dyckhoff's LJT calculus
  • Glivenko's double negation translation
  • Fitting's classical tautology checker
  • de Bruijn notation for lambda terms
  • beta reduction with de Bruijn indices

The provers to be tested and compared are:

  • Dyckchoff's program, specialized to implications
  • provers derived from the LJT calculus, directly
  • provers using Horn clause translations of implicational formulas
  • classical Provers, via Glivenko's translation
  • full intuitionistic propositional provers

The programs are tested with SWI Prolog 7.7.12.

Except for those using SWI-Prolog's multi-threading the code, the provers and the testers are likely to run on most Prologs.

This work-in-progress paper documents some key components of this code repository.

For comparing with other provers, we have ported the propositional subset of the ILTP library to SWI-Prolog and uniformized notation of some third party provers.

Try:

?-load_probs1. % our prover
?-load_probs2.
...
?-load_probsN.

for their respective performance.

So far, our faprove/1 and ff_prove/1 full propositional IL provers are the only ones passing all correctness tests as well as avoidance of stack overflow errors. All provers can be tested at various timout levels by changing max_time/1 in file tester.pro

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].