Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
SubScript: A Process
Algebra extension
progress and perspectives
Anatolii Kmetiuk
Andre van Delft
Plan
• Introduction of the language
• Examples and features available
• Future development
Introduction of the
language
Meet SubScript
• An extension to Scala programming language
• Adds a syntax for process description inspired by
the Algebr...
Brief history
• Started as a library (VM), then the syntax was added by a compiler fork - it was difficult to
get started
•...
Examples and
features available
Example: Hello World
import subscript.language
import subscript._
import subscript.Predef._
object Main extends SubScriptA...
Operators
• Sequential: space, line break, “;” - identical
• Parallel: &&, &, ||, | - behaviour inspired by Boolean logic
...
Data Flow
• Each script can have a result value, it can be set
with a special syntax
• The result value can be processed u...
Example application: Eye Test
object Main extends SubScriptApplication {
script..
live = initGui
[ new WaitScreen || initD...
Example application: Eye Test
class Test extends Frame with FrameProcess {
script..
live = mainTestProcess^ / cancelBtn
ma...
Future development
Perspective directions
• User-computer interactions specification
• Prototyping & implementing the behaviour of consumer el...
https://github.com/scala-subscript/koans
Getting Started: Koans
Getting Started: Cheat Sheet
https://www.cheatography.com/anatoliykmetyuk/cheat-sheets/subscript/
Getting Started: Homepage
• GitHub: 

https://github.com/scala-subscript/subscript
• Official website: http://subscript-lan...
Thank you for your
attention!
Upcoming SlideShare
Loading in …5
×

SubScript: A Process Algebra extension progress and perspectives

343 views

Published on

A brief report on the current status and the perspectives of the SubScript language development as of April 2016.

Published in: Software
  • Be the first to comment

  • Be the first to like this

SubScript: A Process Algebra extension progress and perspectives

  1. 1. SubScript: A Process Algebra extension progress and perspectives Anatolii Kmetiuk Andre van Delft
  2. 2. Plan • Introduction of the language • Examples and features available • Future development
  3. 3. Introduction of the language
  4. 4. Meet SubScript • An extension to Scala programming language • Adds a syntax for process description inspired by the Algebra of Communicating Processes • Aims for simplification of event-driven and concurrent programming
  5. 5. Brief history • Started as a library (VM), then the syntax was added by a compiler fork - it was difficult to get started • Developed into a preprocessor based on parser combinators to specify the syntax. It is managed by an SBT plugin - easy to get started and play with the syntax scalaVersion := "2.11.7" libraryDependencies += "org.subscript-lang" %% "subscript-swing" % "3.0.3" SubscriptSbt.projectSettings addSbtPlugin("org.subscript-lang" %% "subscript-sbt-plugin" % "3.0.3") build.sbt project/build.sbt
  6. 6. Examples and features available
  7. 7. Example: Hello World import subscript.language import subscript._ import subscript.Predef._ object Main extends SubScriptApplication { script live = println("Hello") println("World") } Short Verbose import subscript.language import subscript._ import subscript.Predef._ object Main { def main(args: Array[String]): Unit = runScript(live) script live = {:println("Hello"):} {:println("World"):} }
  8. 8. Operators • Sequential: space, line break, “;” - identical • Parallel: &&, &, ||, | - behaviour inspired by Boolean logic • Choice: “+” operator selects between its operands • Disruption: “/“ - left hand side disrupted by the right hand side • Conditional: if-then-else (boolean script result values as a predicate), do-then-else (script success status as a predicate)
  9. 9. Data Flow • Each script can have a result value, it can be set with a special syntax • The result value can be processed using the dataflow notation script.. live = msg ~~(message: String)~~> println(message) msg = ^"Hello World"
  10. 10. Example application: Eye Test object Main extends SubScriptApplication { script.. live = initGui [ new WaitScreen || initData^ ]~~(repos: Repositories)~~> [ new MainScreen(repos); let repos.close()] initGui = javax.swing.UIManager.setLookAndFeel: "com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel" initData = ^{*new DerbyRepo("eyetest-db")*} }
  11. 11. Example application: Eye Test class Test extends Frame with FrameProcess { script.. live = mainTestProcess^ / cancelBtn mainTestProcess = eyeTest("Right")^^1 eyeTest("Left" )^^2 eyeTest(eyeName: String) = let testArea.font = new Font("Ariel", ..., 20) let testArea.text = s"Look with $eyeName eye, OK when ready" let answerField.enabled = false sleep: 250 Key.Enter + okBtn doTest( if(eyeName=="Right") previousScoreRight else previousScoreLeft )^ }
  12. 12. Future development
  13. 13. Perspective directions • User-computer interactions specification • Prototyping & implementing the behaviour of consumer electronics:
 TV, cooking plates, ... • Simulation & verification: railroad interlocking • SubScriptJS: run in web browser; improve NodeJS • Preprocessor: ScalaParse & Dotty
  14. 14. https://github.com/scala-subscript/koans Getting Started: Koans
  15. 15. Getting Started: Cheat Sheet https://www.cheatography.com/anatoliykmetyuk/cheat-sheets/subscript/
  16. 16. Getting Started: Homepage • GitHub: 
 https://github.com/scala-subscript/subscript • Official website: http://subscript-lang.org/
  17. 17. Thank you for your attention!

×