Information

Deadline Geen deadline
Submission limit No limitation

Sign in

A Small Quiz about Program Query Languages


Question 1: PQL Purpose

What is the primary purpose of any Program Query Language (PQL)? (Multiple answers possible.)

Question 2: PQL Kind

Which kind of program query language will we use in this experiment?

Question 3: Declarative Language

Define briefly, in your own words, what it means for a computer language to be declarative.

Question 4: Declarative PQL

Which of the following program query languages or tools allow you to write queries in a declarative way? (Multiple answers possible.)

Question 5: Static vs. Dynamic PQL

Explain in your own words the difference between a static program query language and a dynamic program query language.

Question 6: Database Representation

Which program query language is an SQL-like language that reasons over a program representation stored as tables in a database? (Multiple answers possible.)

Question 7: RegEx Example

Which line would the following regex match?

'\".*\"\s*\+str\(\w+\)'

(Multiple answers possible.)

Question 8: AST Traversal

When using Python's AST module to visit the nodes in a program AST, how does the 'NodeVisitor' class handle traversal of the AST?

Question 9: Visitor Design Pattern

Briefly explain, in your own words, what the Visitor design pattern is and how it works.

Question 10: Pyttern Example

What would the pattern def ?(?*): match in Pyttern?