Forgive me for the long answer. Since I was unsure about your background with programming and electronics I took the liberty to digress a little. (Not that I’m an expert, btw).
Microchips and microcontrollers are electronic components that usually do some very specific tasks ranging from simple things like reading bits in a serial transmission to complex tasks like supporting a BLE protocol. Usually the microchip manufacturer will provide a way for you to control it's inner working, most of the time in a high level form like a programming library but sometimes in binary form (like PDUs messages) which the chip can recognize itself internally.
In most cases those components are not enough by themselves and should be assembled together with other components to achieve something usable from a user perspective. By doing so comes the need to orchestrate the task of several different components, which in turns brings the need of a Host Controller to manage this orchestration. Also this usually requires a common language that talks to every one, usually C or C++ due to universal acceptance. By doing so manufacturers makes easier to use they're products with other products from other brands.
Examples of commonly used Host Controllers are Arduino boards, freeboards and others and you can always design you own.
So when TI says it has a BLE microchip what it's giving you is a piece of hardware that can perform all defined Bluetooth LE procedures like sending advertisement packets or respond to scan requests.
Now when comes to a Bluegiga module, it's the full package (hence the term Full Stack), a board in it's self. Bluegiga already assembled a set of components (picked at they're discretion) like volatile memory (RAM), persistent memory (Flash), serial ports, usb ports, and others.
A good analogy would be to think about a bluegiga module as your computer while TI microchip is your computer's processor.
In practical terms, depending on your needs a Bluegiga module may be too much. If, for example, I'm building a thermometer it may not require USB, RAM, Flash and other modules. All it may require is the thermometer itself, a serial interface to read the thermometer values, a battery and a BLE module to expose the value. In this case it may be easier to go with the TI microchip itself.
Another good example may be a tag used to detect its presence. Since the tag will only broadcast a pre-defined value, a simple BLE chip should suffice.
With this picture in mind, let's go through your questions:
i've read that bluegiga BLE112 is based on TI CC2540. but what does "is based" exactly means?
Means they use this chip for the BLE procedures (and maybe others things, I don't know the exactly spec of TI's chip, but it’s certainly limited in its functionalities).
BLE112 is a module, a board that includes the TI CC2540 chip and some more things, such as the antenna.
is that correct? it does use the TI CC2540 chip? or it is a modified version of the chip?
It's not a modified version of the chip, but BLE module it's more than a simpler BLE microchip. It’s a set of components bundled together.
i've read that BLE112 does not use the same stack as CC2540. this stack is "inside" the chip?it means that they use the TI CC2540 chip, but they have changed their firmware or something else?
No. They build something bigger. For example, the BLE112D is a module with an USB port.
if BLE112 uses the exact same chip TI CC2540 chip,
then it is possible to use use BGScript from bluegiga with a different module (for instance, BR-LE4.0-S2A from Blueradios)?
that is, can I write a BGScript program, compile it with bluegiga tools, and program the out.hex file to my BR-LE4.0-S2A module with TI SmartRF Flash Programmer?
No. BGScript is language created by Bluegiga and it has a very limited set of instructions, just the ones required to allow a programmer to control the "functionalities" embedded in they're modules. The instructions in other manufacture chips are different even it they’re chip would be a full stack like bluegigas or if it does similar tasks, like performing BLE procedures (scan, advertise, etc). You can think about a PC x MAC (in case of full stacks modules) or Intel x AMD (in case of microchips). They are similar but not always interoperable.
this means that before this beta, it was not possible to program BLE112 with IAR?
You’re probably right (or almost right) here. First pay attention that IAR is not just a compiler, its kind of a Visual Studio for microprocessors. It provides a debugger, a compiler, a linker, a visual IDE and so on.
That being said there are other programming tools around (free and commercial) that may be used, like GCC (compiler) and GDB (console debugger), but they may be harder to use and/or not officially supported by Bluegiga. Also note the difference from Bluegiga supporting an IDE and the IDE supporting Bluegiga's modules. Nothing prevents Microsoft (for example) from adding support to Blugiga's language and libraries into VS in future, but this would still be unsupported by Bluegiga.
that is, BLE112 was only programmable with GBScript, or also with IAR?
No. You can use other languages (for example python) but since it's not officially supported you may found yourself limited in what could be done. This also does not mean that every/any language can be used. It’s a long subject for another thread.
if so, what are the bluetooth chips that can be programmed with IAR?
That’s a hard one to answer. You may need to ask for each bluetooth manufacturer or to IAR itself. What I can assume is that since IAR is adopted by several big companies, I expect most of the major manufactures (Nordic, TI and others) to somehow support IAR in they're products.
I understand that IAR is very expensive, and this makes it an undesirable solution for hobbist.
however, a part of this, do you know if it is much more difficult to use than BGScript, for a simple application?
The answer relies on what your application will do and it's requirements. If it will only need what is "inside" the BLExxx module and does not require TOP-processing performance (ice speed), than BGScript may be enough. Otherwise you may need to use another language like C or python. Let me give you some examples:
1) Suppose a peripheral running an application that holds a "like" counter. People may come with they're iPhone or android and increment the counter of likes. For this simple application you can use BGScript.
2) Suppose a peripheral with an application that will read data from a serial port or an USB port and expose those values in BLE characteristics. BGScript may be enough for this.
3) Suppose a peripheral controlling a medical device that needs real-time response time. Even so BGScript may be enough for it from the features perspective, its speed may not be enough for this case.
4) Suppose a peripheral that is a set-top box from a cable TV. The running application must talk to a simcard, to a graphic unit, a transcoding unit, and audio unit and still control multiple HDMI buses. For sure BGScript won't fit and probably the host controller would no longer be the Bluegiga module, even if the set-top box uses a bluegiga module.
Got it? I hope this helps clear it a bit.
[p.s.] I posted this message earlier today, when I was lacking some sleep and loaded in caffeine. Only now I realized that it sounded a little rude and was full of errors, so I updated it.
sorry for that.