GithubHelp home page GithubHelp logo

practical-tla-plus's Introduction

Apress Source Code

This repository accompanies Practical TLA+ by Hillel Wayne (Apress, 2018).

Cover image

Download the files as a zip using the green button, or clone the repository to your machine using Git.

Releases

Release v1.0 corresponds to the code in the published book, without corrections or updates.

Contributions

See the file Contributing.md for more information on how you can contribute to this repository.

practical-tla-plus's People

Contributors

courajs avatar hwayne avatar m3gat0nn4ge avatar markp88 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

practical-tla-plus's Issues

Pluscal translation of algorithms

Some algorithms in this repo include Pluscal translation, others (such as recycler.tla) do not. I think it would be useful if all algorithms included translations

Chapter 3 - page 54

The sentence "Functions ... have no restrictions on recursion" implied to me that operations could not be recursive. However, they can be and here is what SumUpTo(n) might look like as a recursive operator:

RECURSIVE SumUpTo(_)
SumUpTo(n) == IF n=0 THEN 0 ELSE n + SumUpTo(n-1) 

Typo

Chapter 2, page 37: «since we'd be using Append instead of Cardinality» should read «since we'd be using Len instead of Cardinality».

Chapter 5 - Concurrency: Typos and Questions

At page 90 where Actors are added to the cache code, in place of WaitForResources it should be UseResources (or if it's correct with WaitForResources, should change the pages before this one).

Great book @hwayne o/ great work

Add a copy of each iteration for each modules

Currently, only some modules are included in this repo. It would be helpful if this repo included each iteration of each module e.g. the version of recycler from the start of chapter 3. Related to issue #10

Add a comment to each algorithm with a book page number

I would be great if you could add a comment to each module specifying exactly which algorithm in the book it corresponds with. E.g. I assumed telephone.2.tla would be the algorithm from page 41 but it is the algorithm from page 42.

Complex Behaviours

Page 34 says "There are three basic ways to do this."

Then we have Multiple Starting States with an example, followed by Nondeterministic Behavior with an example.
The summary then confirms that there are only 2 ways discussed... is there another way that may have been dropped?

Chapter 7: binary search and overflows

The last part of the binary algorithm in chapter 7 suggests to create the NoOverflows invariant. In doing so, the invariant is violated due to high taking MaxInt + 1 value (tested with MaxInt == 7).

The algorithm requires a small fix in the elsif check:

  goto Result;
elsif seq[m] < target /\ m < high then 
   low := m + 1;
else 

This allow the model to pass and terminate without causing further overflows.

Chapter 3 - page 45

The following LAMBDA param1, param2, paramN: body should say LAMBDA param1, param2, ..., paramN: body on page 45

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.