منطق تحكم مهيكل Structured control logic
loop
-The Get statement finds values for the given variables from the system's - environment.
Get (Time-on, Time-off, Time, Setting. Temp, Switch);
case Switch of
when On => if Heating-status = off then
Switch-heating: Heating-status: on;
end if;
when Off => if Heating-status = on then
Switch-heating Heating-status = off;
end if;
when Controlled =>
if Time >= Time-on and Time <= Time-off then if Temp > Setting and Heating-status = on then Switch-heating; Heating-status = off;
elsif Temp <Setting and Heating-status = off then Switch-heating: Heating-status := on;
end if;
end if
end case:
end loop:
تبسيط الشرط Condition simplification
-- Complex condition
if not (A > B and (C <D or not (E> F) ) )...
Simplified condition
if (A ‹
<- B and (C>= D or E > F)...
Automatic program restructuring
برنامج لإعادة هيكلته
Program to be restructured
شرط معقد :
شرط مبسط
إعادة الهيكلة الآلية لبرنامج
برنامج معاد هيكلته
مولد برنامج
Analyser and graph builder
محلل ومولد رسم
Graph representation
تمثيل رسم
(485)
Progam generator
Restructured
program
ص ٤٨٥