-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gec: fixed bug in SCOOP when there are several separate arguments and…
… we already have a lock on one of them.
- Loading branch information
Showing
37 changed files
with
688 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
...tion/semantics/m9ea/test_command_synchronous_two_separate_arguments_1/Readme.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Semantics M9EA | ||
|
||
This [test](.) is exercising the semantics rule [M9EA](../Readme.md). | ||
|
||
### Description | ||
|
||
In this test, there is feature `DD.f` with two separate arguments, one of them, `b`, being part of the current SCOOP region. So the call is synchronous, but the feature has to make sure that it has the lock on the region of the second separate argument, `c`, to avoid deadlock. This means that no separate call to the region of `c` triggered from a different SCOOP region may occur while in the middle of the execution of `DD.f`. |
24 changes: 24 additions & 0 deletions
24
tool/gecop/validation/semantics/m9ea/test_command_synchronous_two_separate_arguments_1/aa.e
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
class AA | ||
|
||
create | ||
|
||
make | ||
|
||
feature | ||
|
||
make | ||
local | ||
c: separate CC | ||
d: separate DD | ||
do | ||
create c.make | ||
create d.make (c) | ||
f (d) | ||
end | ||
|
||
f (d: separate DD) | ||
do | ||
d.g | ||
end | ||
|
||
end |
46 changes: 46 additions & 0 deletions
46
tool/gecop/validation/semantics/m9ea/test_command_synchronous_two_separate_arguments_1/bb.e
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
class BB | ||
|
||
create | ||
|
||
make | ||
|
||
feature | ||
|
||
make (a_c: separate CC) | ||
do | ||
c := a_c | ||
end | ||
|
||
c: separate CC | ||
|
||
f (s: separate STRING) | ||
do | ||
print (create {STRING}.make_from_separate (s) + " calling BB.f%N") | ||
g | ||
{EXECUTION_ENVIRONMENT}.sleep (100_000_000) | ||
end | ||
|
||
g | ||
local | ||
b: separate BB | ||
do | ||
create b.make (c) | ||
x (b) | ||
end | ||
|
||
x (a_b: separate BB) | ||
do | ||
a_b.y | ||
end | ||
|
||
y | ||
do | ||
z (c) | ||
end | ||
|
||
z (a_c: separate CC) | ||
do | ||
a_c.f ("BB") | ||
end | ||
|
||
end |
24 changes: 24 additions & 0 deletions
24
...op/validation/semantics/m9ea/test_command_synchronous_two_separate_arguments_1/build.eant
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0"?> | ||
|
||
<project name="aa" default="help"> | ||
|
||
<description> | ||
description: "Eiffel Ant file for 'aa'" | ||
copyright: "Copyright (c) 2023, Eric Bezault and others" | ||
license: "MIT License" | ||
</description> | ||
|
||
<inherit> | ||
<parent location="${GOBO}/library/common/config/eiffel.eant"> | ||
<redefine target="init_system"/> | ||
</parent> | ||
</inherit> | ||
|
||
<!-- Implementation --> | ||
|
||
<target name="init_system" export="NONE"> | ||
<set name="system" value="aa"/> | ||
<set name="system_dir" value="${aa.dir}"/> | ||
</target> | ||
|
||
</project> |
19 changes: 19 additions & 0 deletions
19
tool/gecop/validation/semantics/m9ea/test_command_synchronous_two_separate_arguments_1/cc.e
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
class CC | ||
|
||
create | ||
|
||
make | ||
|
||
feature | ||
|
||
make | ||
do | ||
end | ||
|
||
f (s: separate STRING) | ||
do | ||
print (create {STRING}.make_from_separate (s) + " calling CC.f%N") | ||
{EXECUTION_ENVIRONMENT}.sleep (100_000_000) | ||
end | ||
|
||
end |
32 changes: 32 additions & 0 deletions
32
tool/gecop/validation/semantics/m9ea/test_command_synchronous_two_separate_arguments_1/dd.e
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
class DD | ||
|
||
create | ||
|
||
make | ||
|
||
feature | ||
|
||
make (a_c: separate CC) | ||
do | ||
c := a_c | ||
end | ||
|
||
c: separate CC | ||
|
||
g | ||
local | ||
b: BB | ||
do | ||
create b.make (c) | ||
f (b, c) | ||
end | ||
|
||
f (a_b: separate BB; a_c: separate CC) | ||
do | ||
a_b.f ("DD") | ||
print ("DD middle f%N") | ||
a_c.f ("DD") | ||
print ("DD end f%N") | ||
end | ||
|
||
end |
5 changes: 5 additions & 0 deletions
5
...op/validation/semantics/m9ea/test_command_synchronous_two_separate_arguments_1/passed.gec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
DD calling BB.f | ||
DD middle f | ||
DD calling CC.f | ||
DD end f | ||
BB calling CC.f |
Empty file.
5 changes: 5 additions & 0 deletions
5
...op/validation/semantics/m9ea/test_command_synchronous_two_separate_arguments_1/passed.ise
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
DD calling BB.f | ||
DD middle f | ||
DD calling CC.f | ||
DD end f | ||
BB calling CC.f |
29 changes: 29 additions & 0 deletions
29
...op/validation/semantics/m9ea/test_command_synchronous_two_separate_arguments_1/system.ecf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?xml version="1.0" encoding="ISO-8859-1"?> | ||
<system | ||
xmlns="http://www.eiffel.com/developers/xml/configuration-1-20-0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-20-0 http://www.eiffel.com/developers/xml/configuration-1-20-0.xsd" | ||
name="aa" | ||
> | ||
<description> | ||
system: "aa" | ||
copyright: "Copyright (c) 2023, Eric Bezault and others" | ||
license: "MIT License" | ||
</description> | ||
<target name="aa"> | ||
<root class="AA" feature="make"/> | ||
<file_rule> | ||
<exclude>/\.svn$</exclude> | ||
<exclude>/\.git$</exclude> | ||
<exclude>/EIFGENs$</exclude> | ||
</file_rule> | ||
<option warning="true"/> | ||
<setting name="console_application" value="true"/> | ||
<capability> | ||
<concurrency support="scoop"/> | ||
</capability> | ||
<variable name="GOBO_LIBRARY" value="../../../../../.."/> | ||
<library name="free_elks" location="${GOBO_LIBRARY}/library/free_elks/library.ecf" readonly="true"/> | ||
<cluster name="aa" location="./"/> | ||
</target> | ||
</system> |
7 changes: 7 additions & 0 deletions
7
...tion/semantics/m9ea/test_command_synchronous_two_separate_arguments_2/Readme.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Semantics M9EA | ||
|
||
This [test](.) is exercising the semantics rule [M9EA](../Readme.md). | ||
|
||
### Description | ||
|
||
In this test, there is feature `DD.f` with two separate arguments. The feature already has the lock on the SCOOP region of the first separate argument `b`. So the call is synchronous, but the feature has to make sure that it also has the lock on the region of the second separate argument, `c`, to avoid deadlock. This means that no separate call to the region of `c` triggered from a different SCOOP region may occur while in the middle of the execution of `DD.f`. |
24 changes: 24 additions & 0 deletions
24
tool/gecop/validation/semantics/m9ea/test_command_synchronous_two_separate_arguments_2/aa.e
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
class AA | ||
|
||
create | ||
|
||
make | ||
|
||
feature | ||
|
||
make | ||
local | ||
c: separate CC | ||
d: separate DD | ||
do | ||
create c.make | ||
create d.make (c) | ||
f (d) | ||
end | ||
|
||
f (d: separate DD) | ||
do | ||
d.g | ||
end | ||
|
||
end |
Oops, something went wrong.