Strange error on Promela - Error: syntax error saw 'keyword: do' near 'do' - spin

Why is the following Promela code returning an error only with N >= 34 ?
#define N 34
active proctype proc1() {
byte i;
select(i: 1 .. N); //line 5
do
:: true ->
printf("Hi");
:: true ->
break;
od
}
And the error is:
spin: prova.pml:5, Error: syntax error saw 'keyword: do' near 'do'
I really cannot find an error. With N <= 33 it works normally.
Is this a bug?

Yes, it is (was) a bug.
Update your version of Spin to 6.4.7 or superior.
The release notes of version 6.4.7 mention:
fixed a bug in the parsing of select (...) statements that could cause unwarranted syntax errors when larger ranges are used
I could not reproduce your issue with version 6.4.8, though it is definitively present in version 6.4.6.

Related

after installing magnus-ui in expo app getting error "No Space between hexadecimal literal and identifier"

expo go giving me this error
No Space between hexadecimal literal and identifier
No Stack
I am facing same problem here but it just happen in Android, iOS is running with no problem
-- EDIT --
I just found the problem when I tried to run the project on browser.
So these are the steps for you reproduce my aproach:
Run:
expo start
Choose "Run in web browser"
You will face a error in "color" module:
Access the module directory and file:
node_modules/color/index.js
1st problem is in line 66:
change this:
object &= 0xFF_FF_FF;
to this:
object &= 0xFFFFFF;
2nd problem is in the line 258:
change this:
`lum[i] = (chan <= 0.039_28) ? chan / 12.92 : ((chan + 0.055) / 1.055) ** 2.4;``
to this:
lum[i] = (chan <= 0.03928) ? chan / 12.92 : ((chan + 0.055) / 1.055) ** 2.4;
So this solved my problem just creating a issue here:
https://github.com/Qix-/color/
-- UPDATE --
The right way to fix that is downgrade color plugin from 4.0.0 to latest release, in my case today (07/28) is 3.2.1 so run:
yarn remove color
yarn add color#3.2.1

EOF error using input Python 3

I keep getting an EOF error but unsure as to why. I have tried with and without int() but it makes no difference. I'm using Pycharm 3.4 and Python 3.
Thanks,
Chris
while True:
try:
number = int(input("what's your favourite number?"))
print (number)
break
You must close a try statement because you are declaring that there might be an error and you want to handle it
while True:
try:
number = int(input("what's your favourite number?"))
print(number)
break
except ValueError as e:
print("Woah, there is an error: {0}".format(e))

How to enable hints and warnings in the online REPL

I figured that I can do it on the command line REPL like so:
java -jar frege-repl-1.0.3-SNAPSHOT.jar -hints -warnings
But how can I do the same in http://try.frege-lang.org
Hints and warnings are already enabled by default. For example,
frege> f x = f x
function f :: α -> β
3: application of f will diverge.
Perhaps we can make it better by explicitly saying it as warning or hint (instead of colors distinguishing them) something like:
[Warning] 3: application of f will diverge.
and providing an option to turn them on/off.
Update:
There was indeed an issue (Thanks Ingo for pointing that out!) with showing warnings that are generated in a later phase during the compilation. This issue has been fixed and the following examples now correctly display warnings in the REPL:
frege> h x = 0; h false = 42
function h :: Bool -> Int
4: equation or case alternative cannot be reached.
frege> f false = 6
function f :: Bool -> Int
5: function pattern is refutable, consider
adding a case for true

Error in SQL-Oracle Code when raising value to the nth power - Need assistance

I'm running SQL code within Oracle and need help revising the below "Update" script. The below script gives me the error “missing equal sign” due to the " ^ " in the last line of the code that is meant to take the Table-B.ValueY value to the Table-A.ValueZ power. I tried changing the last line to a Power (x,y) formula, but that gives me "%s: invalid identifier" error. I also went so far as to change the code completely into a CREATE TABLE, but that just appears be caught in a loop and never finishes.
Any help is much appreciated.
Original code:
UPDATE Table-A
SET Column-X = 0
WHERE
TABLE-A.mid = TABLE-B.mid AND
TABLE-A.tdlinx = TABLE-B.tdlinx AND
TABLE-B.ValueY ^ TABLE-A.ValueZ > 0.1;
there is a POWER function
SELECT POWER(10,2) FROM DUAL;
yours should look similar to this:
POWER( TABLE-B.ValueY, TABLE-A.ValueZ ) > 0.1

expected ')' got '.' !!! How to detect the file with error?

I recently upgraded less to 1.3.3v began to encounter this error
expected ')' got '.'
during less to css compilation...
This is the error trace of the
at error (/.rvm/gems/ruby-1.9.3-p286/gems/less-2.3.2/lib/less/js/lib/less/parser.js:198:15)
at expect (/.rvm/gems/ruby-1.9.3-p286/gems/less-2.3.2/lib/less/js/lib/less/parser.js:190:13)
at Object. (/.rvm/gems/ruby-1.9.3-p286/gems/less-2.3.2/lib/less/js/lib/less/parser.js:884:25)
at $ (/.rvm/gems/ruby-1.9.3-p286/gems/less-2.3.2/lib/less/js/lib/less/parser.js:133:24)
at Object.primary (/.rvm/gems/ruby-1.9.3-p286/gems/less-2.3.2/lib/less/js/lib/less/parser.js:527:32)
at $ (/.rvm/gems/ruby-1.9.3-p286/gems/less-2.3.2/lib/less/js/lib/less/parser.js:133:24)
at Object.block (/.rvm/gems/ruby-1.9.3-p286/gems/less-2.3.2/lib/less/js/lib/less/parser.js:1121:42)
at $ (/.rvm/gems/ruby-1.9.3-p286/gems/less-2.3.2/lib/less/js/lib/less/parser.js:133:24)
at Object.ruleset (/.rvm/gems/ruby-1.9.3-p286/gems/less-2.3.2/lib/less/js/lib/less/parser.js:1144:54)
at $ (/.rvm/gems/ruby-1.9.3-p286/gems/less-2.3.2/lib/less/js/lib/less/parser.js:133:24)
/.rvm/gems/ruby-1.9.3-p286/gems/less-2.3.2/lib/less/parser.rb:103:in block in to_css'
/.rvm/gems/ruby-1.9.3-p286/gems/less-2.3.2/lib/less/java_script/v8_context.rb:90:inblock in do_lock'
/.rvm/gems/ruby-1.9.3-p286/gems/less-2.3.2/lib/less/java_script/v8_context.rb:88:in do_lock'
/.rvm/gems/ruby-1.9.3-p286/gems/less-2.3.2/lib/less/java_script/v8_context.rb:60:inlock'
/.rvm/gems/ruby-1.9.3-p286/gems/less-2.3.2/lib/less/java_script/v8_context.rb:30:in exec'
/.rvm/gems/ruby-1.9.3-p286/gems/less-2.3.2/lib/less/java_script.rb:26:inexec'
/.rvm/gems/ruby-1.9.3-p286/gems/less-2.3.2/lib/less/parser.rb:103:in `to_css'
guess its some syntax error... My question is how to detect the file and the line number of the error ??? I'm not sure how to debug ???
Any Suggestions ????
PS : havent encountered this before upgrading