Project Presentation December 19, 2016sedwards/classes/2016/4115... · Drug Effectiveness ... Array...
Transcript of Project Presentation December 19, 2016sedwards/classes/2016/4115... · Drug Effectiveness ... Array...
![Page 1: Project Presentation December 19, 2016sedwards/classes/2016/4115... · Drug Effectiveness ... Array list for int, float and bool, e.g. int [2]a = [1, 2]](https://reader036.fdocuments.net/reader036/viewer/2022071101/5fd9fe761203ab7e2a6c5509/html5/thumbnails/1.jpg)
Project Presentation
December 19, 2016
![Page 2: Project Presentation December 19, 2016sedwards/classes/2016/4115... · Drug Effectiveness ... Array list for int, float and bool, e.g. int [2]a = [1, 2]](https://reader036.fdocuments.net/reader036/viewer/2022071101/5fd9fe761203ab7e2a6c5509/html5/thumbnails/2.jpg)
Jin Zhou jz2792
Pu Ke pk2532
Yanglu Piao yp2419
Jianpu Ma jm4437
![Page 3: Project Presentation December 19, 2016sedwards/classes/2016/4115... · Drug Effectiveness ... Array list for int, float and bool, e.g. int [2]a = [1, 2]](https://reader036.fdocuments.net/reader036/viewer/2022071101/5fd9fe761203ab7e2a6c5509/html5/thumbnails/3.jpg)
Introduction
Language Features
Architecture
Conclusion
![Page 4: Project Presentation December 19, 2016sedwards/classes/2016/4115... · Drug Effectiveness ... Array list for int, float and bool, e.g. int [2]a = [1, 2]](https://reader036.fdocuments.net/reader036/viewer/2022071101/5fd9fe761203ab7e2a6c5509/html5/thumbnails/4.jpg)
What is A Polynomial?
Mathematical expression written as the sum of products of numbers and variables
Practical Applications
Model the projection of jet rockets
Market pattern forecasting
Drug Effectiveness
Physical equation
…
![Page 5: Project Presentation December 19, 2016sedwards/classes/2016/4115... · Drug Effectiveness ... Array list for int, float and bool, e.g. int [2]a = [1, 2]](https://reader036.fdocuments.net/reader036/viewer/2022071101/5fd9fe761203ab7e2a6c5509/html5/thumbnails/5.jpg)
What is PolyGo?
A Symbolic Polynomial Manipulation Language
Why is PolyGo?
Flexible Manipulation of Polynomials
Algorithmic Customization
Light-weighted and easy applicable
![Page 6: Project Presentation December 19, 2016sedwards/classes/2016/4115... · Drug Effectiveness ... Array list for int, float and bool, e.g. int [2]a = [1, 2]](https://reader036.fdocuments.net/reader036/viewer/2022071101/5fd9fe761203ab7e2a6c5509/html5/thumbnails/6.jpg)
Ability to solve polynomial problems Arithmetic operation
Evaluate, Find root…
Supports for complex number Modulo, conjugation, and equation solving.
Loops & Breaks: ‘for' and 'while' loops supported
Body enclosed within a block
Break for jump out of the loop
![Page 7: Project Presentation December 19, 2016sedwards/classes/2016/4115... · Drug Effectiveness ... Array list for int, float and bool, e.g. int [2]a = [1, 2]](https://reader036.fdocuments.net/reader036/viewer/2022071101/5fd9fe761203ab7e2a6c5509/html5/thumbnails/7.jpg)
Coefficient Float
Exponent Indices
Polynomial List of float number
Therefore, for single variable poly type
record the length and the coefficient comes the solution.
poly[2] p = {2.0,1.0,3.0}= 2 + 𝑥 + 3𝑥2
![Page 8: Project Presentation December 19, 2016sedwards/classes/2016/4115... · Drug Effectiveness ... Array list for int, float and bool, e.g. int [2]a = [1, 2]](https://reader036.fdocuments.net/reader036/viewer/2022071101/5fd9fe761203ab7e2a6c5509/html5/thumbnails/8.jpg)
Int, Float, String, Bool, Complex
Basic data types, complex stores as <1, 2.3>
Intarr, Floatarr, Boolarr
Array list for int, float and bool,
e.g. int [2]a = [1, 2]
Poly
Store polynomial coefficient,
poly [2]a = {3.0, 2.0, 5.0} as 3.0+ 2.0X +5.0X2
![Page 9: Project Presentation December 19, 2016sedwards/classes/2016/4115... · Drug Effectiveness ... Array list for int, float and bool, e.g. int [2]a = [1, 2]](https://reader036.fdocuments.net/reader036/viewer/2022071101/5fd9fe761203ab7e2a6c5509/html5/thumbnails/9.jpg)
Declaration:All local variables must be declared prior
to any statements
Variables can be initialized when it is declared. E.g. int a = 1;
Strict type system:No automatic type conversion
![Page 10: Project Presentation December 19, 2016sedwards/classes/2016/4115... · Drug Effectiveness ... Array list for int, float and bool, e.g. int [2]a = [1, 2]](https://reader036.fdocuments.net/reader036/viewer/2022071101/5fd9fe761203ab7e2a6c5509/html5/thumbnails/10.jpg)
Functions <return type> fname (formals)
{locals; statement lists}
Mathematical Driven
Static scoping, Variable redefinable
Built-in functions such as:
print, print_n, order
![Page 11: Project Presentation December 19, 2016sedwards/classes/2016/4115... · Drug Effectiveness ... Array list for int, float and bool, e.g. int [2]a = [1, 2]](https://reader036.fdocuments.net/reader036/viewer/2022071101/5fd9fe761203ab7e2a6c5509/html5/thumbnails/11.jpg)
Function declarations
Global, formal and local declarations
Variable initialization
Type of operands
Predicate of for and while loop
Function calls
Return and break statement
![Page 12: Project Presentation December 19, 2016sedwards/classes/2016/4115... · Drug Effectiveness ... Array list for int, float and bool, e.g. int [2]a = [1, 2]](https://reader036.fdocuments.net/reader036/viewer/2022071101/5fd9fe761203ab7e2a6c5509/html5/thumbnails/12.jpg)
Unit Testing Test for parser, AST and semantic checker
Integrated Testing Test complete flow once integrated
Regression Testing Make sure new features don't introduce bugs
![Page 13: Project Presentation December 19, 2016sedwards/classes/2016/4115... · Drug Effectiveness ... Array list for int, float and bool, e.g. int [2]a = [1, 2]](https://reader036.fdocuments.net/reader036/viewer/2022071101/5fd9fe761203ab7e2a6c5509/html5/thumbnails/13.jpg)
Source Code
Scanner
Parser
AST
Semantic Checker Code generation
IR
LLVM
Execute
Output
Tokens
AST
Machine code
![Page 14: Project Presentation December 19, 2016sedwards/classes/2016/4115... · Drug Effectiveness ... Array list for int, float and bool, e.g. int [2]a = [1, 2]](https://reader036.fdocuments.net/reader036/viewer/2022071101/5fd9fe761203ab7e2a6c5509/html5/thumbnails/14.jpg)
![Page 15: Project Presentation December 19, 2016sedwards/classes/2016/4115... · Drug Effectiveness ... Array list for int, float and bool, e.g. int [2]a = [1, 2]](https://reader036.fdocuments.net/reader036/viewer/2022071101/5fd9fe761203ab7e2a6c5509/html5/thumbnails/15.jpg)
What is the maximum volume of air inhaled into the lung?
Derivation
Zero point
Evaluate
The volume of air flowing into the
lungs during a breath can be
represented by the polynomial
function
V(t) = -0.041t3 + 0.181t2 + 0.202t,
where V is the volume in liters and
t is the time in seconds.
t=3.43
V(t)=1.17
![Page 16: Project Presentation December 19, 2016sedwards/classes/2016/4115... · Drug Effectiveness ... Array list for int, float and bool, e.g. int [2]a = [1, 2]](https://reader036.fdocuments.net/reader036/viewer/2022071101/5fd9fe761203ab7e2a6c5509/html5/thumbnails/16.jpg)
Velocity(t)
Distance(t)
Accelerated speed(t)
![Page 17: Project Presentation December 19, 2016sedwards/classes/2016/4115... · Drug Effectiveness ... Array list for int, float and bool, e.g. int [2]a = [1, 2]](https://reader036.fdocuments.net/reader036/viewer/2022071101/5fd9fe761203ab7e2a6c5509/html5/thumbnails/17.jpg)