• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

DE-labtory/koa: The koa is a high-level language that has more expressions than ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

DE-labtory/koa

开源软件地址:

https://github.com/DE-labtory/koa

开源编程语言:

Go 99.8%

开源软件介绍:

koa

Build Status License Language Coverage Status

The project is inspired by the simplicity and the ivy-bitcoin.

The koa project is to create a high-level language that has more expressions than the bitcoin script and is simpler and easy to analyze than soldity(ethereum).

A more detailed explanation is given below.

Also, koa project is published in Mobisys 2019! You can see the paper and poster below.

Title: "Demo: Light-Weight Programming Language for Blockchain"

Architecture

koa architecture

  • Lexer
  • Parser
  • Compiler
  • VM

Language Specification

Primitive Type

  • Integer

    It is expressed in int. Integer size is 64 bytes.

  • String

    It is expressed in string.

  • Boolean

    It is expressed in true or false.

Operators

  • Arithmetic

    We support +, -, *, /, % only for integer.

  • Comparison

    We support ==, !=, >, <, >=, <= for comparsion.

  • Logical

    We support &&, || for logical operation.

  • Prefix

    We support !, - for prefix operator.

Condition

It is expressed in if(){} or if(){}else{}.

Etc

  • return
  • \n : All statements should end in \n.
  • Assign : It is expressed in =.

Example Code

contract {
 func Sig(sig string){
   string pubkey = "fvfidBGruUYC+mTw7CusaCOQbBuZBiYduFgH8hRW97KLmHn0xzB1FV++KI7syo8qXGo8Un24WP40IT78XjKO"
   
   if checkSig(pubkey, sig){
     return true
   }
   return false
 }
}

Contribution

Contribution Guide CONTRIBUTION

License

Project source code files are made available under the Apache License, Version 2.0 (Apache-2.0), located in the LICENSE.

CLA Hub

To get started, sign the Contributor License Agreement.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap