Skip to content

feat: slr conflicts, automaton drawing, new icon, ci - #107

Merged
jose-rZM merged 19 commits into
developfrom
feature/develop-ChangeFStateQuestionAndValidation
Oct 3, 2026
Merged

jose-rZM merged 19 commits into
developfrom
feature/develop-ChangeFStateQuestionAndValidation

Conversation

@jose-rZM

@jose-rZM jose-rZM commented Oct 3, 2026

Copy link
Copy Markdown
Owner

Changes

  • SLR: the accept item (S -> A·$) no longer counts as an LR(0) conflict; it used to depend on iteration order and could differ between macOS and Linux
  • SLR: reduce-reduce states now count as LR(0) conflicts in F, as in the course theory; F and F-A help texts updated
  • Automaton: arrowheads are computed on the curve itself and no longer drift off their lines
  • Automaton: edges go around states instead of through them, and labels are no longer struck through
  • Automaton: click a state to see its items (closes with another click or Esc)
  • Automaton: the zoom hint says Cmd on macOS
  • New About dialog style, with a note on the degree project (v1) and a "Copy and Close" button
  • macOS: "About SyntaxTutor" always goes in the app menu, in every language
  • Links readable on Linux (colour set in the app palette)
  • New icon and logo across the app, Windows, macOS, AppImage and docs
  • AppImage built on Ubuntu 22.04 (glibc 2.35, was 2.38), "linux" dropped from its name
  • CI: SonarCloud removed; new tests.yml runs backend and GUI tests on every PR and push to main
  • Tests: more complex LL(1)/SLR(1) grammar fixtures, automaton geometry and click, clipping checks in English, About dialog, palette and icon
  • README: build instructions fixed (make app / make check)

The F question ("which states have an LR(0) conflict?") was answered by
a loop that looked for a complete and an incomplete item and excluded
the axiom only for the item it happened to be on. The backend counts
S -> A . $ as complete (it is where the input is accepted), so a state
like { S -> A . $, A -> A . c B } was flagged or not depending on the
order the unordered_set listed its items, which differs between
standard libraries: the expected answer could change between macOS and
Linux for the same grammar.

A state now conflicts when it holds a reduction (a complete item that is
not the axiom's) and an item that shifts, as the tutor's own feedback
defines it. F-A and G use the same notion of reduction.
Seven grammars closer to classroom exercises, each for a specific
difficulty, all checked against the backend (LL(1), SLR(1), LR(0)
states and conflicts)
The course defines two LR(0) conflicts, shift-reduce and reduce-reduce,
both settled by FOLLOW in SLR(1); the app's own SLR(1) reference says
the same. The F question only counted shift-reduce, so a state such as
{ A -> a . , B -> B a . } went through G instead, and a student who
listed it in F was marked wrong. Generated grammars hit it: about 6% at
level 2 and 10% at level 3.

F now counts a state with more than one reduction too. The F feedback
names both kinds and that the axiom item before $ accepts rather than
reduces; the F-A feedback explains a reduce-reduce state as such.
slr-reduce-choice moves to the conflict fixtures, with a test.
… click

Each edge is now one cubic curve between the centres, and everything is
read off it: where it leaves the source circle, where it enters the
target one (the tip), its direction there (the head), and where the line
stops inside the head. Loops use the same path.

Clicking a state shows its items in a box next to it, on the side that
covers fewer states; it stays until another click or Escape. Dragging
still pans the view. The hover tooltip remains.
Over every SLR fixture: each arrow tip lies on a state border, each line
ends inside an arrowhead and no line passes through a state. The click
test covers open, close, Escape, clicking empty space and dragging.
@jose-rZM jose-rZM self-assigned this Oct 3, 2026
@jose-rZM jose-rZM added the enhancement New feature or request label Oct 3, 2026
@jose-rZM
jose-rZM merged commit 86f5870 into develop Oct 3, 2026
1 check passed
@jose-rZM
jose-rZM deleted the feature/develop-ChangeFStateQuestionAndValidation branch October 3, 2026 19:43
jose-rZM added a commit that referenced this pull request Oct 4, 2026
* docs: add doc

* refactor: extract general styles

* refactor: extract general styles

* feat: add tests and summary for 1.1.0 release

* feat: add meta symbol handling

* refactor: rely on non-terminal checks

* chore: align tutor counts with meta epsilon

* test: update epsilon expectations

* chore: update gitignore

* feat: improve ll tutor input feedback

* feat: harden slr tutor input parsing

* feat: harden input parsing

* feat: harden input parsing in tables

* feat: add dynamic placeholders for each state

* feat: save user response when failed

* fix: sigsev when running at with epsilon due to excluding epsilon from terminals

* feat: change end state

* feat(slr): validate table and add guided mode

* feat(ui): use native fonts and structured grammar panels

* feat(ui): use stacked widgets for main windows

* feat(ui): use translations in back button

* feat(ui): redesign

* fix(ui): align text edit and send button

* fix(ui): horizontal size of grammar panel

* fix(ui): horizontal size of chat panel

* fix(ui): horizontal size of grammar panel when maximize

* feat(app): upgrade to 2.0.0-ALPHA

* test: update test scripts

* test(ll): add util testing functions

* test(ll): add object names

* test(slr): add util test functions

* test(tutorial): set object name

* test(main): set object names for testing

* test: add fixed grammars

* test: add test helpers

* test: add UI tests

* test: support list of fixtures

* test: support list of fixtures and docs

* test: Add TRACEABILITY helper document

* chore: update gitignore

* chore: change build output directories

* fix: change wizard style

* test: add test case

* feat(ui): change wizard to dialog and improve styling

* test: align slr tests to widget type change

* feat: allow users to use their grammars (#86)

* feat: add user defined grammar parser

* feat: add exam mode (#92)

- Add exam mode which disables all feedback and hints
- Add UI tests to SonarCloud workflow

* feat: add LL table guided mode (#93)

- Add LL1 table guided mode (like the SLR one)

* feat: LR graph view (#95)

- Implements a LR0 automaton graph view during SLR tutor. Disabled in exam mode

* chore: prepare release candidate (#96)

* chore: bump to 2.0.0-rc.1

* fix: fix jobs and naming (#97)

* fix: fix jobs and naming (#98)

Change paths

* chore: change Makefile and artifact naming (#99)

* fix: bug fixes (#101)

* fix: new line, restart when changing language, esc handler and epsilon alias

* feat: add mono font for linux and windows

* feat: add mono font

* feat: add icon and mono font

* fix: use point size instead of pixel size

* fix: export to pdf

* chore: remove unused fonts

* fix: remove fonts

* fix: ll1 grammar not centered due to empty index

* ui: dim difficulty block when using custom grammar

* fix: exam review export pdf style

* ui: difficulty levels disabled style

* ui: add confirmation when export

* chore: translations

* chore: change comments

* fix: compilation (#102)

* fix: font size and drop mac os intel (#104)

* fix: add style to first tree

* feat: add text scale option

* feat: scale all fonts

* feat: remove mac os intel support

* chore: bump to release candidate 4

* fix: bad animation on lineEdit

* fix: scale window when scaling font

* chore: update translations

* feat: use pts instead of px (#106)

- Use user-defined order when user uses their own grammar
- Revert use of px in fonts. Use pts to allow good bhv in different OS
- Fix text clipping
- Add style to scrollbars

* feat: slr conflicts, automaton drawing, new icon, ci (#107)

Release candidate 6

* ci: mac bundle icon (#108)

* ci: fix the missing macOS app icon

* fix: pdf style, wayland support, bugs (#109)

* fix(ui): readable contrast for SLR transitions and the automaton hint

* test: text in the progress panels meets WCAG contrast

* ci: add wayland support

* ci: add wayland support

* chore: update readme

* fix(slr): show the grammar's own initial item in question A2

* test: question A2 shows the grammar's initial item

* fix(slr): count accept next to a reduction as an LR(0) conflict

A state like { S -> A . $, B -> A . } can accept or reduce B on $. The
accept item is not a reduction, but it is an action, and the previous
rule ignored it on both sides, so F missed the conflict. A state now
conflicts when it has a reduction and any other item; one holding a
single reduction still goes to G. Generated grammars never produce such
a state (0 in 9000); a grammar typed by the user can.

* test: accept next to a reduction is an LR(0) conflict

* fix(backend): detect accept/reduce conflicts on $ in either order

* test(backend): accept/reduce conflicts on $ and accept beside a reduction

* chore: move settings and bundle identity from UMA to jram.me

* feat(ui): redesign the LL(1) and SLR(1) conversation PDFs

* feat(ui): show the app icon in the conversation PDF header

* fix(ui): remove the dark hairline on the icon's rounded edge

* feat(ui): print the exam report with the conversation PDF layout

* chore: final release candidate

* fix(i18n): translate the tutorial button and an SLR question

* fix(i18n): accents in the exit confirmation dialog

* chore: use the SyntaxTutor logo in the developer manual and docs

* docs: refresh the README for 2.0

* docs: rewrite the user manuals for 2.0

* fix(ui): size chat bubbles to their text and align it left

* docs: refresh screenshots and manuals after the chat fix

* docs: use a single logo banner that Doxygen can render

* chore: release 2.0.0

* chore: remove unused images

* docs: final README for 2.0

* docs: switch the README logo with the GitHub theme

* chore: delete unused svg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant