/*---------------------------------------------------------------------------* , Copyright (C) 2000 ConfigIt Software (www.configit-software.com) , , Product Model : pcshop.pm , Description : PC-shop example , PM version : 3.0 *---------------------------------------------------------------------------*/ constant MaxSlots : 8; MaxRamBlocks : 4; type CpuSlot : [ Slot1 , Socket7 , SuperSocket7 , SlotA ]; Slot : [ PCI , ISA , AGP ]; RamSlot : [ Std72Pin , EDO72Pin , SDRAM168Pin ]; HdBus : [ IDE , SCSI_UW2 , SSCI_2 ]; HdCapacity : [ "0Gb" , "9Gb" , "10Gb" , "27Gb" , "31Gb" , "34Gb" , "36Gb" ]; CpuFreq : [ "75MHz" , "233MHz" , "266MHz" , "333MHz" , "350MHz" , "366MHz" , "400MHz" , "450MHz" , "500MHz" , "600MHz" , "700MHz" , "800MHz" ]; RamCapacity : [ "0Mb" , "32Mb" , "64Mb" , "92Mb" , "128Mb" , "160Mb" , "192Mb" , "224Mb" , "256Mb" , "288Mb" , "320Mb" , "352Mb" , "384Mb" , "416Mb" , "448Mb" , "480Mb" , "512Mb" , "544Mb" , "576Mb" , "608Mb" , "640Mb" , "672Mb" , "704Mb" , "736Mb" , "768Mb" , "800Mb" , "832Mb" , "864Mb" , "896Mb" , "928Mb" , "960Mb" , "992Mb" , "1024Mb" ]; MotherboardId : [ "Aopen AK-72 133 ATX" , "Asus K7M ATX" , "Microstar 6167 ATX" , "Acorp 6BX81 ATX" , "Aopen AX6BP ATX" , "Abit BH6 ATX" , "Abit BX6 ATX" , "Asus P5A-B" , "Acorp 5ALI 61" , "Aopen MX6E ATX" , "Aopen AX59PRO 512KB" ]; ProcessorId : [ "AMD Athlon 800MHz" , "AMD Athlon 500MHz" , "Intel Pentium III 600MHz" , "Intel Celeron A 366MHz" , "Intel Pentium II 350MHz" , "Intel Pentium II 333MHz" , "AMD K6-2 266MHz 3DNOW" , "Intel Pentium 233MHz MMX" ]; HarddiskId : [ "No hard disk" , "Quantum Atlas IV 36,4GB" , "IBM DeskStar 34GXP 34,2GB" , "Maxtor DiamondMax 40+ 30,7GB" , "Western Digital Caviar Expert 27,3GB" , "IBM DeskStar 25GP 10,1GB" , "Seagate Barracuda 9 9,1GB" ]; RamId : [ "No RAM block" , "SDRAM PC100 NONAME 256MB" , "SDRAM PC100 NONAME 128MB" , "SDRAM PC133 64MB" , "SDRAM PC100 MCT 64MB" , "SDRAM PC66 32MB" , "Standard RAM u/Paritet 32MB" ]; GraphicsCardId : [ "Asus AGP-V3400TNT m/TV-In/TV-Out" , "Diamond Viper 770" , "Creative Labs Graphics Blaster Riva TNT" , "ATI Rage Fury m/TV-Out" , "Matrox Millennium G200" , "Diamond Monster Fusion" , "ATI All-In-Wonder 128 Bulk" ]; Motherboard : { public id : MotherboardId; private cpuslot : CpuSlot; private slot : array MaxSlots of optional Slot; private controllertype : HdBus; private controllercount : [0..4]; private mincpufreq : CpuFreq; private maxcpufreq : CpuFreq; private ramslot : RamSlot; private ramcapacity : [0..MaxRamBlocks]; rule (id = "Abit BX6 ATX" and cpuslot = Slot1 and controllertype = IDE and controllercount = 4 and mincpufreq = "233MHz" and maxcpufreq = "450MHz" and ramslot = SDRAM168Pin and ramcapacity = 4 and slot[0].SOME = PCI and slot[1].SOME = PCI and slot[2].SOME = PCI and slot[3].SOME = PCI and slot[4].SOME = ISA and slot[5].SOME = ISA and slot[6].SOME = ISA and slot[7].SOME = AGP) or (id = "Abit BH6 ATX" and cpuslot = Slot1 and controllertype = IDE and controllercount = 4 and mincpufreq = "233MHz" and maxcpufreq = "450MHz" and ramslot = SDRAM168Pin and ramcapacity = 4 and slot[0].SOME = PCI and slot[1].SOME = PCI and slot[2].SOME = PCI and slot[3].SOME = PCI and slot[4].SOME = PCI and slot[5].SOME = ISA and slot[6].SOME = ISA and slot[7].SOME = AGP) or (id = "Acorp 5ALI 61" and cpuslot = Socket7 and controllertype = IDE and controllercount = 4 and mincpufreq = "75MHz" and maxcpufreq = "350MHz" and ramslot = SDRAM168Pin and ramcapacity = 3 and slot[0].SOME = PCI and slot[1].SOME = PCI and slot[2].SOME = PCI and slot[3].SOME = ISA and slot[4].SOME = ISA and slot[5].SOME = ISA and slot[6].SOME = AGP and slot[7] = NONE) or (id = "Acorp 5ALI 61" and cpuslot = Socket7 and controllertype = IDE and controllercount = 4 and mincpufreq = "75MHz" and maxcpufreq = "350MHz" and ramslot = Std72Pin and ramcapacity = 3 and slot[0].SOME = PCI and slot[1].SOME = PCI and slot[2].SOME = PCI and slot[3].SOME = ISA and slot[4].SOME = ISA and slot[5].SOME = ISA and slot[6].SOME = AGP and slot[7] = NONE) or (id = "Aopen AX59PRO 512KB" and cpuslot = Socket7 and controllertype = IDE and controllercount = 4 and mincpufreq = "75MHz" and maxcpufreq = "233MHz" and ramslot = SDRAM168Pin and ramcapacity = 3 and slot[0].SOME = PCI and slot[1].SOME = PCI and slot[2].SOME = PCI and slot[3].SOME = PCI and slot[4].SOME = ISA and slot[5].SOME = ISA and slot[6].SOME = AGP and slot[7] = NONE) or (id = "Aopen AX59PRO 512KB" and cpuslot = Socket7 and controllertype = IDE and controllercount = 4 and mincpufreq = "75MHz" and maxcpufreq = "233MHz" and ramslot = Std72Pin and ramcapacity = 3 and slot[0].SOME = PCI and slot[1].SOME = PCI and slot[2].SOME = PCI and slot[3].SOME = PCI and slot[4].SOME = ISA and slot[5].SOME = ISA and slot[6].SOME = AGP and slot[7] = NONE) or (id = "Acorp 6BX81 ATX" and cpuslot = Slot1 and controllertype = IDE and controllercount = 4 and mincpufreq = "233MHz" and maxcpufreq = "600MHz" and ramslot = SDRAM168Pin and ramcapacity = 3 and slot[0].SOME = PCI and slot[1].SOME = PCI and slot[2].SOME = PCI and slot[3].SOME = PCI and slot[4].SOME = ISA and slot[5].SOME = ISA and slot[6].SOME = ISA and slot[7].SOME = AGP) or (id = "Aopen MX6E ATX" and cpuslot = Slot1 and controllertype = IDE and controllercount = 4 and mincpufreq = "233MHz" and maxcpufreq = "333MHz" and ramslot = SDRAM168Pin and ramcapacity = 4 and slot[0].SOME = PCI and slot[1].SOME = PCI and slot[2].SOME = ISA and slot[3].SOME = ISA and slot[4].SOME = AGP and slot[5] = NONE and slot[6] = NONE and slot[7] = NONE) or (id = "Aopen AX6BP ATX" and cpuslot = Slot1 and controllertype = SCSI_UW2 and controllercount = 4 and mincpufreq = "233MHz" and maxcpufreq = "450MHz" and ramslot = SDRAM168Pin and ramcapacity = 3 and slot[0].SOME = PCI and slot[1].SOME = PCI and slot[2].SOME = PCI and slot[3].SOME = PCI and slot[4].SOME = ISA and slot[5].SOME = ISA and slot[6].SOME = ISA and slot[7].SOME = AGP) or (id = "Asus P5A-B" and cpuslot = Socket7 and controllertype = IDE and controllercount = 4 and mincpufreq = "233MHz" and maxcpufreq = "400MHz" and ramslot = SDRAM168Pin and ramcapacity = 3 and slot[0].SOME = PCI and slot[1].SOME = PCI and slot[2].SOME = PCI and slot[3].SOME = ISA and slot[4].SOME = ISA and slot[5].SOME = AGP and slot[6] = NONE and slot[7] = NONE) or (id = "Asus K7M ATX" and cpuslot = SlotA and controllertype = IDE and controllercount = 4 and mincpufreq = "500MHz" and maxcpufreq = "700MHz" and ramslot = SDRAM168Pin and ramcapacity = 3 and slot[0].SOME = PCI and slot[1].SOME = PCI and slot[2].SOME = PCI and slot[3].SOME = PCI and slot[4].SOME = PCI and slot[5].SOME = ISA and slot[6].SOME = AGP and slot[7] = NONE) or (id = "Microstar 6167 ATX" and cpuslot = SlotA and controllertype = IDE and controllercount = 4 and mincpufreq = "500MHz" and maxcpufreq = "700MHz" and ramslot = SDRAM168Pin and ramcapacity = 3 and slot[0].SOME = PCI and slot[1].SOME = PCI and slot[2].SOME = PCI and slot[3].SOME = PCI and slot[4].SOME = PCI and slot[5].SOME = ISA and slot[6].SOME = AGP and slot[7] = NONE) or (id = "Aopen AK-72 133 ATX" and cpuslot = SlotA and controllertype = IDE and controllercount = 4 and mincpufreq = "500MHz" and maxcpufreq = "800MHz" and ramslot = SDRAM168Pin and ramcapacity = 3 and slot[0].SOME = PCI and slot[1].SOME = PCI and slot[2].SOME = PCI and slot[3].SOME = PCI and slot[4].SOME = ISA and slot[5].SOME = AGP and slot[6] = NONE and slot[7] = NONE); }; Processor : { public id : ProcessorId; private cpuslot : CpuSlot; private freq : CpuFreq; rule (id = "AMD K6-2 266MHz 3DNOW" and cpuslot = Socket7 and freq = "266MHz") or (id = "AMD Athlon 800MHz" and cpuslot = SlotA and freq = "800MHz") or (id = "AMD Athlon 500MHz" and cpuslot = SlotA and freq = "500MHz") or (id = "Intel Pentium 233MHz MMX" and cpuslot = Socket7 and freq = "233MHz") or (id = "Intel Celeron A 366MHz" and cpuslot = Slot1 and freq = "366MHz") or (id = "Intel Pentium II 350MHz" and cpuslot = Slot1 and freq = "350MHz") or (id = "Intel Pentium III 600MHz" and cpuslot = Slot1 and freq = "600MHz") or (id = "Intel Pentium II 333MHz" and cpuslot = Slot1 and freq = "333MHz"); }; Harddisk : { public id : HarddiskId; private bus : HdBus; public capacity : HdCapacity; rule (id = "No hard disk" and bus = "IDE" and capacity = "0Gb") or (id = "No hard disk" and bus = "SCSI_UW2" and capacity = "0Gb") or (id = "IBM DeskStar 25GP 10,1GB" and bus = "IDE" and capacity = "10Gb") or (id = "IBM DeskStar 34GXP 34,2GB" and bus = "IDE" and capacity = "34Gb") or (id = "Maxtor DiamondMax 40+ 30,7GB" and bus = "IDE" and capacity = "31Gb") or (id = "Quantum Atlas IV 36,4GB" and bus = "SCSI_UW2" and capacity = "36Gb") or (id = "Seagate Barracuda 9 9,1GB" and bus = "SCSI_UW2" and capacity = "9Gb") or (id = "Western Digital Caviar Expert 27,3GB" and bus = "IDE" and capacity = "27Gb"); }; RamBlock : { public id : RamId; private slot : RamSlot; private capacity : RamCapacity; rule (id = "No RAM block" and slot = Std72Pin and capacity = "0Mb") or (id = "No RAM block" and slot = SDRAM168Pin and capacity = "0Mb") or (id = "Standard RAM u/Paritet 32MB" and slot = Std72Pin and capacity = "32Mb") or (id = "SDRAM PC100 NONAME 128MB" and slot = SDRAM168Pin and capacity = "128Mb") or (id = "SDRAM PC66 32MB" and slot = SDRAM168Pin and capacity = "32Mb") or (id = "SDRAM PC100 MCT 64MB" and slot = SDRAM168Pin and capacity = "64Mb") or (id = "SDRAM PC133 64MB" and slot = SDRAM168Pin and capacity = "64Mb") or (id = "SDRAM PC100 NONAME 256MB" and slot = SDRAM168Pin and capacity = "256Mb"); }; GraphicsCard : { public id : GraphicsCardId; private slot : Slot; rule (id = "Asus AGP-V3400TNT m/TV-In/TV-Out" and slot = AGP) or (id = "ATI Rage Fury m/TV-Out" and slot = AGP) or (id = "ATI All-In-Wonder 128 Bulk" and slot = PCI) or (id = "Creative Labs Graphics Blaster Riva TNT" and slot = AGP) or (id = "Diamond Monster Fusion" and slot = PCI) or (id = "Matrox Millennium G200" and slot = AGP) or (id = "Diamond Viper 770" and slot = AGP); }; /* Product definition */ variable public pc : { public motherboard : Motherboard; public processor : Processor; public harddisk : array 2 of Harddisk; public ramblock : array MaxRamBlocks of RamBlock; public graphics : GraphicsCard; public clock : CpuFreq; public memory : RamCapacity; rule /* Make sure the computer can be assembled and can power on */ /* Motherboard-CPU bindings */ motherboard.cpuslot = processor.cpuslot and order(processor.freq)>= order(motherboard.mincpufreq)and order(processor.freq)<= order(motherboard.maxcpufreq); /* Motherboard-HD bindings */ forall i in [0..1] : (motherboard.controllertype = harddisk[i].bus); /* Motherboard-RAM bindings */ /* bus must match */ forall i in [0..(MaxRamBlocks-1)] : (motherboard.ramslot = ramblock[i].slot); /* no more blocks than ram sockets */ (sum i in [0..(MaxRamBlocks-1)] : (case ramblock[i].id of "No RAM block" then 0 | default 1 esac)) <= motherboard.ramcapacity; /* they must be filled from slot 0 and onwards */ forall i in [1..(MaxRamBlocks-1)] : (forall j in [0..i-1] : (order(ramblock[i].id) > order("No RAM block") -> order(ramblock[j].id) > order("No RAM block"))); /* Motherboard-GraphicsCard bindings */ exist i in [0..7] : (case motherboard.slot[i] of SOME then motherboard.slot[i].SOME = graphics.slot | default false esac); /* Also make sure that the computer will boot */ /* At least one harddisk is needed for booting - and it must be placed first */ order(harddisk[0].id) > order ("No hard disk"); /* At least one ramblock is needed (And because of the bottom up rule, if we have got only one, it has to be in socket 0) */ order(ramblock[0].id) > order("No RAM block"); /* At last two 'auto-configure' parameters are set */ /* The prerequisite for just specifying a clock freq */ clock = processor.freq; /* The prerequisite for just specifying the total amount of memory */ order(memory) = sum i in [0..(MaxRamBlocks-1)]: (order(ramblock[i].capacity)); };