[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Definition of Semantic: was What Lua can do that other programming languages can't do?
- From: Dirk Laurie <dirk.laurie@...>
- Date: Tue, 26 Mar 2013 06:46:30 +0200
2013/3/26 Tim Hill <drtimhill@gmail.com>:
> I would say a "semantic" bug is any deviation from expected behavior
> of a program that is grammatically correct (i.e. has correct syntax
> according to the formal grammar of the language).
I would classify bugs into five groups.
Typographical: the program would have been correct if the symbol
the programmer intended had been typed, but actually there is
a different symbol in there.
Syntactic: the compiler catches the bug.
Semantic: the bug is caused by something in the language having
a different meaning to what the programmer reasonably expects.
E.g. when does an expression test "false" in a `if` statement?
(There are four different conventions for C, Python, Lua and
LuaJIT.) What is the precedence of operators in a expression?
Etc.
Logical: the bug can be found by using 'assert'. The programmer has
(perhaps unwittingly) assumed that a certain state must exist,
but failed take into account that it could be otherwise.
Rot: The program used to work, but changes to the language, OS etc
have made it invalid.
- References:
- What Lua can do that other programming languages can't do?, Muqtheear S
- Re: What Lua can do that other programming languages can't do?, Joseph Manning
- Re: What Lua can do that other programming languages can't do?, Coda Highland
- Re: What Lua can do that other programming languages can't do?, José Passes
- Re: What Lua can do that other programming languages can't do?, Coda Highland
- Re: What Lua can do that other programming languages can't do?, Sean Conner
- Re: What Lua can do that other programming languages can't do?, Coda Highland
- Re: What Lua can do that other programming languages can't do?, Roberto Ierusalimschy
- Re: What Lua can do that other programming languages can't do?, Steve Litt
- Re: What Lua can do that other programming languages can't do?, Jorge
- Re: What Lua can do that other programming languages can't do?, Steve Litt
- Definition of Semantic: was What Lua can do that other programming languages can't do?, Steve Litt
- Re: Definition of Semantic: was What Lua can do that other programming languages can't do?, Tim Hill