pl t programming language for time n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
PL/T Programming Language for Time PowerPoint Presentation
Download Presentation
PL/T Programming Language for Time

Loading in 2 Seconds...

play fullscreen
1 / 18

PL/T Programming Language for Time - PowerPoint PPT Presentation


  • 88 Views
  • Uploaded on

PL/T Programming Language for Time. Supervised by Professor Alfred V. Aho Teaching Assistant: Mr. Yan Zou Laurent Charignon (lc2817): Project Manager Sameer Choudhary (sc3363): System Integrator Imré Frotier de la Messelière (imf2108): Language Guru Tao Song (ts2695): System Architect

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'PL/T Programming Language for Time' - mariah


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
pl t programming language for time

PL/TProgramming Language for Time

Supervised by Professor Alfred V. Aho

Teaching Assistant: Mr. Yan Zou

Laurent Charignon (lc2817): Project Manager

Sameer Choudhary (sc3363): System Integrator

ImréFrotier de la Messelière (imf2108): Language Guru

Tao Song (ts2695): System Architect

AbhijeetTirthgirikar (apt2120): Tester and Validator

introduction to pl t
Introduction to PL/T

Example Scenario

You want to make an alarm clock. Set it up to ring at 8:00pm today. You can input “y”

to snooze it for another 10 mins. You have to terminate the program to stop the alarm

otherwise it will keep on running for an hour. The alarm clock will ring for 1s and wait for

input to snooze for 1s, and it will keep doing that for 1 hour.

introduction to pl t continued
Introduction to PL/T (Continued…)

PL/T has following properties:-

  • Simple and Easy to Learn
  • Powerful
  • Robust
  • Portable
  • Intuitive
  • Precise
sample programs
Sample Programs

void main ( ) {

#|5| every 1s{

cout << "hello";

}

}

sample programs continued
Sample Programs (Continued…)

void countDown(time t) {

time n = now();

time p = t;

#<n, n+t> every 1s{

cout << p;

p = p-1s;

}

cout<< "Time over!";

}

motivation
Motivation
  • In general purpose programing languages it is difficult to write time based programs
  • Requires knowledge of threads
  • Idea of having time as a primitive data type
  • To make writing time based general purpose operations like looping etc. easy
project management
Project Management

What we wanted

  • Avoid stress by having something working quickly
  • Don't have to cross our fingers the last day
  • Learn new practices
project management continued
Project Management (Continued…)

What we have actually did

  • Made some compromises on the scope of the project when it was needed
  • Considered the individual comfort as a top priority
  • Tried several paths when we are blocked
  • Refactored a lot
  • Tested the most critical features to feel confident and avoid this
important language syntactic constructs
Important Language syntactic constructs

Time

  • time t1 = 1h2m5s1i;
  • time t2 = 1h1m;
  • t1+t2 => 2h3m5s1i
  • 2*t2 => 2h2m
  • t2/2 => 30m30s
  • t1 < t2 => true
  • t1 >t2 => false
important language syntactic constructs1
Important Language syntactic constructs

Time

  • time t = now();

cin >> t;

cout << t;

  • number n = 5;

t = NumberToTime(n);

n=TimeToNumber(t);

important language syntactic constructs2
Important Language syntactic constructs

# Loop

  • #|5|{

...

}

  • #|3| every 1h{

...

}

  • time t = now();
  • #<t+1h,t+2h>{

...

}

  • #<t,t+3h> every 2s{

...

}

important language syntactic constructs3
Important Language syntactic constructs

# Loop

  • #|5|{

...

}

  • #|3| every 1h{

...

}

  • time t = now();
  • #<t+1h,t+2h>{

...

}

  • #<t,t+3h> every 2s{

...

}

compiler architecture
Compiler Architecture

Fig 1: Architecture Diagram in a nutshell

compiler architecture continued
Compiler Architecture(Continued…)

Fig 2: Detailed Architecture Diagram

execution continued
Execution (Continued)

1. input.plt

2. Main.java

import java.util.*;

import java.lang.*;

class Main{

public static void main(String argv[])

double d =10000;

System.out.println(BIF.intToTime((int)(p)));

}

void main(){

time p = 10s;

cout << p;

}

3. Comiler Output

10s

testing
Testing

Unit Testing

Functional Testing

Complete test suite of PLT programs to test the compiler

Same set of PL/T programs are used to test symbol table

Cucumber JVM - Behavior driven development

Executes plain-text functional descriptions as automated tests

  • JUnit Test Framework
  • To extensively test AST and the code it generates
  • Factory methods to define complex getCode functions
tools used
Tools Used
  • JFlex
  • CUP
  • Eclipse
  • Egit
  • Cucumber
  • http://git-scm.com/
  • http://docs.oracle.com/javase/tutorial/
  • http://en.wikipedia.org/wiki/LaTeX
  • http://www.python.org/
  • http://cukes.info/images/cuke_logo.png
  • http://junit.sourceforge.net/ A voir sur cette page pour reproduirele logo en texte
  • http://www.eclipse.org/
  • http://www.eclipse.org/egit/ a decouper
  • http://www.eclipse.org/mylyn/
  • http://jflex.de/
  • http://www.cs.princeton.edu/~appel/modern/java/CUP/
conclusions
Conclusions
  • Communication! The minutes and the meetings matter more than the code, be sure that everybody knows the status of the project
  • Have a good morale condition: no rush and focus on building a prototype early
  • Keep the iteration shorts and switch roles to maintain a good morale condition.
  • Welcome ideas from everyone and discuss it altogether
  • DVCS is a very important tool, it saves you a great amount of time
  • Use a set of tools you are confident with, it will matter a lot
  • Team building matters
  • Don't hesitate to change your idea
  • Trust your tests to refactor often and have a maintainable code