Upload
alvin-porter
View
218
Download
0
Tags:
Embed Size (px)
Citation preview
TEAMHaritha Rani Jadcherla
Vikram Sriram
Saloti Annapurna
Venkat Narasimha
MENTORS
Dr. Yue Kwon
Mr. Ravi Ganta
AGENDAIntroduction
BackgroundRequirement
AbstractLanguage specificationTool used (ANTLR)
Demo Future workReferences
RequirementsUser friendlyAccuracy
Software RequirementsTool
– Antlr
Microsoft Visual StudiosOperating system
– Windows XP or any later version
AbstractProblem
Difficulty in performing operations on arrays of data manually
Matrices have Tags
SolutionDesigning an interpreter that works on the user friendly
Domain Specific language generatedDeveloping a run time environment for the physicians to
perform operationsApproach
language specificationUn ambiguous grammarGenerating Lexer and Parser using an automated tool
(ANTLR)Developing a Run Time environment
Abstract
EvaluationUser friendly to perform various mathematical
operations on double dataAccuracyTime
Language Specification• Only 4 Matrices.• Up to 7 tags• Types in MedCheck• Operations on matrices
Arithmetic Operations Relational Operations Logical Operations
Types in MedCheckThere are basically two kinds of type:
Scalar Types: Integer, Double, Boolean, String
Vector Types: List and Matrix
Different ways to access matrix valuesMatrix Name [r,c];Example: M1[2,4];Matrix Name[{r1,r2},{c1,c2,c3}];Example: M1[{1,3},{2,4,6}];Matrix Name[{rn..rm},{cx..cy}];Example: M1[{1..3},{2..5}]Matrix Name[*,*];Example: M1[*,*];
Operations: ArithmeticAddition and subtractionMultiplicationDivisionAddition and subtraction with a scalarMultiplication and division by scalar
Operations: Relational And LogicalNo relational operations on matrices but on
elements of matricesNo Logical operations on matrices but on
elements of matrices
Language SpecificationTypes of expressions
Arithmetic ExpressionsRelational ExpressionsLogical Expressions
Arithmetic ExpressionsAddition and SubtractionMultiplicationDivisionAddition and Subtraction with a scalarMultiplication and Division by Scalar
Relational and Logical ExpressionsNo relational operations on matrices but on
elements of matricesNo Logical operations on matrices but on
elements of matrices
Different Ways to Access Matrix valuesMatrix Name [r,c]; Matrix Name[{r1,r2,r3},{c1,c2,c3}];Matrix Name[{rn..rm},{cx..cy}]; where
rn..rm=cx..cyMatrix Name[*,*];Matrix Name[*,c];Matrix Name[r,*];
FunctionsTypes of Arguments:Scalar values i.e., double.Array where the first element represents row
index and the second element represents column index.
Array where the first element is represented by * meaning it takes all the values in that row, and the corresponding element represents column index and vice versa.
By accessing the tag value available from the cell location.
FunctionsVarious functions used are:
Average, Minimum, Maximum, Sin, Cos, Tan, Median, Standard Deviation, %CV, Sort, Log10, Exp, X^y(a,b)
Note: Sort, Log10, Exp, X^y(a,b), Sin, Cos and Tan functions does not accept set type of data in arguments.
TagsThree properties of Tag:
Tag NameTag ValueTag Content
Tag Name: Represents the name of the tag by means of which we can access a tag.
Tag Value: Represents the Value of the tag which the particular tag holds.
Tag content describes the content in the tag.
Tags (Contd…)Tag Creation:The command that is used for creating new tag at
user- prompt is as follows: M1.ATTRIBUTE+=ID;
Assigning the tag value:Tag value can be assigned directly at user-prompt as
following: M1.Tagname= value;
Deleting a tag:The command that is used for deleting tags is as
follows: M1.ATTRIBUTE-=ID;
ConclusionDesign an interpreterAppropriate error reportingException handlingThe language is user friendlyHelp commands
Referenceshttp://www.antlr.org/wiki/pages/
viewpage.action?pageId=557075http://www.antlr.org/wiki/display/ANTLR3/
Antlr+3+CSharp+Target#Antlr3CSharpTarget-GettingStarted
http://www.antlr.org/wiki/display/ANTLR3/Five+minute+introduction+to+ANTLR+3
http://www.antlr.org