Giter VIP home page Giter VIP logo

yolol's Introduction

Build status Test status

This repository contains 4 projects:

YololEmulator

This is an emulator for Yolol. It allows you to input a file of Yolol code and execute it line by line. See detailed documentation here. Use an online version of the emulator here!

YololAssembler

This is an assembler for a higher level language (yasm) which compiles into Yolol. See detailed documentation here.

Yolol

This is a library for interacting with Yolol code from C#. It allows you to parse a string into an AST and execute the AST.

Yolol.Analysis

This is a library for analysing/optimising Yolol code. It provides easy to use methods for analysing and modifying the AST of a Yolol program.

yolol's People

Contributors

avril112113 avatar jakobch avatar leoltron avatar martindevans avatar mrchip2k avatar thomasio101 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

yolol's Issues

Implement Optimisation Pass Test Coverage

Every single optimisation pass needs tests covering:

  • The most basic case where optimisation should happen. Verify that it does.
  • A more complex "real world" example where optimisation should happen. Verify that it does.

If possible:

  • A case where optimisation should not happen but seems likely to be miss-optimised, verify that it does not.

Fuzzing

There is currently a fuzzer implemented (QuickFuzz) but it's a very quick-n-dirty implementation that isn't well tested and seems to have some issues. There's a lot of potential here for multiple projects:

  • Replace the fuzzer with something new
  • Improve the existing fuzzer (faster/more coverage)
  • Test fuzzer

CFG Divide Error Removal Pass

At the moment the CFG pass will generate a graph like this:

Division has generated a Runtime Error edge exiting the block (because division by zero is a runtime error). However in this case it can be proven that this divison does not error quite trivially, it's a divide by a constant (-2) which is not zero!

Add a CFG optimisation pass which detects divides by things that can be considered constant and remove the error edge if it can be proven not to error.

Implement Fast Fuzzer

Bugs happen, especially in a complex optimisation pipeline like this. To help catch bugs develop a very basic "fuzzer" which will simply run a given Yolol program ~100 times (in parallel?) with a totally random input generated every time the program tries to read an external. Set the fuzzer to run at the start and end of the optimisation pipeline, if it detects a divergence in program results return the unmodified program and report an error.

An obvious extension to this is to take a set of type hints, so the fuzzer only generates externals of the correct type.

CommandLineParser not included in 2.0 release?

When I try to run "YololEmulator.exe" from the 2.0 release I get this message:
Error: An assembly specified in the application dependencies manifest (YololEmulator.deps.json) was not found: package: 'CommandLineParser', version: '2.5.0' path: 'lib/netstandard2.0/CommandLine.dll'

more a suggestion than an issue.

would it be possible to have an option to pass more than one .lol file to be run? execution happens in the order of .lol file args passed, you can adjust the :vars from each of the files as they are called upon but all the files can share the same :vars. this way people can simulate multiple chips running parallel or see how systems of chips would work together.

just a suggestion.

Implement AST Equality Test Coverage

AST equality allows you to test where two syntax trees are the same with:

var a = TestExecutor.Parse("program");
var b = TestExecutor.Parse("program");

Assert.isTrue(a.Equals(b));

This needs testing for every ast sub type.

reprinting lines

So i'm not sure what is causing this but it's reprinting a line when instead it should be going to the next step after the condition was met.

My code is:

count = 0
if count < 3 then count++ goto 2 else goto 6 end

string = "hello world"

mytest

So it doesn't actually run that line again because the condition is met, it reprints it, then the next step it runs the rest of the code.

Boolean Analysis

Build a CFG analysis pass that builds a set of VariableName which are known to be booleans (the result of any logical comparison).

This will need to run after SSA has been applied.

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.