Optimization Project home page. ODB Tools
The University Schema in ODL Language
interface Material ( extent materials keys name) { attribute string name; attribute int risk; attribute set %60 string> feature; }; interface SMaterial : Material ( extent smaterials keys name) { } ; interface Manager ( extent managers keys name) { attribute string name; attribute range {40000, 100000} salary; attribute range{1, 15} level; }; interface TManager : Manager ( extent tmanagers keys name) { attribute range{8, 12} level; }; interface Storage ( extent storages keys name) { attribute string name; attribute string category; attribute Manager managed_by; typedef struct _stock { Material item; range {10, 300} qty; } t_stock; attribute setstock; }; interface SStorage : Storage ( extent storages keys name) { }; rule rule1 forall X in Manager: X.level >= 5 and X.level <= 10 then X.salary >= 40000 and X.salary <= 60000 ; rule rule2 forall X in Material: X.risk >= 10 then X in SMaterial ; rule rule3 forall X in Storage: X.category = "B4" then X.managed_by in TManager ; rule rule4 forall X in Storage: for all X1 in X.stock: X1.item in SMaterial then X in SStorage ; rule rule5 forall X in Storage: forall X1 in X.stock: X1.qty >= 10 and X1.qty <=50 then X.category = "A2" ;