Skip to content

Concurrent Execution Feature in InHs! Yay!!

Latest
Compare
Choose a tag to compare
@ayush268 ayush268 released this 26 Oct 08:37
· 16 commits to master since this release

This release incorporates all the features of the first release, i.e. no change in syntax of former statements (Backward Compatible).

Release 2.0 (Current Release) now supports the following features:
Firstly, Backward Compatible features from the previous release:

  • Non-suspendable statements
    • Skip (empty statement)
    • Multiple (list of multiple statements to be executed sequentially)
    • Var (new variable declaration)
    • BindIdent (binding a variable to another, unifying 2 variables)
    • BindValue (binding a variable to a value, unifying a value and a variable)
  • Suspendable statements
    • Conditional (if-else statement)
    • Match (case, pattern match statement)
    • Apply (procedure/closure application)
  • Arithmetic Expression Evaluation

Features added in the new (current) release:

  • The suspendable statements now get suspended instead of crashing on an unbound variable.
  • Declarative Concurrent Model
    • Thread (creating a new thread/stack)
    • threadScheduler which does the following:
      • Pick one of the Ready threads/stacks and calls contextSwitchAndExecute on it.
      • Report the result if all threads/stacks reach Completed state.
      • Raise an Exception: All threads are in suspended state, denoting failure to execute further.

Features planned for next release:

  • Addition of a Trigger Store to account for statements which can be executed on demand.
  • Lazy Execution using the above-added Trigger Store.