pseuco-lang issueshttps://dgit.cs.uni-saarland.de/pseuco/pseuco-lang/-/issues2023-11-06T16:32:01+01:00https://dgit.cs.uni-saarland.de/pseuco/pseuco-lang/-/issues/9Execution order of global declarations2023-11-06T16:32:01+01:00Felix FreibergerExecution order of global declarationshttps://pseuco.com/#/edit/remote/6dkqvu2x03i9dew5shm6
https://dgit.cs.uni-saarland.de/pseuco/pseuco-ccs-interpreter/-/issues/3
https://dgit.cs.uni-saarland.de/pseuco/pseuco-cpn-compiler/-/issues/4https://pseuco.com/#/edit/remote/6dkqvu2x03i9dew5shm6
https://dgit.cs.uni-saarland.de/pseuco/pseuco-ccs-interpreter/-/issues/3
https://dgit.cs.uni-saarland.de/pseuco/pseuco-cpn-compiler/-/issues/4https://dgit.cs.uni-saarland.de/pseuco/pseuco-lang/-/issues/8Inconsistent shadowing behavior in procedure arguments2023-10-23T23:33:18+02:00Yannick SchilloInconsistent shadowing behavior in procedure argumentsWhile shadowing variables seems to be disallowed everywhere else, procedure arguments can shadow everything, including other procedure definitions:
```
int x;
struct S {
int y;
void test(int x, int x, int y, int y) {}
}
mainAgen...While shadowing variables seems to be disallowed everywhere else, procedure arguments can shadow everything, including other procedure definitions:
```
int x;
struct S {
int y;
void test(int x, int x, int y, int y) {}
}
mainAgent {}
```https://dgit.cs.uni-saarland.de/pseuco/pseuco-lang/-/issues/7Inconsistent implicit cast from bounded channel to handshake channel2023-10-23T23:15:21+02:00Yannick SchilloInconsistent implicit cast from bounded channel to handshake channelA procedure taking a handshake channel (e.g. `intchan`) can be called with a bounded channel (e.g. `intchan10`), but it cannot be assigned directly:
```
void test(intchan ch) {}
mainAgent {
intchan10 ch;
//allowed
test...A procedure taking a handshake channel (e.g. `intchan`) can be called with a bounded channel (e.g. `intchan10`), but it cannot be assigned directly:
```
void test(intchan ch) {}
mainAgent {
intchan10 ch;
//allowed
test(ch);
//disallowed
intchan ch2 = ch;
//disallowed
intchan ch3;
ch3 = ch;
}
```
As a possible workaround, you can use a procedure to "cast" the channel type:
```
intchan cast(intchan ch) {
return ch;
}
mainAgent {
intchan10 ch;
intchan ch2 = cast(ch);
}
```https://dgit.cs.uni-saarland.de/pseuco/pseuco-lang/-/issues/6ReturnNotExhaustive not thrown in `if` without `else`2023-10-23T23:00:46+02:00Yannick SchilloReturnNotExhaustive not thrown in `if` without `else`The following code type-checks, although nothing is returned if the condition is false:
```
int test(bool b) {
if (b) {
return 1;
}
}
```The following code type-checks, although nothing is returned if the condition is false:
```
int test(bool b) {
if (b) {
return 1;
}
}
```https://dgit.cs.uni-saarland.de/pseuco/pseuco-lang/-/issues/4Add Assertions2022-03-17T12:09:52+01:00Felix FreibergerAdd AssertionsWe should add assertions, to allow model checking of pseuCo programs (e.g. through the bridge to Promela).
- [x] decide on exact syntax and semantics
- [x] add to AST
- [x] extend parser
- add basic support to semantics
- [x] to htt...We should add assertions, to allow model checking of pseuCo programs (e.g. through the bridge to Promela).
- [x] decide on exact syntax and semantics
- [x] add to AST
- [x] extend parser
- add basic support to semantics
- [x] to https://dgit.cs.uni-saarland.de/pseuco/pseuco-ccs-compiler
- [ ] to https://dgit.cs.uni-saarland.de/pseuco/pseuco-cpn-compilerFelix FreibergerFelix Freibergerhttps://dgit.cs.uni-saarland.de/pseuco/pseuco-lang/-/issues/3Variable can initialize itself2023-10-23T22:56:57+02:00Felix FreibergerVariable can initialize itselfThis program typechecks, but it should not, as `i` is undefined: https://pseuco.com/#/edit/remote/utymq85pdp9x46dz8bvfThis program typechecks, but it should not, as `i` is undefined: https://pseuco.com/#/edit/remote/utymq85pdp9x46dz8bvfpascalpascalhttps://dgit.cs.uni-saarland.de/pseuco/pseuco-lang/-/issues/2Is dynamic condition handling allowed?2019-11-21T15:07:14+01:00Felix FreibergerIs dynamic condition handling allowed?PseuCo, syntactically, allows you to use expressions in `waitForCondition` and `signal`:
```
monitor Test {
condition c1 with (true);
condition c2 with (false);
void do(bool it) {
waitForCondition(it ? c1 : c2);...PseuCo, syntactically, allows you to use expressions in `waitForCondition` and `signal`:
```
monitor Test {
condition c1 with (true);
condition c2 with (false);
void do(bool it) {
waitForCondition(it ? c1 : c2);
signal(!it ? c1 : c2);
}
}
```
Similarly, conditions can be reassigned:
```
monitor Test {
condition c1 with (true);
condition c2 with (false);
void do(bool it) {
c2 = c1;
waitForCondition(c2);
}
}
mainAgent {
Test t;
t.do(true);
println("it");
}
```
I think it's also clear how that should behave. However, neither the CCS-based nor the Petri-net-based compilers support this right now. (Both compilers crash for both programs, except the CCS-based compiler with the second program, which silently ignores the assignment.) I could implement this, but it's somewhat annoying and would blow up the nets. (Background: `waitForCondition` basically is a procedure call for me, and allowing the would require dynamic dispatch of procedure calls.)
Also note that even if we keep allowing this, conditions cannot be sent in channels, passed to procedures, or returned from procedures.
Do we want to allow this (and implement it), or do we want to disallow this (and reject it in the parser)?pascalpascalhttps://dgit.cs.uni-saarland.de/pseuco/pseuco-lang/-/issues/1Disallow empty println2019-01-07T14:17:22+01:00Felix FreibergerDisallow empty printlnThis program has no semantics and should be rejected by the parser / type checker:
```
mainAgent {
println();
}
```This program has no semantics and should be rejected by the parser / type checker:
```
mainAgent {
println();
}
```pascalpascal