SIMPLEXSyntax for International Monetary, Property and Liquidity ExchangeSteven ChenGilbert HomKelvin JiangEric Zhang{stc2104, gch2102, kxj1, ehz2101}@columbia.eduIs SIMPLEX really that SIMPLE?• Syntax for International Monetary, Property, and Liquidity Exchange• Lightweight non-object oriented C like language• Superior “Dynamic Data Casting”• Superior data type output representation• Similar syntax to that of C, C++, and JavaIs SIMPLEX for me?• SIMPLEX was created for the financial audience• Provides data types that revolve around financial applications• Allows focus on analysis rather than the minute details that languages like C++ and Java need• Allows handling of mathematical equations with many data type• Simple and quickData Types• Five main Data Types / Two types of Constants– Number: [number constant] 64bit floating point numbers– Currencies: [number constant] USD, YEN, EUR, CAD, GBP, AUD, CHF, CNY, MXN, SOS– Date: [number constant] Three data types:year, month, day– Rate: [number constant] Representation for percentages– String: [string constant] Data type that allows storage of arbitrary sequences of characters• Type Casting• (type) expression• All number constant Data Type expressions are handled by SIMPLEX and will not return any exceptionsStatements• To keep programming familiar with today’s popular program languages, SIMPLEX follows similar statement syntax to that of C, C++, and java• Assignment Statements• Jump Statements• Procedure Call Statements• Return Statements• Conditional Statements• Iterative Statements• Output Statements• Input StatementProcedures / Scoping• SIMPLEX allows creation of user defined procedurestype-specifier procedure-identifier (identifier-list) { statement-list}• Static Scoping• Applicative Order Evaluation• RecursionSIMPLEX Special Features• User Defined Function and casting of currenciesUSD calculateYearlyRent(USD a, EUR b, CAD c, YEN d){USD yearly;yearly = ( (USD)a + (USD)b + (USD)c + (USD)d );return yearly;}• Preformatted Currency Outputsrent_2008 = 3496340.6446234623462346;print ("Total 2008 Rent: " + rent_2008);Output: Total 2007 Rent: $3496340.64• Built-in Input Function– Takes user input from the command lineprint("Enter Total Mortgage amount: ");input(totalMortgage);SIMPLEX Special Features (continued)• Intuitive mathematical operators – Percent Sign (automatically divides by 100)rate a; a = 5%; // stored as 0.05– Exponential Powersnumber a;a = 3 ^ 3; // a stores 27Top Level DesignClass HierarchyClass HierarchyClass HierarchySample Intermediate Representationvoid main() {USD x;x = x + 1;print(x);}Compiling and Testing• Console– Customized interface to compile and run SIMPLEX programs– Does so through a series of shell commands• Regression Test Suite– Suite built on top of the console– Test cases isolate specific features• Test suite includes: declaration, for, arithmetic, if, dangling else, user-defined functions– Test Suite run constantly after updates to compiler• Test Applications– Larger scale applications integrating several features of the language at the same timeIssues We Faced and Lessons Learned• Dynamic group with different personalities and specialties• KISS – Keep it Simple Stupid• Strong foundation and working platform• Thorough and complete testing• Planning– Solid foundations based on solid ideas– Allow for adaptability and changes– Revisions Revisions Revisions!SIMPLEXSyntax for International Monetary, Property and Liquidity ExchangeSteven ChenGilbert HomKelvin JiangEric Zhang{stc2104, gch2102, kxj1,
View Full Document