/[ascend]/trunk/models/test/lrslv/onerel.a4c
ViewVC logotype

Contents of /trunk/models/test/lrslv/onerel.a4c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1342 - (show annotations) (download) (as text)
Sun Mar 11 13:57:34 2007 UTC (13 years, 6 months ago) by jpye
File MIME type: text/x-ascend
File size: 695 byte(s)
Added test of sequence of logical relations.
Fixed regression with activeblock from last commit.
1 REQUIRE "atoms.a4l";
2 (*
3 A simplest-possible logical relation problem. The relation
4
5 fact != fiction
6
7 Should result fiction to the NOT value of fact, as we are FIXing the value
8 of fact.
9
10 Note that a bug in FIX requires this '.fixed :=' syntax to be used for
11 the moment.
12 *)
13 MODEL onerel;
14 fact IS_A boolean_var;
15 fiction IS_A boolean_var;
16
17 fact != fiction;
18 METHODS
19 METHOD default;
20 fact := FALSE;
21 fiction := TRUE;
22 END default;
23
24 METHOD specify;
25 fact.fixed := TRUE;
26 END specify;
27
28 METHOD values;
29 fact := TRUE;
30 END values;
31
32 METHOD on_load;
33 RUN default_self;
34 RUN reset;
35 RUN values;
36 END on_load;
37
38 METHOD self_test;
39 ASSERT fiction == FALSE;
40 END self_test;
41 END onerel;
42

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22