Skip to content

Instantly share code, notes, and snippets.

---- MODULE refueling ----
EXTENDS TLC, Integers, Naturals, FiniteSets
VARIABLES position, fuel, numberOfStops, stations
vars == <<position, fuel, numberOfStops, stations>>
Range(f) == {f[x]: x \in DOMAIN f}
Max(S) == CHOOSE i \in S : \A j \in S : i >= j
Min(S) == CHOOSE i \in S : \A j \in S : i <= j
Abs(x) == Max({x, -x})
@!@!@STARTMSG 2262:0 @!@!@
TLC2 Version 2.15 of Day Month 20?? (rev: d977051)
@!@!@ENDMSG 2262 @!@!@
@!@!@STARTMSG 2187:0 @!@!@
Running breadth-first search Model-Checking with fp 12 and seed 5016491069357648850 with 1 worker on 8 cores with 3524MB heap and 64MB offheap memory [pid: 7495] (Linux 5.4.0-72-generic amd64, Ubuntu 11.0.11 x86_64, MSBDiskFPSet, DiskStateQueue).
@!@!@ENDMSG 2187 @!@!@
@!@!@STARTMSG 2220:0 @!@!@
Starting SANY...
@!@!@ENDMSG 2220 @!@!@
Parsing file /home/a/projects/tla-specs/asyncio-lock/step2.tla
.* Event = "(?<event>.*)"(.|\n)*?Host = (?<host>.*)(.|\n)*?VectorClock = "(?<clock>.*)"(.|\n)*?value = (?<values>.*)
@!@!@ENDMSG 2264 @!@!@
@!@!@STARTMSG 2217:4 @!@!@
1: <Initial predicate>
/\ localVectorClock = ( Database :> (ClientA :> 0 @@ ClientB :> 0 @@ Database :> 0 @@ Cache :> 0) @@
Cache :> (ClientA :> 0 @@ ClientB :> 0 @@ Database :> 0 @@ Cache :> 0) )
/\ receivedMessage_ = (ClientA :> Null @@ ClientB :> Null)
/\ pc = ( ClientA :> "SendDatabase" @@
ClientB :> "SendDatabase" @@
.* Event = "(?<event>.*)"(.|\n)*?Host = (?<host>.*)(.|\n)*?VectorClock = "(?<clock>.*)"(.|\n)*?value = \((?<values>.*)\)
@!@!@ENDMSG 2264 @!@!@
@!@!@STARTMSG 2217:4 @!@!@
1: <Initial predicate>
/\ localVectorClock = ( Database :> (ClientA :> 0 @@ ClientB :> 0 @@ Database :> 0 @@ Cache :> 0) @@
Cache :> (ClientA :> 0 @@ ClientB :> 0 @@ Database :> 0 @@ Cache :> 0) )
/\ receivedMessage_ = (ClientA :> Null @@ ClientB :> Null)
/\ pc = ( ClientA :> "SendDatabase" @@
ClientB :> "SendDatabase" @@
@Alexander-N
Alexander-N / settings.json
Last active August 19, 2022 18:11
Substitutions for TLA+ to use with FiraCode
{
"conceal.substitutions": [
{
"language": [
"tla+",
{
"pattern": "**/*.tla"
}
],
"substitutions": [
# Solve Every Sudoku Puzzle
## Reimplementaion of Peter Norvig's Python version
## See http://norvig.com/sudoku.html
## Throughout this program we have:
## r is a row, e.g. 'A'
## c is a column, e.g. '3'
## s is a square, e.g. "A3"
## d is a digit, e.g. '9'
## Solve Every Sudoku Puzzle
## See http://norvig.com/sudoku.html
## Throughout this program we have:
## r is a row, e.g. 'A'
## c is a column, e.g. '3'
## s is a square, e.g. 'A3'
## d is a digit, e.g. '9'