Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Mercury implementation of an Android question-drilling app.
Objective-C Matlab Java
Branch: master


Inquisitor's programmed in Mercury (not Objective C!)

Compiling + testing in emulator:
  $ vi Makefile  # change 'emu' to an emulator you've set up
  $ make emulator-start
  $ make debug
  $ make install
  $ make log
Dump the question bank:
  $ make quiztest
  $ ./quiztest

At present, questions are written in Mercury, and the UI is just
"here is a question.  Would you like another?", with the answer
always being C.

Also, the .apk is quite large (1.6M, vs. (post-ProGuard) 200k
for the Scala implementation of this app).  However, ProGuard
isn't yet being used to shrink the jarfiles, and all jarfiles
from Mercury runtime are included.  

The files:

    : provides a 'question' type, some convenience types, and
      functions to produce strings relating to questions.
    : provides the abstract data type 'test' and a number of
      predicates that manipulate it.  prepare/2 creates a test
      from a list of questions.
    : turns is411.m into a test and dumps the questions in a
      readable formatt (text provided by question.m)
    : a sample question-bank of 53 IT questions.

    : provides three functions to Java: (is411/0, to
      initialize that question-bank; next/3, to attempt
      to move to the next question; get_fields, to provide
      strings to be filled into the android UI.)
    : loads the main layout, establishes an onClick handler
      for the 'next question' button, and works with
Something went wrong with that request. Please try again.