Presentation is loading. Please wait.

Presentation is loading. Please wait.

SASSi Carl Morgan (Group Leader) Paul Salama Xiaotang Zhang.

Similar presentations


Presentation on theme: "SASSi Carl Morgan (Group Leader) Paul Salama Xiaotang Zhang."— Presentation transcript:

1 SASSi Carl Morgan (Group Leader) Paul Salama Xiaotang Zhang

2 Why be SASSi? Our motivation was to design a language to let a user make quick and simple programs to deal with various statistical problems But what about SAS and other statistics programs?...

3 Unlike SASSi… SAS and other programs like it are big and bulky in terms of maintenance, learning curve, and installation They also cost a bunch. $$$$$$$=bad SASSi is free!!!! (currently) SASSi is simple, easy to learn, and easy to use

4 What can SASSi do? Handles many standard statistical problems such as getting the mean, median, standard deviation, etc. for a set of numbers. Defined as a “vector” in SASSi Supports more complicated statistical problems like regressions, distributions, etc. Graphical output.

5 What SASSi looks like Double b; Vector a=[1,1,2,3,5,8]; b=mean(a); print(“The mean of a is: ”); print(b); plot(bar,a);

6 More Samples SASSi allows users to define their own procedure calls Example: procedure Vector foo( Double sheep, Double cow ) { Double dog = sheep*cow; sheep = sheep+1; Vector animals=[sheep, cow, dog]; //etc… return animals; }

7 SASSi grammar (1) Types of data bool: Boolean values that can either be true or false (and True/False and TRUE/FALSE) int: standard 32-bit integers double: 64-bit IEEE double floating-point format string: a string of characters procedure: a user defined procedure vector: an M by 1 vector of doubles Expressions - Very similar to C: Primary expression: Identifiers, constants, procedure calls, and access to vector types Arithmetic expressions: “+”, “-”, “*”, “/” Relational expressions: “ =”, “==”, “ ”, and “<>”

8 SASSi grammar (2) Constants implemented by: const int a = 3;. xconst Include statement: include ;

9 SASSi grammar (3) Statements Assignments Direct assignment in the form: left-valued expression = right-valued expression; Conditional Statements if( relational expression) {statement} else {statement} For Loops for( assignment ; relation expression ; action) {statement}

10 SASSi built-in procedures Basic statistic methods: mean, median, stdDev, etc… Dealing with vectors: sort, range, union, intersect, etc… Distributions: normal, standard, geometric, etc… Regression: linear

11 SASSi Plotting SASSi supports five built-in graphing functions: Bar Pie Chart Line Error Curve

12 SASSi printing Printing variables (Doubles, Int, and Vector) print(v); Printing strings print(“Who knows why you name something foo?”);

13 SASSi implementation ANTLR Interm. Code AST Tree Tokens*.ssi file LEXERPARSER AST WALKER CODE GENE- RATOR Java Bytecode

14 SASSi Summary SASSi is an efficient, small, FREE, statistics language Expandable with user procedures/plots: So even though we didn’t include Poisson distributions, someone could include it in the future… Enough functionality for a base of statistics

15 Lessons Learned Not sticking to your schedule is bad Meeting twice a week is far more effective and comforting than just once Don’t try to implement all statistics functions, or all of C Get feedback from your TA. They’re there to help, and have been there before Think big, build small Decide if what you think is a language would be better off as a program. If so, don’t try to implement it as a language

16 THE END


Download ppt "SASSi Carl Morgan (Group Leader) Paul Salama Xiaotang Zhang."

Similar presentations


Ads by Google