Giter Club home page Giter Club logo

lura's Introduction

Lura

Incremental/single-pass based compiler, the API can be either used for Single-Pass Compiling and for building LSP, or things that would need incremental pipelines. It's a study project of mine for studying incremental compilers and package-managers.

The project is still being developed, and the table of contents is:

The objective of this project is:

  • Dealing with language-servers, and direct support for Visual Studio Code
  • Having a full-featured CLI for building, and packaging libraries for Lura
  • Lowering to LLVM-IR, and executing JIT
  • Error-resistant compiler, like having a compile-time error, and still can compile, because the error fall onto the runtime
  • Interpreter for basic things like macro-expanding.
  • Query-based architecture.

It's all based on the works:

And have some great inspirations in rust-analyzer code-base..

Running

Clone the repository with git submodule update --recursive --remote

Garbage-Collection

The goal of this compiler isn't optimizing things, it's more like an IDE, so the garbage collector is based on Reference Counting.

License

Lura is distributed under the terms of the MIT license.

lura's People

Contributors

algebraic-sofia avatar aripiprazole avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

italocobains

lura's Issues

Constraint entailment

Constraint entailment is the satisfiability of type classes, just like the example:

In this section, we describe how class environments can be used to answer questions about which types are instances of particular classes. More generally, we consider the treatment of entailment: given a predicate p and a list of predicates ps, our goal is to determine whether p will hold whenever all of the predicates in ps are satisfied. In the special case where p = IsIn i t and ps = [], this amounts to determining whether t is an instance of the class i. In the theory of qualified types [Jones, 1992], assertions like this are captured using judgements of the form ps ||- p; we use a different notation here-the entail function that is defined at the end of this section-to make the dependence on a class environment explicit.

  • Given Eq a having Ord a as superclass,
  • Then Eq a satisfies Ord a

Goals

Details

  • The implementation should not require explicit predicates for the entailed predicates, like
    if we have Eq a, we should not have an explicit constraint of Ord a, given the first example.

Extras

  • Warns and removes all useless/unused predicates in the context

Biblio

  1. https://gist.github.com/chrisdone/0075a16b32bfd4f62b7b#entailment

Tracking

  • Type System
    • #4
    • #5
    • #6
    • #7
    • #8
    • #9
    • Trait methods type checking
    • Class methods type checking
    • Data methods type checking
    • Mutual recursive functions on expression-level
    • Dependent types feature
  • #10
    • Closure conversion
    • Coverage checking
  • Resolution
    • Create class fields instead of using direct methods
    • Add an HIR indexing expression
    • Improve circular dependency error messages

Elaboration

Creates a new abstract syntax tree containing semantic information of source code like ad-hoc,
gadt, closure conversion, etc.

Goals

  • Define the THIR
  • Create lower from HIR for THIR

Debruijin indexes on "forall"

The current implementation uses HOAS names instead of De Bruijin indexes and levels, the levels are only used in holes

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.