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

[Design and Implementation] ISL Interpreter #6

Open
alpaylan opened this issue Jul 10, 2022 · 3 comments
Open

[Design and Implementation] ISL Interpreter #6

alpaylan opened this issue Jul 10, 2022 · 3 comments

Comments

@alpaylan
Copy link
Contributor

The interpreter's task is to

  • given a parsed instruction,
  • type-check the instruction
  • compile the instruction to the move(function call to canvas API)

The complex part is (clearly) the type-check. Luckily we can use a dynamic type-system. We will need to do a number of checks regarding operations. For each instruction, questions arising include but not limited to;

  • Does the given block, pixel or color exist?
  • Do the given blocks swappable?
  • Do the given blocks mergable?
  • Do the given block cuttable or colorable with the given instruction?

@gambasz will be in charge of this.

Guido, in my head the task is;

  • Define the relevant questions and document them.
  • Define formal definitions of those questions.
  • Implement the interpreter using these questions.

You can define your own structures inside javascript assuming parser will provide them to you, we will make the connection.

Before you start implementing, we will need a canvas implementation. Which @umut-sahin is gracefully implementing for the back-end and someone(possibly I or Umut again) will port for the front-end.

@gambasz
Copy link

gambasz commented Jul 18, 2022

Here's what I think might be a good start into addressing the first two points. There are some questions we still need to answer (clarify and standardize) but for the most part I think we'll be ready to start once the canvas is ready. Attached is a rough draft to get us started:

Typechecking_ISL.pdf

@alpaylan
Copy link
Contributor Author

Typechecking_ISL.pdf

I tried to answer some of the questions here. Does this make sense. I'm writing the participant spec; which tries to be more clear. Maybe reading that could be helpful?

ICFP Contest 2022.pdf

@gambasz
Copy link

gambasz commented Jul 19, 2022

Comments definitely make sense. I can get started on the checks that don't directly require the use of the canvas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants