QL etudes: Add further explanation + link

This commit is contained in:
Shati Patel
2019-10-02 12:21:23 +01:00
parent 427325b04a
commit 3dd2a6c325
2 changed files with 6 additions and 2 deletions

View File

@@ -160,4 +160,5 @@ What next?
----------
- Learn more about recursion in the `QL language handbook <https://help.semmle.com/QL/ql-handbook/index.html>`__.
- Put your QL skills to the test and solve the :doc:`River crossing puzzle <../ql-etudes/river-crossing>`.
- Start using QL to analyze projects. See :doc:`Learning QL <../../index>` for a summary of the available languages and resources.

View File

@@ -227,8 +227,11 @@ that returns the resulting path.
.. literalinclude:: river-crossing.ql
:lines: 115-117
For now, the path defined in the above predicate ``reachesVia`` just lists the order of cargo items to ferry.
You could tweak the predicates and the select clause to make the solution clearer. Here are some suggestions:
The `don't-care expression <https://help.semmle.com/QL/ql-handbook/expressions.html#don-t-care-expressions>`__ (``_``),
as the second argument to the ``reachesVia`` predicate, represents any value of ``visitedStates``.
For now, the path defined in ``reachesVia`` just lists the order of cargo items to ferry.
You could tweak the predicate and the select clause to make the solution clearer. Here are some suggestions:
- Display more information, such as the direction in which the cargo is ferried, for example
``"Goat to the left shore"``.