5. Report contents / Зміст звіту
The report is submitted together with the source code. It must contain the following sections.
- Title block — course, laboratory work number and title, student’s name and group, date.
- Objective — a short statement of the goal of the work (see 1purpose.md).
- Brief theory — the connectives
NOT,AND,ORand their truth tables, operator precedence, and the notion of a truth table, in your own words (see Lecture 6 — Propositional logic). - Chosen representation and parsing — how an expression is tokenised and
parsed (grammar or method used), and how a variable assignment is stored.
State that the language’s built-in
evalwas not used. - Implementation — the source code of the evaluator and the truth-table generator, with brief comments. State the programming language used.
- Testing — results for the examples of 4task.md (the
evaluation of
(A AND B) OR (NOT C)and the full table of(A AND B) OR C) and your own cases: a tautology (e.g.A OR (NOT A)— all rows true), a contradiction (e.g.A AND (NOT A)— all rows false), and an expression that checks precedence (e.g.NOT A AND B). - Complexity — the cost of one evaluation and of a full truth table, and why the number of rows grows as in the number of variables .
- Conclusions — what was implemented, the difficulties encountered (especially around precedence and parentheses), and what you learned.
Submission requirements. The source must compile/run and reproduce the
example results of 4task.md without using the host language’s eval.