25
QGen FHARM Team: Flavio Palandri Antonelli –Project Manager Hyunmin Lee – System Tester Aarthi Venkataramanan – System Architect Rupal Shah – System Integrator Mohip Joarder – Language Guru COMS W4115 Programming Languages and Translators Prof. Alfred V. Aho

Q Gen

  • Upload
    edita

  • View
    48

  • Download
    0

Embed Size (px)

DESCRIPTION

Q Gen. FHARM Team: F lavio Palandri Antonelli –Project Manager H yunmin Lee – System Tester A arthi Venkataramanan – System Architect R upal Shah – System Integrator M ohip Joarder – Language Guru COMS W4115 Programming Languages and Translators Prof. Alfred V. Aho. Outline. - PowerPoint PPT Presentation

Citation preview

Page 1: Q Gen

QGenFHARM Team:

Flavio Palandri Antonelli –Project ManagerHyunmin Lee – System TesterAarthi Venkataramanan – System ArchitectRupal Shah – System IntegratorMohip Joarder – Language Guru

COMS W4115 Programming Languages and TranslatorsProf. Alfred V. Aho

Page 2: Q Gen

Outline

▸ Introduction & Motivations▸ Language Basics▸ Language Design & Architecture▸ Demo▸ Language Implementation & Testing▸ Conclusions

Page 3: Q Gen

What is QGen?

• QGen, is a programming language to develop computer-based test applications.

+ = QGen

Page 4: Q Gen

With QGen you can..

• Generate computer based tests and surveys• Define different types of questions and

organize them into logically meaningful sections

• Make your tests adapt to the ability of the user

• Provide immediate results/feedback

Page 5: Q Gen

Use QGen for.. Customer Insights• Employee Feedback Research Education and Training Just For Fun !

Page 6: Q Gen

Why QGen?

• Eases the process of creating and evaluating quizzes and surveys

• Yet provides ample flexibility to allow for customization and dynamic behavior.

• The output is a portable java application

Page 7: Q Gen

Outline

▸ Introduction & Motivations▸ Language Basics▸ Language Design & Architecture▸ Demo▸ Language Implementation & Testing▸ Conclusions

Page 8: Q Gen

Overall Structure of a QGen Program

ProPro

ProgramSection 1

Question 1

Question n

Section SQuestion 1

Question m

. .

. .

Main• Display questions• Organize sections• Evaluate results

. .

Page 9: Q Gen

Sample Programsection HelloWorldSection{

question q1{

type: multipleChoice;text: "What's the most simplest program usually adopted 2 show a language example?";image: "images/hw.jpg";answer: "Hello World";choices: ("Hello World", "Hello Moon", "Hi World", "Goodbye World");score: 5;

}q1;

}

main{

showInstruction("Simple test", "Select the correct choice in the next question.");showSection(HelloWorldSection);showResult();

}

Section

Question

Sectionsorganization

Page 10: Q Gen

Sample Program Output 1

showInstruction("Simple test", "Select the correct choice in the next question.");

Page 11: Q Gen

Sample Program Output 2showSection(HelloWorldSection);

Page 12: Q Gen

Sample Program Output 3showResult();

Page 13: Q Gen

Syntactic Constructs• Looping structures

– For– While

• Conditional structures– if/else

• Built in functions– showInstruction(String title, String description)– showResult()– getSectionScore(Section s) – getQuestionScore(Section s, Question q) – getAnswer(Section s, Question q) – addToList(List l, String s)

Page 14: Q Gen

Outline

▸ Introduction & Motivations▸ Language Basics▸ Language Design & Architecture▸ Demo▸ Language Implementation & Testing▸ Conclusions

Page 15: Q Gen

Abstract Model of a Test

TESTTESTSECTIONSECTIONcontains

QUESTIONSECTION

QUESTIONSECTION

Is-a

RESULTSECTIONRESULT

SECTIONINSTRUCTION

SECTIONINSTRUCTION

SECTION

Is-aIs-a

QUESTIONQUESTION

contains

RESULTSRESULTS

shows

INSTRUCTIONINSTRUCTION

shows

for of

followed by

Page 16: Q Gen

Lexer & Parser

Lexer & Parser

Syntax Tree TreeWalkerTreeWalker

ANTLRANTLR

grammar.g walker.g

Target Java

Program

Interactive GUITest

Application

Front End Back End

Java Compiler

Java Compiler

GUIManager

GUIManager QuestionQuestion

SectionSection

QGen Source

Program

RunnableJava

ProgramJVMJVM

Architecture

Page 17: Q Gen

Outline

▸ Introduction & Motivations▸ Language Basics▸ Language Design & Architecture▸ Demo▸ Language Implementation & Testing▸ Conclusions

Page 18: Q Gen

Demo Source Codesection firstSection{

question q1{

type: yesNo;

text: "Is the grammar S -> Sa | b left recursive?";

answer: "Yes";

score: 5;

}

question q2

{

type: fillBlank;

text: "___ binding binds the data at run time";

answer: "Dynamic";

score: 5;

}

q1;q2;

}

 section easySection

{

question q3

{

type: freeText;

text: "What is the input language of Assembler?";

answer: "Assembly language";

score: 3;

}

q3;

}

Easy Section

First Section

Page 19: Q Gen

section hardSection{ question q4 { type: multipleChoice; text: "Which is the best parser among the given choices?";

answer: "Canonical-LR"; choices: ("Canonical-LR", "Simple LR", "LALR", "LL(1)"); score: 10; } list l; for (i = 0 to 10){ addToList(l,i); }  question q5 { type: multipleChoice; text: "How many no. of min. states will be generated after converting the following NFA to DFA?"; image: "NFA.jpg";

answer: "4"; choices: l; score: 10; } q4; q5;}

main{showInstruction("Computer Adaptive PLT Test", "Depending on your answers different questions will be shown in the next section");

showSection(firstSection); if (getSectionScore(firstSection) > 5) {

showSection(hardSection);}else{

showSection(easySection);}showResult();

}

Hard Section

Main function

Page 20: Q Gen

Demonstration

• Now: Pop PLT quiz!

Page 21: Q Gen

Outline

▸ Introduction & Motivations▸ Language Basics▸ Language Design & Architecture▸ Demo▸ Language Implementation & Testing▸ Conclusions

Page 22: Q Gen

Development Environment

Tools & Software Purpose

ANTLR Takes grammar + tokens as input and produces Lexer + Parser + Walker

Eclipse IDE + ANTLR plugin IDE + ANTLR plugin for grammar debugging

Google code + Subversion Version control

Java + Swing Back-end & Display

Page 23: Q Gen

Test plan

Phase To do

Front-end Unit Test - Test every grammar production

Back-end Unit Test - Test with hand-made target programs

Integration Test - Verify equivalence between treewalker output and hand-made target programs

System Test - Test the entire QGen compiler

Page 24: Q Gen

Front-end Test with ANTLR Plugin

Page 25: Q Gen

Conclusions

• Lessons learned– Meet regularly– Keep it simple (Life is hard enough!)– User friendly languages are hard to implement and test‐– Decouple front-end and back-end development– …

• Future Work & Improvements- Import questions from a file & store results to a DB- Enforce time-limits- Statistical results