summaryrefslogtreecommitdiff
path: root/prolog/intro_en.html
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@fri.uni-lj.si>2019-01-05 12:25:23 +0100
committerTimotej Lazar <timotej.lazar@fri.uni-lj.si>2019-01-05 12:25:23 +0100
commitc13b52c27e84a0a94e66d569dc03cfcf0f8e5261 (patch)
treef21d40d1c5a8932fa9ca6fceebdcfa7412af9e16 /prolog/intro_en.html
parentd7967a5c77a1a3f0e84e131a8bbca0a501d8a4bc (diff)
Prolog: add English introduction
Diffstat (limited to 'prolog/intro_en.html')
-rw-r--r--prolog/intro_en.html78
1 files changed, 78 insertions, 0 deletions
diff --git a/prolog/intro_en.html b/prolog/intro_en.html
new file mode 100644
index 0000000..b0639c0
--- /dev/null
+++ b/prolog/intro_en.html
@@ -0,0 +1,78 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8" />
+ <title>CodeQ: Prolog</title>
+ <link rel="stylesheet" type="text/css" href="/css/codeq.css" />
+ <link rel="stylesheet" type="text/css" href="../style.css" />
+</head>
+<body>
+
+<h1><span class="codeq">CodeQ</span>: Prolog</h1>
+<p>
+In the window that you are now reading, there are some practical tips and theories for each learning unit. There is also a list of tasks in this section. In principle, you can solve tasks in any order, but they are typically arranged in increasing difficulty. Some tasks are also easier to solve by using solutions from previous tasks. You do not need to rewrite these solutions, the system remembers them, and you can use them immediately if you want.
+</p>
+
+<h2>How do I solve tasks?</h2>
+<p>
+You begin to solve the task by clicking on it. This opens a web page in which you program a solution. Each page is linked to a specific task and contains four sections. You can change the partition layout in the settings.
+</p>
+<ul>
+ <li>
+ <p>
+In the upper left - instructions that briefly describe the task. Pay particular attention to the name of the predicate that you have to program - you must name it exactly as it is stated so that the system will recognize your solution. Of course, you can program several auxiliary predicates; there are no restrictions here.
+ </p>
+ <p>
+Additionally, be aware of the number of arguments the target predicate demands. For example, the predicate <code>mother(?X, ?Y)</code> requires two arguments, <code>X</code> and <code>Y</code>. The question mark before the name of the argument means that this argument can represent both the input and output. Arguments acting only as an input are marked with <code>+</code>, and arguments that only work as an output, with <code>-</code> . At the beginning, do not bother with this, but simply program it, the input / output will mostly be regulated by itself. Prolog is smart. 😉
+ </p>
+ </li>
+
+ <li>
+ <p>
+In the bottom of the left section, the application will give you feedback. These can be in the form of a general plan (how to get started solving some task), or specific advice on what may be wrong with your <em>current solution</em>. Tips are different, sometimes they will also be in the form of a counterexample – a concrete set of inputs for which your program works incorrectly (a the particular input for which your program generates wrong output). There can also be Prolog warning and error messages in the program.
+ </p>
+ <p>
+If such tip seems incorrect, first look at your program well. If they still seem wrong, let us know. If it's really wrong, I will buy you a coffee, otherwise you will buy it!
+ </p>
+ <p>
+(<em>Disclaimer</em>: it is sometimes not possible to determine with certainty whether a mistake is present, in such cases the system uses words such as <em>maybe</em>, <em>possibly</em> and <em>probably</em> – such solutions are not considered as incorrect.)
+ </p>
+ </li>
+
+ <li>
+ <p>
+A console on the right, typically black in color, where there is a Prolog prompt <code>?-</code>, is intended for your interaction with Prolog. In the background there is a minimally truncated <a target="_blank" href="http://www.swi-prolog.org">SWI Prolog</a>, which you can ask questions. The system has already loaded all the necessary data for each task (e.g. knowledge base). It also always automatically loads the current version of your program. In the Prolog section, you can ask any questions, not just those related to your program.
+ </p>
+ </li>
+
+ <li>
+ <p>
+Finally, there is the central section: the text editor, in which you write your own solution. At first glance, maybe some features are missing, for example, “Autocomplete”, but you will quickly find that Prolog programs are short and do not require a lot of typing.
+ </p>
+ <p>
+If your program exceeded 8-10 lines, you probably made it too complicated! The longest program in all tasks does not require more than 12 lines (and such tasks are rare). The buttons mentioned above are described below.
+ </p>
+ </li>
+</ul>
+
+<p>
+The central program part also contains the “Plan” and “Test” buttons. Most often, you will use the latter, which will automatically check your solution. The “Plan” button gives you general advice on how to tackle the given tasks; sometimes you can press it repeatedly, for more “revealing” tips. Of course, try to solve every task first without using any hints.
+</p>
+
+<p>
+If the program is incorrect, <span class="codeq">CodeQ</span> will sometimes offer a “Hint” button next to the test report. This button gives you a clue what may be wrong with your program. Some hints are prepared manually by the authors of the application, sometimes artificial intelligence is at work, sometimes you will get a counter-example on which the program does not work, but sometimes there is no hint at all. In this case, the program is probably terrible! Just kidding... maybe. 😉
+</p>
+
+<h2>How do I save my solution?</h2>
+<p>
+<span class="codeq">CodeQ</span> automatically stores your solutions on the server, but of course you have to be connected to the Internet. All changes are recorded in real time, so you do not need to worry about saving the code or loading it when your session expires. The duration of the session is, in principle, 60 minutes, and is terminated if you log on to another computer or another tab with the same username.
+</p>
+<p>
+Warning: given that the system stores everything you write in real time (so, it is a keylogger !), we recommend that confidential messages are not written in the system. Otherwise we will read them, we promise! 😉
+</p>
+<p>
+You can see all your solutions for a specific set by clicking on the link by the title.
+</p>
+
+</body>
+</html>