150 likes | 176 Views
Polynomial Manipulation Language. COMS4115 PLT Project Presentation December 9, 2003. Team Members: Melinda Agyekum, Shezan Baig, Hari Kurup, Subadhra Sridharan. Presentation Overview. Introduction Background The PML Language Language Features Functions & Capabilities Architecture
E N D
Polynomial Manipulation Language COMS4115 PLT Project Presentation December 9, 2003 Team Members: Melinda Agyekum, Shezan Baig, Hari Kurup, Subadhra Sridharan
Presentation Overview • Introduction • Background • The PML Language • Language Features • Functions & Capabilities • Architecture • Design • Testing • Conclusion • Future Work • Team Experience • Questions & Answers
Background on Polynomials • What is A Polynomial? • Mathematical expression written as the sum of products of numbers and variables • Practical Applications • Missile trajectory • Effectiveness of a Drug • Weather Forecasting
Introduction to PML • What is PML? • Symbolic Polynomial Manipulation Language • Benefits of PML? • Provides Flexible Manipulation of Polynomials • Algorithmic Customization • Applicable in a Variety of Fields
Introduction to PML • Parts of a Polynomial • Coefficient Int or Float • Ex. 4, 4.3, -100, 14.23, -24.5 • Variable Character ( Single or Multiple ) • Upper Case Representation • Ex. X, XY, RST, V • Degree Variable Raised to a Power • Ex. X^2, T^4Y^3
Introduction to PML • Term Any Combination of • Coefficient , Variable, Degree • Ex. 3X, 4^3Y, XY, 3, -4X^3 • Polynomial Sum of Terms • Ex. 3X+ Y, 5Y^3-4Z, 3Z, -4X^3
PML Data Types • Int, Float, Char, Term, Poly • TemrArray • An array which contains the terms of a polynomial • CharArray • Stores all variables of a multivariate polynomial • Identifiers • All variable represented in lower case
Language Features • Arrays • termarray and chararray • Grows and shrinks dynamically. • No 'new' or 'malloc' required. • length() --> returns array length • Loops & Breaks: • 'while' and 'do-while' loops are supported • Body must be enclosed within a begin-end block • 'break' statement to jump out of a loop.
Language Features • Functions • Begins with the keyword 'func' • func <return type> foo ( poly p ) • Body enclosed within 'begin – end ' block. • Can be overloaded • No prototyping required • A 'main' function is necessary • In-built Functions • Ex. degree(), coeff(), polyterm()
Language Features • Modularity • Program can consist of multiple files • One file must contain 'main()' • Re-usability • Scope • Global • Local • External Scope
PMLRuntimeEnvironment PMLCompilationUnit PMLFunction PMLVariable PMLStatement PMLExpression PMLMath Architecture Source Code Lexer (PML.g) Parser (PML.g) Walker (PMLWalker.g) Executer (Java Classes) - prints output
Testing • Unit Testing • Test for parser, walker, backend classes • Integrated Testing • Test complete flow once integrated • Regression Testing • Make sure new features don't introduce bugs
Conclusion • Future Work • Implementing • Logarithms, Trigonometric Functions, Polynomial Division with Symbolic Math • Team Experience • Effective Communication • Set Early Deadlines and Incremental Goals • Parallel Work and Division of Labor • CVS Repository
Thanks for Your Attention! Any Questions?