Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ergo: Replacement #35

Open
martinhalford opened this issue Jun 30, 2022 · 7 comments
Open

Ergo: Replacement #35

martinhalford opened this issue Jun 30, 2022 · 7 comments

Comments

@martinhalford
Copy link
Member

martinhalford commented Jun 30, 2022

Discussion 🗣

Currently all logic within a Accord Project (Cicero) template is executed as Ergo.

Given the niche nature of this language and the difficulty in finding OCaml/Coq Developers, there may be some benefit in allowing other languages (e.g. NodeJS, C#, Python, Rust, etc.) being used as target languages instead of or in addition to Ergo.

Context

Ergo is a domain specific language developed specifically for the Accord Project. Ergo was developed using OCaml, Coq and Cert by @jeromesimeon.

Detailed Description

Although there are many design advantages in having a custom language dedicated to the Accord Project, the maintenance, support and ongoing development of the Ergo language is dependent on niche skills which are not readily available at scale within the developer community.

This restricts who can maintain and/or contribute to the Ergo codebase and slows the ongoing development of this language.

In addition, Ergo has a custom syntax that, although similar to other languages, is distinct and requires some effort for template authors to learn. This introduces a barrier to entry for template authors wanting to create AP templates but are unfamiliar with the Ergo syntax.

The current Ergo implementation is incomplete and requires additional language constructs to be added in order for it to be fully useable by template authors.

However... there are some downsides to introducing generic target languages.

Due to their very nature, general purpose languages may provide too much flexibility w.r.t. language features which could produce undesirable effects during execution of template logic.

For example, Ergo is a functional language where every expression evaluates, and the code is restricted to executing only within the AP template. General purposes languages can, potentially, execute or invoke executions beyond the template boundaries, if allowed to do so. Other general purpose languages (e.g. NodeJS) may pull in external libraries that could contain vulnerabilities.

In addition, some AP template functionality (e.g. Parse) is tightly coupled to Ergo/OCaml/Coq and would not be easily replicated using a general purpose language.

Ergo touches many different areas of the AP code base. Therefore, replacing Ergo or allowing other languages to be targeted alongside Ergo is a non-trivial process which could require many person months of effort.

In summary....

We have the following options:

  1. Keep Ergo - find additional contributors / maintainers who can step up ongoing support and maintenance of Ergo.
  2. Replace Ergo - introduce support for other target languages and treat Ergo as legacy code.
  3. Keep Ergo & target other languages - find additional contributors / maintainers who can keep Ergo alive and introduce support for other target languages.
  4. Some other option* - whatever that may be.
@kziemski
Copy link

ERGO->WASM and then allow other target languages to use a wasmer or equivalent to invoke the compiled code.

@martinhalford martinhalford changed the title Additional target languages Ergo: Ongoing support & maintenance OR replace with other target languages. Jul 3, 2022
@mttrbrts
Copy link
Member

TSC Notes:

  • Further development on Ergo is not expected
  • Alternative proposals to be sought through the TSC
  • @dselman to give an overview of existing Ergo integration points.

@mttrbrts mttrbrts changed the title Ergo: Ongoing support & maintenance OR replace with other target languages. Ergo: Replacement Oct 27, 2022
@martinhalford
Copy link
Member Author

martinhalford commented Oct 27, 2022

As discussed in TSC meeting Thursday 27 October, the next step is to schedule a workshop / technical deep dive to determine the technical steps / strategy for replacing Ergo.

For anyone interested in being involved, the it is highly recommended that they watch (or read) the excellent presentation given by @dselman during a recent Tech WG call, where Dan explains some of the issues and challenges with replacing Ergo.

Video - AP Future of Ergo
PDF - AP Future of Ergo

If anyone is interested in being involved in this project, please leave a message in the Accord Project #technology-wg channel, or message me directly on Discord (@martinhalford#4706) or leave a comment below in this issue.

@semihtheresearcher
Copy link

semihtheresearcher commented Nov 21, 2022

If I'm not late to the discussion: I want to access to this system with Python so option 3. If it has design advantages there is no point in discarding the whole language.

@timothytavarez
Copy link

I would like to add that being able to compile to a memory-safe language/runtime can be a strong value proposition. Looking forward into the future (years, decades), we may find that applications and stacks vulnerable to things like buffer overflows are deprioritized by either legislation or industry best practice.

@mttrbrts
Copy link
Member

mttrbrts commented Sep 7, 2023

TSC Minutes

Ergo has been removed from Cicero ("template-archive" repo). Some small house-keeping to do.

Need documentation and exemplars for BYO runtime. @martinhalford prototyping with Rust.

Need to update documentation and marketing website. @martinhalford to lead.

Ergo repo archived.

@mttrbrts
Copy link
Member

mttrbrts commented Sep 28, 2023

TSC Minutes

Priority is to update public docs and the marketing website to reflect reality.

@dselman is willing to match investment from others, but needs to be driven by someone with demand for capabilities.

Next week's TechWG call is dedicated to APAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🏗 In progress
Development

No branches or pull requests

6 participants