Method and apparatus for treating a logical programming expression as an event in an event-driven computer environment
First Claim
1. A method for treating a logical programming expression as an event in a computer system, the method comprising the steps of:
- (1) generating a source code file that includes a plurality of source code statements, wherein said source code statements include (1a) statements for causing the computer system to perform an operation upon the occurrence of at least one event;
(1b) a statement defining said at least one event, wherein said at least one event includes a predetermined event or an event which is a logical programming expression that returns a boolean value when evaluated;
(2) compiling said source code file to generate an executable program;
(3) executing said program on a processor to cause said processor to perform the steps of;
(3a) repeatedly evaluating said logical programming expression; and
(3b) executing said statements to perform said operation when said logical programming expression evaluates to true;
wherein said step of generating a source code file further includes the step of specifying each of said at least one events as either a priority event or a non-priority event;
wherein said logical programming expression is evaluated after detecting for any priority events if said logical programming expression is specified at the time of source code generation to be a non-priority event; and
wherein said logical programming expression is evaluated before detecting for any non-priority event if said logical programming expression is a priority event.
0 Assignments
0 Petitions
Accused Products
Abstract
An improved programming interface which provides for event scheduling, improved variable declarations allowing for configuration of declaration parameters, and improved handling of I/O objects. In modern day computing devices and especially in networks of such devices it is important to provide for event scheduling; known computing devices allow for event scheduling based on the occurrence of a predefined event. However, such a system present shortfalls in that flexibility is not provided to allow scheduling based on any arbitrary condition. Therefore, it is disclosed to provide a programming environment which allows for event scheduling where the event may be any arbitrary condition thus providing increased flexibility in event driven programs. In addition, programs which run on such computing devices typically declare one or more variables; such variables having one or more parameters associated therewith. These parameters are set to a state by the programmer, which state presumably is the state expected by the programmer to be the optimal state. The present invention provides flexibility in allowing such states to be changed, for example at the time a network implementing the computing device is configured. Additionally, it is disclosed to have improved declaration and control of I/O devices providing for ease of use and flexibility.
130 Citations
15 Claims
-
1. A method for treating a logical programming expression as an event in a computer system, the method comprising the steps of:
-
(1) generating a source code file that includes a plurality of source code statements, wherein said source code statements include (1a) statements for causing the computer system to perform an operation upon the occurrence of at least one event;
(1b) a statement defining said at least one event, wherein said at least one event includes a predetermined event or an event which is a logical programming expression that returns a boolean value when evaluated;
(2) compiling said source code file to generate an executable program;
(3) executing said program on a processor to cause said processor to perform the steps of;
(3a) repeatedly evaluating said logical programming expression; and
(3b) executing said statements to perform said operation when said logical programming expression evaluates to true;
wherein said step of generating a source code file further includes the step of specifying each of said at least one events as either a priority event or a non-priority event;
wherein said logical programming expression is evaluated after detecting for any priority events if said logical programming expression is specified at the time of source code generation to be a non-priority event; and
wherein said logical programming expression is evaluated before detecting for any non-priority event if said logical programming expression is a priority event.
-
-
2. A method for use in a computer system comprising the steps of:
-
generating a source code file that includes a plurality of source code statements wherein said source code statements include;
a plurality of statements defining a plurality of events, each of said plurality of events being either a logical programming expression that returns a boolean value when evaluated or a predefined event, and each of said plurality of events being predetermined to be either a priority event or non-priority event;
placing said priority events and said non-priority events in an order, said priority events being before said non-priority events in said order;
defining one of said priority events as a first evaluated event;
statements that define a plurality of operations, wherein each of said plurality of events is associated with one of said plurality of operations;
compiling said source code file to generate an executable program;
executing said program on a processor to cause said processor to repeatedly perform the steps of;
evaluating plurality of events in said order;
if any of said priority events evaluate to true, then executing the operation associated with a priority event and restarting evaluation from said first evaluated event;
if any of said non-priority events evaluate to true, then executing the operation associated with the non-priority event and restarting evaluation from said first evaluated event.
-
-
3. A method for implementing an event driven environment in a computer system, the method comprising the steps of:
-
(A) generating a source code file including (A1) specifying a plurality of events, said plurality of events being either predetermined events or logical programming expressions, wherein at least one of said plurality of events is a logical programming expression;
(A2) specifying said plurality of events as either priority events or non-priority events at the time of source code generation;
(B) compiling said source code file to generate an executable program;
(C) executing said program by;
(C1) evaluating said plurality of priority events;
(C2) if one said priority events evaluated to true, then (a) executing an operation associated with said priority event that evaluated to true; and
(b) returning to step (C1);
(C3) if none of said priority events evaluated to true, then (a) evaluating said plurality of non-priority events selected in a round robin fashion, and (b) if one of said non-priority events evaluates to true, then executing an operation associated with the non-priority event that evaluated to true and returning to step (C1). - View Dependent Claims (4, 5, 6, 7, 8, 9, 10, 11, 12)
-
-
13. A method for use in a computer system comprising the steps of:
-
generating a source code file that includes a plurality of source code statements wherein said source code statements include;
a plurality of statements defining a plurality of events, each of said plurality of events being either a logical programming expression that returns a boolean value when evaluated or a predefined event, and each of said plurality of events being ptedetermined to be either a priority event or non-priority event;
placing said priority events and said non-priority events in an order, said priority events being before said non-priority events in said order;
defining one of said priority events as a first evaluated event;
statements that define a plurality of operations, wherein each of said plurality of events is associated with one of said plurality of oprationd;
compiling said source code file to generate an executable program;
executing said program on a processor to causr said processor or repeatedly perform the step of;
evaluating plurality of events in said order;
if any of said priority events evaluate to true, then executing the operation associated with a priority event and restarting evaluation from said first evaluated event;
if any of said non-priority events evaluate to true, then executing the operation associated with the non-priority event and restarting evaluation from said first evaluated event.
-
-
14. A node of a network system comprising:
-
a processor, a memory coupled to said processor and storing at least one logical programming expression and a plurality of statements for performing an operation;
wherein said processor is configured to repeatedly sense for a predetermined event and to repeatedly evaluate said at least one logical programming expression, said processor executing said plurality of statements to perform said operation when said at least one logical programming expression evaluates to true or said predetermined event occurs;
wherein each of said predetermined event and said at least one logical programming expression is prioritized as either a priority event or a non-priority event; and
wherein said processor is configured to evaluate events which are predetermined to be priority events before evaluating non-priority events. - View Dependent Claims (15)
said memory stores a plurality of logical programming expressions, said plurality of logical programming expressions are divided into a plurality of priority events and a plurality of non-priority events;
said processor is configured to evaluate said non-priority events only when all of said priority events have been evaluated, and none of said priority events evaluated to true;
after any event evaluates to true, said processor is configured to evaluate all of said priority events before evaluating any of said non-priority events.
-
Specification