% % $Id: hekate_case_hello-xtt2.pl,v 1.1 2009-11-24 09:39:06 sebi Exp $ % % File generated by HeKatE Qt Editor ver. M6_10 % % HeaRT case % % % Copyright (C) 2006-9 by the HeKatE Project % % HeaRT has been develped by the HeKatE Project, % see http://hekate.ia.agh.edu.pl % % This file is part of HeaRT. % % HeaRT is free software: you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation, either version 3 of the License, or % (at your option) any later version. % % HeaRT is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with HeaRT. If not, see . % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% :- ensure_loaded('heart.pl'). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TYPES DEFINITIONS %%%%%%%%%%%%%%%%%%%%%%%%%% xtype [name: boolean, base: numeric, length: 1, scale: 0, desc: boolean, domain: [0,1] ]. xtype [name: integer, base: numeric, length: 10, scale: 0, desc: integer, domain: [-2147483648 to 2147483647] ]. xtype [name: default, base: symbolic, domain: [none/1], ordered: yes ]. xtype [name: hour, base: numeric, length: 10, scale: 0, domain: [0 to 24] ]. xtype [name: greeting, base: symbolic, domain: ['Good Morning','Good Afternoon','Good Evening','Good Night'] ]. xtype [name: gender, base: symbolic, domain: ['Female','Male'] ]. xtype [name: marital_status, base: symbolic, domain: ['Single','Married'] ]. xtype [name: age, base: numeric, length: 10, scale: 0, domain: [0 to 120] ]. xtype [name: salutation, base: symbolic, domain: ['Mrs.','Ms.','Mr.','Little'] ]. %%%%%%%%%%%%%%%%%%%%%%%%% ATTRIBUTES DEFINITIONS %%%%%%%%%%%%%%%%%%%%%%%%%% xattr [name: age, abbrev: age, class: simple, type: age, comm: in ]. xattr [name: gender, abbrev: gend1, class: simple, type: gender, comm: in ]. xattr [name: greeting, abbrev: gree1, class: simple, type: greeting, comm: inter ]. xattr [name: hour, abbrev: hour, class: simple, type: hour, comm: in ]. xattr [name: marital_status, abbrev: mari1, class: simple, type: marital_status, comm: in ]. xattr [name: salutation, abbrev: salu1, class: simple, type: salutation, comm: inter ]. xattr [name: '{user_message}', abbrev: '{use1}', class: general, type: numeric, comm: out ]. %%%%%%%%%%%%%%%%%%%%%%%% TABLE SCHEMAS DEFINITIONS %%%%%%%%%%%%%%%%%%%%%%%% xschm 'Table2': [hour] ==> [greeting]. xschm 'Table3': [gender,marital_status,age] ==> [salutation]. %%%%%%%%%%%%%%%%%%%%%%%%%%%% RULES DEFINITIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%% xrule 'Table2'/1: [hour in [0,1,2,3,4,5,6,7,8,9,10,11]] ==> [greeting set 'Good Morning']. xrule 'Table2'/2: [hour in [12,13,14,15,16,17]] ==> [greeting set 'Good Afternoon']. xrule 'Table2'/3: [hour in [18,19,20,21,22]] ==> [greeting set 'Good Evening']. xrule 'Table2'/4: [hour in [23,24]] ==> [greeting set 'Good Night']. xrule 'Table3'/1: [gender in ['Female'], marital_status in ['Married'], age in [any]] ==> [salutation set 'Mrs.']. xrule 'Table3'/2: [gender in ['Female'], marital_status in ['Single'], age in [any]] ==> [salutation set 'Ms.']. xrule 'Table3'/3: [gender in ['Male'], marital_status in [any], age in [any]] ==> [salutation set 'Mr.']. xrule 'Table3'/4: [gender in ['Male'], marital_status in ['Single'], age lt 10] ==> [salutation set 'Little']. %%%%%%%%%%%%%%%%%%%%%%%%% STATES DEFINITIONS %%%%%%%%%%%%%%%%%%%%%%%%%% xstat init: [hour,12]. xstat init: [gender,'Female']. xstat init: [marital_status,'Single']. xstat init: [age,33]. xstat init2: [hour,19]. xstat init2: [gender,'Male']. xstat init2: [marital_status,'Single']. xstat init2: [age,8]. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % File generated by HeKatE Qt Editor ver. M6_10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%