Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
K
KTLA Study
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
KTLA Study
Commits
5ae6abac
Commit
5ae6abac
authored
Feb 10, 2022
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sem: SF for enter
parent
07316451
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
145 additions
and
0 deletions
+145
-0
.gitignore
.gitignore
+6
-0
Sem.tla
Sem.tla
+74
-0
Sem.toolbox/.project
Sem.toolbox/.project
+29
-0
Sem.toolbox/.settings/org.lamport.tla.toolbox.prefs
Sem.toolbox/.settings/org.lamport.tla.toolbox.prefs
+2
-0
Sem.toolbox/Sem___Model_1.launch
Sem.toolbox/Sem___Model_1.launch
+34
-0
No files found.
.gitignore
View file @
5ae6abac
...
...
@@ -11,3 +11,9 @@
*.toolbox/*/*.dot
*.toolbox/*/*.pdf
*.toolbox/*/*.out
*.toolbox/*/*/*.st
*.toolbox/*/*/*.fp
*.toolbox/*/*/nodes_*
*.toolbox/*/*/ptrs_*
Sem.tla
0 → 100644
View file @
5ae6abac
-------------------------------- MODULE Sem --------------------------------
EXTENDS Integers
CONSTANT N
ASSUME N \in Nat
Procs == 0..N
(*******
--algorithm SemMutex {
variable sem = 1 ;
fair process (P \in Procs) {
ncs:- while (TRUE) {
skip ;
enter:+ await sem = 1 ;
sem := 0 ;
cs: skip ;
exit: sem := 1 ;
}
}
}
*******)
\* BEGIN TRANSLATION (chksum(pcal) = "63149355" /\ chksum(tla) = "b638a8a")
VARIABLES sem, pc
vars == << sem, pc >>
ProcSet == (Procs)
Init == (* Global variables *)
/\ sem = 1
/\ pc = [self \in ProcSet |-> "ncs"]
ncs(self) == /\ pc[self] = "ncs"
/\ TRUE
/\ pc' = [pc EXCEPT ![self] = "enter"]
/\ sem' = sem
enter(self) == /\ pc[self] = "enter"
/\ sem = 1
/\ sem' = 0
/\ pc' = [pc EXCEPT ![self] = "cs"]
cs(self) == /\ pc[self] = "cs"
/\ TRUE
/\ pc' = [pc EXCEPT ![self] = "exit"]
/\ sem' = sem
exit(self) == /\ pc[self] = "exit"
/\ sem' = 1
/\ pc' = [pc EXCEPT ![self] = "ncs"]
P(self) == ncs(self) \/ enter(self) \/ cs(self) \/ exit(self)
Next == (\E self \in Procs: P(self))
Spec == /\ Init /\ [][Next]_vars
/\ \A self \in Procs : WF_vars((pc[self] # "ncs") /\ P(self)) /\ SF_vars(enter(self))
\* END TRANSLATION
--------
ME == INSTANCE MutualExclusionSpec WITH
pc <- [proc \in Procs |-> CASE pc[proc] = "cs" -> "cs"
[] pc[proc] \in {"enter"} -> "csentry"
[] OTHER -> "non-cs"]
THEOREM Spec => ME!Spec
THEOREM Spec => []ME!MutualExclusion
THEOREM Spec => ME!Liveness
=============================================================================
Sem.toolbox/.project
0 → 100644
View file @
5ae6abac
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>
Sem
</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>
toolbox.builder.TLAParserBuilder
</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>
toolbox.natures.TLANature
</nature>
</natures>
<linkedResources>
<link>
<name>
MutualExclusionSpec.tla
</name>
<type>
1
</type>
<location>
/home/kirr/study/tla+/pluscal/ME/MutualExclusionSpec.tla
</location>
</link>
<link>
<name>
Sem.tla
</name>
<type>
1
</type>
<locationURI>
PARENT-1-PROJECT_LOC/Sem.tla
</locationURI>
</link>
</linkedResources>
</projectDescription>
Sem.toolbox/.settings/org.lamport.tla.toolbox.prefs
0 → 100644
View file @
5ae6abac
ProjectRootFile=PARENT-1-PROJECT_LOC/Sem.tla
eclipse.preferences.version=1
Sem.toolbox/Sem___Model_1.launch
0 → 100644
View file @
5ae6abac
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration
type=
"org.lamport.tla.toolbox.tool.tlc.modelCheck"
>
<stringAttribute
key=
"configurationName"
value=
"Model_1"
/>
<intAttribute
key=
"distributedFPSetCount"
value=
"0"
/>
<stringAttribute
key=
"distributedNetworkInterface"
value=
"192.168.122.1"
/>
<intAttribute
key=
"distributedNodesCount"
value=
"1"
/>
<stringAttribute
key=
"distributedTLC"
value=
"off"
/>
<intAttribute
key=
"fpIndex"
value=
"24"
/>
<intAttribute
key=
"maxHeapSize"
value=
"25"
/>
<stringAttribute
key=
"modelBehaviorInit"
value=
""
/>
<stringAttribute
key=
"modelBehaviorNext"
value=
""
/>
<stringAttribute
key=
"modelBehaviorSpec"
value=
"Spec"
/>
<intAttribute
key=
"modelBehaviorSpecType"
value=
"1"
/>
<stringAttribute
key=
"modelBehaviorVars"
value=
"sem, pc"
/>
<stringAttribute
key=
"modelComments"
value=
""
/>
<booleanAttribute
key=
"modelCorrectnessCheckDeadlock"
value=
"true"
/>
<listAttribute
key=
"modelCorrectnessInvariants"
>
<listEntry
value=
"1ME!MutualExclusion"
/>
</listAttribute>
<listAttribute
key=
"modelCorrectnessProperties"
>
<listEntry
value=
"1ME!Spec"
/>
<listEntry
value=
"1ME!Liveness"
/>
</listAttribute>
<intAttribute
key=
"modelEditorOpenTabs"
value=
"8"
/>
<stringAttribute
key=
"modelExpressionEval"
value=
""
/>
<listAttribute
key=
"modelParameterConstants"
>
<listEntry
value=
"N;;1;0;0"
/>
</listAttribute>
<intAttribute
key=
"modelVersion"
value=
"20191005"
/>
<intAttribute
key=
"numberOfWorkers"
value=
"2"
/>
<stringAttribute
key=
"result.mail.address"
value=
""
/>
<stringAttribute
key=
"specName"
value=
"Sem"
/>
<stringAttribute
key=
"tlcResourcesProfile"
value=
"local custom"
/>
</launchConfiguration>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment