15
Design practical Compiler Construction S C I E N C E P A S S I O N T E C H N O L O G Y u www.tugraz.at Univ.-Prof. Dr. Franz Wotawa, DI Roxane Koitz Martin Zimmermann, Christopher Liebmann, Stephan Frühwirt Institute for Software Technology TestE CC-Testing Environment

TestE Test ing Environment · • TestE will execute your code on SVN • you will get feedback on a website • you will receive further information on the newsgroup Public test

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: TestE Test ing Environment · • TestE will execute your code on SVN • you will get feedback on a website • you will receive further information on the newsgroup Public test

Design practical Compiler Construction

S C I E N C E ■ P A S S I O N ■ T E C H N O L O G Y

u www.tugraz.at

Univ.-Prof. Dr. Franz Wotawa, DI Roxane Koitz Martin Zimmermann, Christopher Liebmann, Stephan Frühwirt

Institute for Software Technology

TestE CC-Testing Environment

Page 2: TestE Test ing Environment · • TestE will execute your code on SVN • you will get feedback on a website • you will receive further information on the newsgroup Public test

Design practical Compiler Construction

2

• Automated testing

• give you feedback • public test cases

• grading • private test cases

Why a testsystem?

Page 3: TestE Test ing Environment · • TestE will execute your code on SVN • you will get feedback on a website • you will receive further information on the newsgroup Public test

Design practical Compiler Construction

3

• very basic test cases

• demonstrate which input should lead to which output

• feedback if we can compile your code

• you will get public test cases for all three tasks

• TestE will execute your code on SVN

• you will get feedback on a website

• you will receive further information on the newsgroup

Public test cases

Page 4: TestE Test ing Environment · • TestE will execute your code on SVN • you will get feedback on a website • you will receive further information on the newsgroup Public test

Design practical Compiler Construction

4

• special offer from us

• TestE will be maintained

• we reserve the right to stop the system at any time

• TestE will likely be executed 4 times a day

• server problems may occur at any time • start early • write your own TCs

• passing all public TCs != passing private TCs

Public test cases

Page 5: TestE Test ing Environment · • TestE will execute your code on SVN • you will get feedback on a website • you will receive further information on the newsgroup Public test

Design practical Compiler Construction

5

• different categories • test different aspects of your code • separately test each aspect

• after each deadline you will get information about your performance

Private test cases

Page 6: TestE Test ing Environment · • TestE will execute your code on SVN • you will get feedback on a website • you will receive further information on the newsgroup Public test

Design practical Compiler Construction

6

• timeout after 2 seconds

• remove blank new lines

• remove spaces

• after that sort of 1:1 diff

TestE in general

Page 7: TestE Test ing Environment · • TestE will execute your code on SVN • you will get feedback on a website • you will receive further information on the newsgroup Public test

Design practical Compiler Construction

7

• Task 1: add some grammar rules

• ordering of rules can cause different message-types

• ANTLR generates error messages according to grammar definition

• wrong ordering may lead to problems in task 2 and 3

Task 1

Page 8: TestE Test ing Environment · • TestE will execute your code on SVN • you will get feedback on a website • you will receive further information on the newsgroup Public test

Design practical Compiler Construction

8

• 1:1 diff

• if no difference • PASS

• else • FAIL

Task 1 - lexer

Number of lexical errors: 0

Number of lexical errors: 1 #1: line 6:3 token recognition error at: '$'

Page 9: TestE Test ing Environment · • TestE will execute your code on SVN • you will get feedback on a website • you will receive further information on the newsgroup Public test

Design practical Compiler Construction

9

Task 1 - parser

Number of lexical errors: 0

Number of syntax errors: 0

Number of lexical errors: 0

Number of syntax errors: 1 #1: line 5:9 missing ID at ';'

PASSPASS

Number of lexical errors: 0

Number of syntax errors: 0

Number of lexical errors: 0

Number of syntax errors: 1 #1: line 5:9 missing ID at ';'

reference reference

actual output actual output

Page 10: TestE Test ing Environment · • TestE will execute your code on SVN • you will get feedback on a website • you will receive further information on the newsgroup Public test

Design practical Compiler Construction

10

Task 1 - parser

Number of lexical errors: 0

Number of syntax errors: 0

Number of lexical errors: 0

Number of syntax errors: 1 #1: line 5:9 missing ID at ';'

FAIL FAIL

Number of lexical errors: 1

Number of syntax errors: 0

Number of lexical errors: 0

Number of syntax errors: 1

reference reference

actual output actual output

Page 11: TestE Test ing Environment · • TestE will execute your code on SVN • you will get feedback on a website • you will receive further information on the newsgroup Public test

Design practical Compiler Construction

11

Task 1 - parser

Number of lexical errors: 0

Number of syntax errors: 0

FAIL

Number of lexical errors: 0

Number of syntactical errors: 0

reference

actual output

Page 12: TestE Test ing Environment · • TestE will execute your code on SVN • you will get feedback on a website • you will receive further information on the newsgroup Public test

Design practical Compiler Construction

12

Task 1 - parser

Number of lexical errors: 0

Number of syntax errors: 1 #1: line 5:9 missing ID at ';'

Number of lexical errors: 0

Number of syntax errors: 1 #1: line 5:9 mismatched input 'i' expecting ‚)'

INCONCLUSIVE

reference

actual output

Page 13: TestE Test ing Environment · • TestE will execute your code on SVN • you will get feedback on a website • you will receive further information on the newsgroup Public test

Design practical Compiler Construction

13

• not counted as FAIL = you will receive points

• possibly not entirely correct

• may cause problems in further tasks

• feedback: how many TCs inconclusive

hint: fix this!

Task 1 - inconclusive principle

Page 14: TestE Test ing Environment · • TestE will execute your code on SVN • you will get feedback on a website • you will receive further information on the newsgroup Public test

Design practical Compiler Construction

Important for all tasks

14

• NO additional output! • use the debug flag

• write as many test cases as possible! • for finding wrong behavior • for finding bugs

• think of different scenarios and combinations of datatypes, operators etc.

Page 15: TestE Test ing Environment · • TestE will execute your code on SVN • you will get feedback on a website • you will receive further information on the newsgroup Public test

Design practical Compiler Construction

15

Questions?