Opened 16 years ago
Closed 16 years ago
#184 closed enhancement (fixed)
Make library framework
| Reported by: | zirkel | Owned by: | zirkel |
|---|---|---|---|
| Priority: | major | Milestone: | Release 1.0 |
| Component: | None | Version: | 1.0 |
| Keywords: | library, lib, include | Cc: |
Description
We need MiniMP equivalents of standard libraries. For example:
libstdio.mmp
void fprintf(...){
}
.
.
.
or
libMPI.mmp
void MPI_Send(...){
}
void MPI_Recv(...){
}
Change History (9)
comment:1 by , 16 years ago
| Owner: | set to |
|---|---|
| Status: | new → assigned |
comment:2 by , 16 years ago
| Status: | assigned → accepted |
|---|
comment:3 by , 16 years ago
comment:4 by , 16 years ago
| Owner: | changed from to |
|---|---|
| Status: | accepted → assigned |
comment:5 by , 16 years ago
| Status: | assigned → accepted |
|---|
This is partially implemented. There is a library called foo with components in the front-end and semantics package demonstrating how to make a library. It is still necessary to make changes to the front-end to allow libraries to be written as source files and parsed.
comment:6 by , 16 years ago
Library source files can now be parsed. See the foo library for examples.
comment:7 by , 16 years ago
Libraries are now loaded automatically. A library named foo should have its implementation in lib/libfoo.c
comment:9 by , 16 years ago
| Resolution: | → fixed |
|---|---|
| Status: | accepted → closed |
I think it's complete. Reopen if there are any problems.

There are two types of libraries: system-level and source.
System level libraries have special built in semantics. These include malloc, free, and primitive communication operations (which have yet to be defined, but for now are send and recv). For these, there needs to be built-in definitions (in the Executor?) for how to transform the state.
Source-level libraries are expressed in source files that can be parsed with the application source code and incorporated into the model in the usual way. It should basically be equivalent to including the library source file at the beginning of the user source file. TASS will need to know where to look to find these source library files.
The front end will need to tell the model factory which libraries (system level and source) need to be used for the model. After that, the front end does not need to do anything special -- a call to a library function is treated just like a call to any other function. The front end requests from the ModelIF object the FunctionIF object with the specified name, and the model returns this function object. Where the function object came from is hidden from the front end.
Should there be a Library class? What is its interface? There must be a way to see if it contains the definition of a function with a given name/signature, and a way to add that function to a Process. Where should the semantics of a system function be located?