Skip to content

several theorems about graphs#125

Open
muenchnerkindl wants to merge 2 commits into
masterfrom
graphs
Open

several theorems about graphs#125
muenchnerkindl wants to merge 2 commits into
masterfrom
graphs

Conversation

@muenchnerkindl

Copy link
Copy Markdown
Contributor

This PR adds a number of theorems about graphs, including those required for the safety proof of the Dijkstra-Scholten algorithm (https://github.com/tlaplus/Examples/tree/master/specifications/ewd687a). I'll do a PR for that proof once these theorems are in.

Besides changing some (LOCAL) INSTANCE to EXTENDS due to current limitations of the PM – including in some modules imported here – I also made a few changes to Graphs.tla:

  • simplified the definition of SimplePath and renamed the old definition to MCSimplePath: it applies only to finite graphs but can be evaluated by TLC,
  • similar changes to AreConnectedIn and IsStronglyConnected,
  • modified the definition of IsTreeWithRoot so that it requires the root to be a node in the graph: the previous definition was vacuously true for an graph with an empty set of nodes, for any root, and this requires case distinctions when adding a new leaf to a tree. IMHO the present definition is reasonable and more uniform.

The above changes may break some existing specification projects in that SimplePath should be overridden by MCSimplePath etc. when using TLC.

I also noticed that the definition of TransitiveClosure in Relations.tla is correct only for finite relations and suggest to eventually make analogous changes there, introducing an operator MCTransitiveClosure.

Signed-off-by: Stephan Merz <stephan.merz@loria.fr>
Signed-off-by: Stephan Merz <stephan.merz@loria.fr>
@muenchnerkindl

Copy link
Copy Markdown
Contributor Author

OK, I should have realized that the operators must be renamed in the test module for the tests to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant