Modules
[
Front page
|
List of pages
|
Search
|
Recent changes
|
Backup
|
Help
]
Start:
//[[Documentation]]
*Modules
A module is a set of rules packaged in a membrane with a ...
>{ module('''modulename'''), '''RuleSet''' }
The RuleSet is made available only when it is copied ...
A module can be defined either in the source file or in a...
**Name Space
A single-level global name space is available for the nam...
// Currently, we have no means to prevent a programmer fr...
**Compile-Time Module Loading
When a program uses a qualified atom name of the form '''...
specified in the module '''m'''.
***Example
{ module(acc).
acc.add(A), acc.value(N) :- acc.value(A+N).
acc.get(Res), acc.value(N) :- int(N) | Res=N, acc.valu...
acc.new :- acc.value(0) }.
{ acc.new, acc.add(3), acc.add(4), acc.get(N) }
**Link-Time Module Loading
//***in SLIM ...
Modules defined in files in the $LMNTAL_HOME/installed/sh...
//***in LMNtal Java ...
//Link-time module lookup is performed when the source fi...
**System rulesets
A '''system ruleset''' is a set of global rules, namely
rules applicable to every place in the membrane structure.
For instance, built-in arithmetics (that evaluates
x=1+2*3 to x=7, for example) is implemented as
system rulesets.
A programmer can define his/her own system ruleset by
defining the ''system_ruleset'' module.
//-There are three kinds of system rulesets:
//++Built-in system rulesets that cannot be modified by u...
// ---Proxies for trans-membrane links fall into this cat...
//---Currently, they are processed in InterpretedRuleset
//even when the translator is used.
//++Built-in system rulesets that are described in LMNtal...
//be modified
//---Arithmetics falls in this category, but the current ...
//handles arithetics much like i.
//++LMNtal ?v???O??????????W???[???????????????isystem_ru...
//i. ? ii. ??ATranslator ?????R???p?C????? runtiem.Global...
//?N???X????B
//??? iii. ??Aruntime.SystemRulesets ?N???X?????????B
End:
//[[Documentation]]
*Modules
A module is a set of rules packaged in a membrane with a ...
>{ module('''modulename'''), '''RuleSet''' }
The RuleSet is made available only when it is copied ...
A module can be defined either in the source file or in a...
**Name Space
A single-level global name space is available for the nam...
// Currently, we have no means to prevent a programmer fr...
**Compile-Time Module Loading
When a program uses a qualified atom name of the form '''...
specified in the module '''m'''.
***Example
{ module(acc).
acc.add(A), acc.value(N) :- acc.value(A+N).
acc.get(Res), acc.value(N) :- int(N) | Res=N, acc.valu...
acc.new :- acc.value(0) }.
{ acc.new, acc.add(3), acc.add(4), acc.get(N) }
**Link-Time Module Loading
//***in SLIM ...
Modules defined in files in the $LMNTAL_HOME/installed/sh...
//***in LMNtal Java ...
//Link-time module lookup is performed when the source fi...
**System rulesets
A '''system ruleset''' is a set of global rules, namely
rules applicable to every place in the membrane structure.
For instance, built-in arithmetics (that evaluates
x=1+2*3 to x=7, for example) is implemented as
system rulesets.
A programmer can define his/her own system ruleset by
defining the ''system_ruleset'' module.
//-There are three kinds of system rulesets:
//++Built-in system rulesets that cannot be modified by u...
// ---Proxies for trans-membrane links fall into this cat...
//---Currently, they are processed in InterpretedRuleset
//even when the translator is used.
//++Built-in system rulesets that are described in LMNtal...
//be modified
//---Arithmetics falls in this category, but the current ...
//handles arithetics much like i.
//++LMNtal ?v???O??????????W???[???????????????isystem_ru...
//i. ? ii. ??ATranslator ?????R???p?C????? runtiem.Global...
//?N???X????B
//??? iii. ??Aruntime.SystemRulesets ?N???X?????????B
Page: