Code Monkey home page Code Monkey logo

voile-rs's People

Contributors

anqurvanillapy avatar ice1000 avatar oraluben avatar oxalica avatar zaoqi 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  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  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  avatar  avatar

Watchers

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

voile-rs's Issues

Desugar state

Currently, the desugar functions have too many repetitive parameters:

  • env
  • global_map
  • local_env
  • local_map

Consider putting them together.

Redesign abstract syntax

Currently, we have already got DBI in our abstract syntax.
This is causing problems -- type checking against DBI-based lambdas is difficult.

I want to redesign the abstract syntax according to MiniAgda, which have a similar architecture of Voile (Concrete (syntax-checked), Abstract (scope-checked), Value (type-checked)) but does not use DBI in abstract. Instead, it uses DBI in values but UIDs in abstract.

Why isn't `VecDbiEnv` a `Vec`?

We can replace VecDbiEnv with a Vec.

These codes are affected:

voile-rs/src/cli/mod.rs

Lines 24 to 36 in 12194c7

// Translate to abstract syntax
// todo: some confusion: https://github.com/owo-lang/voile-rs/commit/237b422574e2d1d2b0446b12303812269cff0b34#r33261393
let abs = trans_decls(ast)
.map_err(|err| eprintln!("{}", err))
.unwrap_or_else(|()| {
eprintln!("Translate failed.");
std::process::exit(1)
})
.iter()
.fold(Vec::new(), |mut vec, (index, decl)| {
vec[*index] = decl.clone();
vec
});

let decl = ctx.remove(&0).unwrap();

let decl = ctx.remove(&1).unwrap();

after all these we can start testing our trans/check functions

`Axiom` should have its own type

Because an axiom can be unimplemented (recursive-calls) or postulated. There can be many kinds of axioms.

Extracting a standalone type will also be helpful for map_axioms.

Variant semantics?

ConsType(SyntaxInfo),

Currently there's only a label -- without a type expression that represents its argument type.

If I write an expression 'Label ParamType, it'll be parsed as App(ConsType(Label), Expr(Ident)),
which indicates that the type of 'Label is Lam(Type /* param type */, Sum(Ref(0 /* DBI */))), right?

Does that look good to you guys?

Assigned people are supposed to participate the discussion.

Basic REPL

BTW we need to improve the "type check successful" message according to Voile herself:

image

Unsafe compile

We need a way to compile abs to core without typechecking.

This is useful when we can successfully infer the type of some expressions but we also need their values. These expressions are supposed to be well-typed thus can be unsafe-compile.

Code cleanup

Remove these things:

  • TCS::compile
  • eval::Strategy

Use use abs::Abs::* in check::check_type.

Is lambda dbi instantiation really correctly implemented?

First of all, \x.\y.y is Lam(Lam(Dbi(0)).
Instantiate this (e.g. with a value 114514), according to our current strategy, will produce Lam(114514), which means that our implementation is evaluating (\x.\y.y) 114514 to \y.114514.

Junk! Need to fix it asap.

Remove implicit parameters

Due to the presence of Abs, we won't be able to resolve implicit parameters when translating String-based variables to DBI, thus giving up implicit parameters.

Focuses of this new PoC language

This is intended to be a discussion thread about focuses of Voile.

There is also a bikeshedding here: do we need to change the org name to owo-lab for storing these kinds of PoC languages?

Lambda syntax design & parser

Let's vote.

Option 0 (Haskell, add a ๐ŸŽ‰ to vote for this):

\x -> x
\x y -> y x

Option 1 (Idris, add a ๐Ÿš€ to vote for this):

\x => y
\x => \y => y x

Option 2 (Mini-TT, add a โค๏ธ to vote for this):

\x. x
\x y. y x

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.