SCoLang - Language Reference Manual

Similar documents
VLC : Language Reference Manual

egrapher Language Reference Manual

Language Reference Manual simplicity

The Warhol Language Reference Manual

GOLD Language Reference Manual

MATVEC: MATRIX-VECTOR COMPUTATION LANGUAGE REFERENCE MANUAL. John C. Murphy jcm2105 Programming Languages and Translators Professor Stephen Edwards

SSOL Language Reference Manual

Instructor: SIR MUHAMMAD NAVEED Created by: ARSLAN AHMED SHAAD ( ) MUHAMMAD BILAL ( ) ISIT:

SECTION II: LANGUAGE BASICS

\n is used in a string to indicate the newline character. An expression produces data. The simplest expression

JME Language Reference Manual

Introduction. Following are the types of operators: Unary requires a single operand Binary requires two operands Ternary requires three operands

FRAC: Language Reference Manual

YOLOP Language Reference Manual

LCSL Reference Manual

BoredGames Language Reference Manual A Language for Board Games. Brandon Kessler (bpk2107) and Kristen Wise (kew2132)

Chapter 2 Working with Data Types and Operators

Computer Components. Software{ User Programs. Operating System. Hardware

CS201 Some Important Definitions

PROGRAMMING FUNDAMENTALS

RTL Reference 1. JVM. 2. Lexical Conventions

CS313D: ADVANCED PROGRAMMING LANGUAGE

CHIL CSS HTML Integrated Language

COMSC-051 Java Programming Part 1. Part-Time Instructor: Joenil Mistal

QUark Language Reference Manual

Full file at

IC Language Specification

CGS 3066: Spring 2015 JavaScript Reference

Flow Control. CSC215 Lecture

Introduction to Programming Using Java (98-388)

ENGR 101 Engineering Design Workshop

IPCoreL. Phillip Duane Douglas, Jr. 11/3/2010

3. Java - Language Constructs I

Object oriented programming. Instructor: Masoud Asghari Web page: Ch: 3

DAVE. Language Reference Manual. Hyun Seung Hong. October 26, 2015

Basic operators, Arithmetic, Relational, Bitwise, Logical, Assignment, Conditional operators. JAVA Standard Edition

Senet. Language Reference Manual. 26 th October Lilia Nikolova Maxim Sigalov Dhruvkumar Motwani Srihari Sridhar Richard Muñoz

CSCE 110 Programming I Basics of Python: Variables, Expressions, Input/Output

Weiss Chapter 1 terminology (parenthesized numbers are page numbers)

Chapter 1 Summary. Chapter 2 Summary. end of a string, in which case the string can span multiple lines.

GE PROBLEM SOVING AND PYTHON PROGRAMMING. Question Bank UNIT 1 - ALGORITHMIC PROBLEM SOLVING

Sir Muhammad Naveed. Arslan Ahmed Shaad ( ) Muhammad Bilal ( )

corgi Language Reference Manual COMS W4115

REVIEW. The C++ Programming Language. CS 151 Review #2

Java Basic Programming Constructs

JAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1)

Java provides a rich set of operators to manipulate variables. We can divide all the Java operators into the following groups:

Creating a C++ Program

Character Set. The character set of C represents alphabet, digit or any symbol used to represent information. Digits 0, 1, 2, 3, 9

Angela Z: A Language that facilitate the Matrix wise operations Language Reference Manual

DaMPL. Language Reference Manual. Henrique Grando

Review of the C Programming Language for Principles of Operating Systems

GBL Language Reference Manual

Sprite an animation manipulation language Language Reference Manual

A First Look at ML. Chapter Five Modern Programming Languages, 2nd ed. 1

Scripting Languages. Python basics

do fifty two: Language Reference Manual

PHPoC vs PHP > Overview. Overview

CSE 115. Introduction to Computer Science I

Language Reference Manual

Cellular Automata Language (CAL) Language Reference Manual

CSC 1214: Object-Oriented Programming

Programming in Python 3

Advanced Algorithms and Computational Models (module A)

Sketchpad Graphics Language Reference Manual. Zhongyu Wang, zw2259 Yichen Liu, yl2904 Yan Peng, yp2321

Basic program The following is a basic program in C++; Basic C++ Source Code Compiler Object Code Linker (with libraries) Executable

The Arithmetic Operators. Unary Operators. Relational Operators. Examples of use of ++ and

The Arithmetic Operators

Onion Language Reference Manual. By: Andrew Aday, (aza2112) Amol Kapoor (ajk2227), Jonathan Zhang (jz2814)

Review: Exam 1. Your First C++ Program. Declaration Statements. Tells the compiler. Examples of declaration statements

1 Lexical Considerations

Visual C# Instructor s Manual Table of Contents

Chapter 2: Introduction to C++

Chapter 2: Special Characters. Parts of a C++ Program. Introduction to C++ Displays output on the computer screen

CP FAQS Q-1) Define flowchart and explain Various symbols of flowchart Q-2) Explain basic structure of c language Documentation section :

Operators and Expressions

Decaf Language Reference

M/s. Managing distributed workloads. Language Reference Manual. Miranda Li (mjl2206) Benjamin Hanser (bwh2124) Mengdi Lin (ml3567)

PRG PROGRAMMING ESSENTIALS. Lecture 2 Program flow, Conditionals, Loops

Java Control Statements

Review of the C Programming Language

GraphQuil Language Reference Manual COMS W4115

BASIC ELEMENTS OF A COMPUTER PROGRAM

Data types Expressions Variables Assignment. COMP1400 Week 2

LECTURE 3 C++ Basics Part 2

Typescript on LLVM Language Reference Manual

CSI33 Data Structures

XQ: An XML Query Language Language Reference Manual

Unit 6 - Software Design and Development LESSON 3 KEY FEATURES

Key Differences Between Python and Java

CS313D: ADVANCED PROGRAMMING LANGUAGE

CMPT 125: Lecture 3 Data and Expressions

Object-Oriented Programming

The pixelman Language Reference Manual. Anthony Chan, Teresa Choe, Gabriel Kramer-Garcia, Brian Tsau

Computer Components. Software{ User Programs. Operating System. Hardware

Flow Language Reference Manual

Basic Concepts. Computer Science. Programming history Algorithms Pseudo code. Computer - Science Andrew Case 2

CSCE 110 Programming I

Pac Man Game Programming Language. Reference Manual. Chun Kang Chen (cc3260) Hui Hsiang Kuo (hk2604) Shuwei Cao (sc3331) Wenxin Zhu (wz2203)

JAVA OPERATORS GENERAL

Transcription:

SCoLang - Language Reference Manual Table of Contents: 1. Introduction 2. Types a. Basic Data types b. Advanced Data types 3. Lexical Convention a. Identifiers b. Keywords c. Comments d. Operators e. Punctuators 4. Syntax Notation and Program Structure a. Precedence b. Declaration c. Assignment d. Binding e. Control Flow f. Program Structure 5. Standard Library Functions

1. Introduction In this document we propose, SCoLang, a strongly-typed language that is made with the premise that everything is a contract waiting to execute. Each contract in our language has two key components: listeners and actions. In a contract, we bound each action to a set of listeners. A listener is set active once a set of predefined conditions are met. When all the listeners in a contract are marked active, the associated actions in the contract are executed. The goal behind our language is to construct programs that help eliminate inefficiency in routine tasks. For instance, one could create a contract to turn on lights if a set of predefined criteria are satisfied. In short, we envision that our language could be used for anything from simple load balancing to complex IOT applications.

2. Types Basic Data Types: long, float, char Regular primitive types Array An aggregate data type; [] Python style (slicing, referencing, etc) bool String Ternary data type: true, false, null A text value. Can be a single char or an arbitrary number of chars concatenated together. Advanced Data Types: Contract Listener Action A structure that stores associated listeners with actions. At a high level, this binds listeners to actions and then triggers actions if conditions for listeners are satisfied. A data structure that stores a boolean condition. It also handles checking to see if the condition is met. (e.g. memory usage exceeds a certain amount) A data structure that stores an event. This event is meant to be triggered by a contract if the conditions for the associated listener(s) are meant. (e.g. turn lights on) 3. Lexical Convention Identifiers: Identifiers consist of one or more characters with a leading alphabetic character followed by any number of alphanumeric

characters or underscores. Keywords: Contract Listener Action for resolve reject if elif else while break A structure that stores associated listeners with actions. At a high level, this binds listeners to actions and then triggers actions if conditions for listeners are satisfied. A data structure that stores a boolean condition. It also handles checking to see if the condition is met. (e.g. memory usage exceeds a certain amount) A data structure that stores an event. This event is meant to be triggered by a contract if the conditions for the associated listener(s) are meant. (e.g. turn lights on) standard for loop (for control flow) Resolve a listener (conditions satisfied) Stop listening before satisfied (conditions satisfied such that it will never resolve) standard if (for control flow) standard elif (for control flow) standard else (for control flow) standard while (for control flow) Breaks the current control flow

continue Skips the current iteration within an iterator Comments: /* Comment */ /* Multi-line Comment */ Operators: Unary Operators:! Not Binary Operators: == Equal to comparative!= Is not equal to < Less than > Greater than <= Less than or equal to >= Greater than or equal to && And operator Or operator Special Operators: = Assignment. Access elements underneath composite data types -> Binds listeners to actions to create a contract

Mathematical Operators + Addition - Subtraction * Multiplication / Division % Modulo << Bitshift left >> Bitshift right ^ & Binary XOR Binary AND Binary OR Punctuators: [] Array assignment and referencing () Statement Precedence { Code Blocks ; Statement boundary. Must be at the end of each statement to signal such. 4. Syntax Notation and Program Structure Operator Precedence The order of operators is as follows: ->. []! * / % + -

>> << > < >= <= ==!= & ^ && = Declaration: <type> <name> long a; long[] a; Action[] actions; Assignment: Basic: <type> <varname> = <varvalue>; long a = 34333; long[] arr = {1,2,3,4; Advanced: <type> <varname> = <codeblock> Action display = { print(a); Listener listen = { while(a!= b) { if(a > b) { a -= b; elif( b > a) { b -= a;

Binding: <listener> -> <action> Listener a = {... Action b = {... Control Flow: if/elif/else structure if(condition){ elif(condition){.. else {.. for structure for(initialization; terminal condition; increment) { while structure while(condition) { Program Structure: - Variables Declarations - Listener Declarations - Action Declarations - Bindings 5. Standard Library Functions webhook(string endpoint, int port) Initiates a connection to a specified endpoint and port. Returns a boolean (default 0, set to 1 for a tick if the

endpoint is requested). print(string str) Print a string that is passed into the function into standard out