DOC PREVIEW
Columbia COMS W4115 - SLAW script

This preview shows page 1 out of 4 pages.

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

Unformatted text preview:

Columbia UniversityProgramming Languages and TranslatorsSpring 2007Professor EdwardsSemester Project ProposalSteve HendersonLevi ListerAbe SkolnikWei TengSLAWscript Language Proposal Page 2 of 4Executive SummaryTwo modes:• Text: simplified Python.• GUI: HyperCard for the Java age.IntroductionThe name of our language is “SLAWscript” (Steve, Levi, Abe, and Wei’s scripting language).SLAWscript is a general-purpose (yet simple) scripting language, designed to enable the easyproduction of either text (i.e. command-line environment) applications or GUI applications thatare made of dialog boxes, optionally with custom graphics. Amongst other possible uses,it will allow for quickly programming and deploying interactive training, tutorial,and survey applications.SLAWscript is modeled on Python, but on a smaller scale. SLAWscript has no arrays, cla sses,or objects. At this time, only the three standard UNIX-like channels (stderr, stdin, and stdout)are accessible; that is to say, files cannot be opened and used. Also, SLAWscript is not strictabout the use of leading spacing.Fundamental NeedThe Java Swing Application Programming Interface (“API”) provides a rich set of GraphicalUser I nterface (“GUI”) widgets that can create useful and intuitive GUI interfaces. Because suchinterfaces are based on Java, they are highly portable and deployable and thus are desirable formixed-OS, mixed-CPU-architecture communities. However, Swing requires considerable Javaknowledge and experience to create a functional GUI application. This can prevent anon-Swing-savvy researcher, engineer, or other programmer from experiencing the benefits ofSwing. For example, a seventh-grade music teacher may want to quickly design a G UI-basedtutorial for reviewing musical notation. He or she envisions a series of windows where thestudent reviews and demonstrates knowledge of musical notation. However, although t heteacher is highly familiar with the content of the tutorial, he or she has no idea how to implementit. He or she doesn’t have the time to learn Swing (or another language’s GUI library),and needs a custom solution with per-student question generation and answer processing thatcannot be performed (or cannot be easily performed) with common presentation tools such asMicrosoft PowerPoint.We are developing SLAWscript to address this need. SLAWscript allows a designer to use asimple scripting language to develop a program that may use a series of customizable dialogboxes that interact with an end-user. SLAWscript allows a programmer to focus primarily onthe content of the application and to use SLAWscript’s program control logic to specify howthe application should behave based on user input. The more complicated aspects of Swingapplications (component layout, event handling, etc.) are handled by theSLAWscript implementation.SLAWscript Language Proposal Page 3 of 4Key Features• ConventionalSLAWscript attempts t o use conventional notation where possible, as limited by theexpressive abilities of ASCII. For example, the bar symbol (’|’) is used to both begin and endan operator w hich returns either the absolute value (for numeric operands) or the stringlength (for string operands).• DynamicIn SLAWscript, variables don’t need to be declared, and they are allowed to contain differentdata types at different points in time.• FlexibleIn SLAWscript, the addition operator can take either a number or string as either of itsparameters, and intelligently decides whether to perform arithmetic addition or stringconcatenation. The multiplication operator is similarly flexible, and intelligently decideswhether to perform arithmetic multiplication or string multiplication (i.e. multiplying 3 by“Hi” pr oduces “HiHiHi”). In general, wherever a number is required, a variable containinga string containing an appropriate number may be used instead. (The primary exception:“assert” statements.) This allows for easier use of user-entered numbers in SLAWscriptprograms. For example, if the user entered “3” in response to a prompt, and that string isstored in a variable called “input”, then the expression (10–input) yields the number seven.• InterpretedOur implementation of SLAWscript is an interpreter, which facilitates r apid development.• IntuitiveSLAWscript is designed to use the English language as a basis whenever it i s helpful to doso; for example, to copy the data from a variable named ‘a’ to a variable named ‘b’,simply use the command: “copy a to b”.• Portable and architecture-ne utralOur implementation of SLAWscript is based on Java, which gets us “for free” the advantagesthat it should be able to run correctly on many different operating systems and CPU types.• Reduced ambiguityIn SLAWscript, the equals sign means only one thing: test for equality. Copyi ng dataunchanged from one variable to another can be done with the “copy” verb,and general-purpose assignment can be accomplished with the “set” verb.SLAWscript Language Proposal Page 4 of 4Representative programOne representative program is an exam preparation assistant for a course in the humanities,such as a history course. Many of these tests require memorization of large amounts ofinformation. SLAWscript can easily be used to create a pr ogram to act as an interactive pr acticeexam. This practice exam would involve a series of text prompts or dialog boxes that displaypractice questi ons, prompting for student input after each question. SLAWscript’s control logicallows the test designer to then branch and evolve the exam based on the student’s input.For example, if the student answers incorrectly, hints can be presented to aid in memorization.Or, if the student is mastering the questions corresponding to a certain level of difficulty,the test can provide more difficult questions, thus adapting to the individual student.A study guide for a typical Art Humanities course is already in the early-prototype stage.The plan for this program is for it to act as a set of interactive flash cards by (for eachavailable picture) displ aying a picture of a painting and presenting appropriatemultiple-choice questions, and then responding appropriately depending onwhether the us er answers correctly or incorrectly.Examples of Syntaxset a to 9 # this is how we “load” a literal valueset a to a+1 # this is how we increment a variablecopy a to b # this is how we copy from one variable to anotherput b


View Full Document

Columbia COMS W4115 - SLAW script

Documents in this Course
YOLT

YOLT

13 pages

Lattakia

Lattakia

15 pages

EasyQL

EasyQL

14 pages

Photogram

Photogram

163 pages

Espresso

Espresso

27 pages

NumLang

NumLang

6 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 SLAW script
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 SLAW script 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 SLAW script 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?