DOC PREVIEW
Columbia COMS W4115 - NumLang

This preview shows page 1-2 out of 6 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

NUMLANG Dan$Aprahamian Damien$Fensk e+Corbiere$Sahil$Yakmi$Siddhi$Mi6al$Introduction • Designed to make numerical computation easy. • Key Features of this language: o Allows mathematical functions to be entered as literals, manipulated, called, and composed. o Allows computation with matrices and other common mathematical operations. o Arithmetic without loss of precision. o An innovative way of implementing a for loop using match statements. o The language is intended to be suitable for compilation as well as interpreting. The reference implementation is, however, a compiler.Tutorial Introduction to Language • y = [[0, 0, 0], [0, 3, 5]]; • new_y = y[1]; • new_y2 = y[1][1]; • pop<<y>>;y[1][1] = 4; • sub callMe(num x, string list y) {y[1];} • sub call2() {34;} • str2 = "hello";println<<"str2">>; • strList = ["hello", "str"];rm<<strList>>; • str2 = callMe<<4, strList>>; • w = call2<<>>; • w = 43; • x = "hello"; • print<<x>>; • match(w) { cont: w - (w % 10) ? {x = 1;} loop: > 22 ? {x = - 1;} <= 12 % 4 ? pass; done: true ? pass; }Language Implementation • Series of Modules o Scanner/Parser and AST o Static Semantic Checker o Java Source Code Generation (Compiler) o Compilation to Java Byte Code • Tools Used o GitHub o OcamlDebug o Google Docs (Collaborative Code) o GoogleOur files File Lines Role ________________________________________________ Scanner.mll 124 lines Token rules Parser.mly 220 lines CFG Ast.ml 77 lines Types Sast.ml 46 lines Checked types ssc.ml 666 lines Semantic Validity numlangc.ml 276 lines Compiler ________________________________________________ Total 1409 linesSummary/Lessons$Learned • Matrix Like Language capable of o Manipulating functions o Retaining precision of numbers o Making mathematical computation easier with simple syntax • Lessons Learnt o Value of ocamldebug o Ocaml’s value o Resolving reduce/reduce and shift/reduce errors for ambiguous grammar o Importance of resolving scoping issues o How pieces of Compiler fit together • Time Value o Start


View Full Document

Columbia COMS W4115 - NumLang

Documents in this Course
YOLT

YOLT

13 pages

Lattakia

Lattakia

15 pages

EasyQL

EasyQL

14 pages

Photogram

Photogram

163 pages

Espresso

Espresso

27 pages

EMPATH

EMPATH

14 pages

La Mesa

La Mesa

9 pages

JTemplate

JTemplate

238 pages

MATVEC

MATVEC

4 pages

TONEDEF

TONEDEF

14 pages

SASSi

SASSi

16 pages

JTemplate

JTemplate

39 pages

BATS

BATS

10 pages

Synapse

Synapse

11 pages

c.def

c.def

116 pages

TweaXML

TweaXML

108 pages

Load more
Download NumLang
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view NumLang and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view NumLang 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?