name = 'Prolog' description = '''\ Introductory Prolog course. CodeQ instructions. ''' hint = { 'no_hint': '''\

No hint available, sorry!

''', 'test_results': '''\

Your code passed [%=passed%] / [%=total%] tests.

''', 'syntax_error': '''\

Your code contains syntax errors! The Prolog compiler emitted the following messages:

[%=messages%]
''', 'monkey_main': '''\

I was able to correct your program. Check out the editor for hints.

''', 'monkey_change': '''\

Check the highlighted part.

''', 'monkey_insert': '''\

Add another goal or clause.

''', 'monkey_remove': '''\

Remove the highlighted part.

''', 'monkey_highlight': None, # used to highlight erroneous tokens 'monkey_buggy_literal': [ '''\

Consider the highlighted values in the following program fragment:

''', '''\

Do all values have the correct type (number/list/structure/…)? Do the highlighted arguments appear in correct relations with other objects in the program?

''' ], 'monkey_buggy_variable': [ '''\

The variable [%=variable%] is used incorrectly. Pay particular attention to the following program fragments:

''', '''\

Are all goals referencing the variable [%=variable%] correct? Check whether you are using the right predicate or operator, and that the highlighted arguments make sense.

Do all occurrences of [%=variable%] denote the same value? In Prolog rules, each variable can only refer to a single value (e.g. person or number).

''' ], 'monkey_singleton': [ '''\

The highlighted variable [%=variable%] appears only once in a rule:

''', '''\

This is usually an error. Should the value denoted by the variable [%=variable%] appear anywhere else in the rule? Also check your program for typos.

''' ], 'monkey_missing': '''\

The program is partially correct, but not complete yet. Perhaps a goal is missing in one of the clauses, or another rule is needed.

''', 'monkey_unknown': [ '''\

Consider the highlighted program fragments:

''', '''\

This pattern does not occur in known solutions to this problem. This can indicate a mistake in the program, or that you are implementing a novel solution.

''' ], }