From 320f6db34b5da13e259c3a55db9996a456bf8839 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Mon, 27 Feb 2017 15:55:40 +0100 Subject: Prolog: add texts for new automatic hints --- prolog/en.py | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) (limited to 'prolog/en.py') diff --git a/prolog/en.py b/prolog/en.py index 17a6fc4..f31eab4 100644 --- a/prolog/en.py +++ b/prolog/en.py @@ -32,4 +32,53 @@ hint = { '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 ragments:

+ +''', +'''\ +

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.

+''' + ], } -- cgit v1.2.1