Giter Club home page Giter Club logo

ql's Introduction

QL: DSL for Questionnaires

This project is the result of a lab assignment for the Software Construction course at the UvA. The goal of the assignment is to build a DSL for questionnaires, called QL. The lab assignment is based on the Language Workbench Challenge 2013 LWC'13. A questionnaire consists of a sequence of questions and derived values presented to a user by rendering it as a GUI. Later questions may only be visible depending on answers given to earlier questions.

Requirements

  • Questions are enabled and disabled when different values are entered.
  • The type checker detects:
    • Reference to undefined questions
    • Duplicate question declarations with different types
    • Conditions that are not of the type boolean
    • Operands of invalid type to operators
    • Cyclic dependencies between questions
    • Duplicate labels (warning)
  • The language supports booleans, integers and string values.
  • Different data types in QL map to different (default) GUI widgets.

Here's a simple questionnaire in QL from the domain of tax filing:

form taxOfficeExample {
  "Did you sell a house in 2010?"
    hasSoldHouse: boolean
  "Did you buy a house in 2010?"
    hasBoughtHouse: boolean
  "Did you enter a loan?"
    hasMaintLoan: boolean

  if (hasSoldHouse) {
    "What was the selling price?"
      sellingPrice: money
    "Private debts for the sold house:"
      privateDebt: money
    "Value residue:"
      valueResidue: money =
        (sellingPrice - privateDebt)
  }
}

Running the application

Place the questionnaire in resources and run the main class nl.uva.ql.main.Main using this questionnaire.

ql's People

Contributors

ardavanghaffari avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.