diff options
Diffstat (limited to 'Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/generated3valued.vql_deactivated')
-rw-r--r-- | Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/generated3valued.vql_deactivated | 23532 |
1 files changed, 23532 insertions, 0 deletions
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/generated3valued.vql_deactivated b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/generated3valued.vql_deactivated index 6d8fc404..f90ed439 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/generated3valued.vql_deactivated +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/generated3valued.vql_deactivated | |||
@@ -1470,3 +1470,23535 @@ pattern refineRelation_incomingTransitions_reference_Vertex_and_target_reference | |||
1470 | find mayInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to); | 1470 | find mayInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to); |
1471 | neg find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to); | 1471 | neg find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to); |
1472 | } | 1472 | } |
1473 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
1474 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" | ||
1475 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
1476 | |||
1477 | ////////// | ||
1478 | // 0. Util | ||
1479 | ////////// | ||
1480 | private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
1481 | PartialInterpretation.problem(interpretation,problem); | ||
1482 | } | ||
1483 | |||
1484 | ///////////////////////// | ||
1485 | // 0.1 Existence | ||
1486 | ///////////////////////// | ||
1487 | private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
1488 | find interpretation(problem,interpretation); | ||
1489 | LogicProblem.elements(problem,element); | ||
1490 | } or { | ||
1491 | find interpretation(problem,interpretation); | ||
1492 | PartialInterpretation.newElements(interpretation,element); | ||
1493 | } | ||
1494 | |||
1495 | private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
1496 | find mustExist(problem,interpretation,element); | ||
1497 | } or { | ||
1498 | find interpretation(problem,interpretation); | ||
1499 | neg find elementCloseWorld(element); | ||
1500 | PartialInterpretation.openWorldElements(interpretation,element); | ||
1501 | } | ||
1502 | |||
1503 | private pattern elementCloseWorld(element:DefinedElement) { | ||
1504 | PartialInterpretation.openWorldElements(i,element); | ||
1505 | PartialInterpretation.maxNewElements(i,0); | ||
1506 | } or { | ||
1507 | Scope.targetTypeInterpretation(scope,interpretation); | ||
1508 | PartialTypeInterpratation.elements(interpretation,element); | ||
1509 | Scope.maxNewElements(scope,0); | ||
1510 | } | ||
1511 | |||
1512 | //////////////////////// | ||
1513 | // 0.2 Equivalence | ||
1514 | //////////////////////// | ||
1515 | pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { | ||
1516 | find mayExist(problem,interpretation,a); | ||
1517 | find mayExist(problem,interpretation,b); | ||
1518 | a == b; | ||
1519 | } | ||
1520 | |||
1521 | //////////////////////// | ||
1522 | // 0.3 Required Patterns by TypeIndexer | ||
1523 | //////////////////////// | ||
1524 | private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { | ||
1525 | find interpretation(problem,interpretation); | ||
1526 | LogicProblem.types(problem,type); | ||
1527 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
1528 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
1529 | } | ||
1530 | |||
1531 | private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
1532 | find interpretation(problem,interpretation); | ||
1533 | LogicProblem.types(problem,type); | ||
1534 | TypeDefinition.elements(type,element); | ||
1535 | } or { | ||
1536 | find interpretation(problem,interpretation); | ||
1537 | find typeInterpretation(problem,interpretation,type,typeInterpretation); | ||
1538 | PartialComplexTypeInterpretation.elements(typeInterpretation,element); | ||
1539 | } | ||
1540 | |||
1541 | private pattern isPrimitive(element: PrimitiveElement) { | ||
1542 | PrimitiveElement(element); | ||
1543 | } | ||
1544 | |||
1545 | ////////// | ||
1546 | // 1. Problem-Specific Base Indexers | ||
1547 | ////////// | ||
1548 | // 1.1 Type Indexers | ||
1549 | ////////// | ||
1550 | // 1.1.1 primitive Type Indexers | ||
1551 | ////////// | ||
1552 | |||
1553 | ////////// | ||
1554 | // 1.1.2 domain-specific Type Indexers | ||
1555 | ////////// | ||
1556 | /** | ||
1557 | * An element must be an instance of type "FileSystem class". | ||
1558 | */ | ||
1559 | private pattern mustInstanceOfFileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
1560 | Type.name(type,"FileSystem class"); | ||
1561 | find directInstanceOf(problem,interpretation,element,type); | ||
1562 | } | ||
1563 | private pattern scopeDisallowsNewFileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
1564 | find interpretation(problem,interpretation); | ||
1565 | PartialInterpretation.scopes(interpretation,scope); | ||
1566 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
1567 | Scope.maxNewElements(scope,0); | ||
1568 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
1569 | Type.name(type,"FileSystem class"); | ||
1570 | } | ||
1571 | |||
1572 | /** | ||
1573 | * An element may be an instance of type "FileSystem class". | ||
1574 | */ | ||
1575 | private pattern mayInstanceOfFileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
1576 | { | ||
1577 | find interpretation(problem,interpretation); | ||
1578 | PartialInterpretation.newElements(interpretation,element); | ||
1579 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
1580 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
1581 | neg find scopeDisallowsNewFileSystem_class(problem, interpretation); | ||
1582 | neg find isPrimitive(element); | ||
1583 | } or { | ||
1584 | find interpretation(problem,interpretation); | ||
1585 | PartialInterpretation.openWorldElements(interpretation,element); | ||
1586 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
1587 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
1588 | neg find scopeDisallowsNewFileSystem_class(problem, interpretation); | ||
1589 | neg find isPrimitive(element); | ||
1590 | } or | ||
1591 | { find mustInstanceOfFileSystem_class(problem,interpretation,element); } | ||
1592 | /** | ||
1593 | * An element must be an instance of type "FSObject class". | ||
1594 | */ | ||
1595 | private pattern mustInstanceOfFSObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
1596 | Type.name(type,"FSObject class"); | ||
1597 | find directInstanceOf(problem,interpretation,element,type); | ||
1598 | } | ||
1599 | private pattern scopeDisallowsNewFSObject_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
1600 | find interpretation(problem,interpretation); | ||
1601 | PartialInterpretation.scopes(interpretation,scope); | ||
1602 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
1603 | Scope.maxNewElements(scope,0); | ||
1604 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
1605 | Type.name(type,"FSObject class"); | ||
1606 | } | ||
1607 | |||
1608 | /** | ||
1609 | * An element may be an instance of type "FSObject class". | ||
1610 | */ | ||
1611 | private pattern mayInstanceOfFSObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
1612 | { | ||
1613 | find interpretation(problem,interpretation); | ||
1614 | PartialInterpretation.newElements(interpretation,element); | ||
1615 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
1616 | neg find mustInstanceOfFile_class(problem,interpretation,element); | ||
1617 | neg find mustInstanceOfDir_class(problem,interpretation,element); | ||
1618 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
1619 | neg find scopeDisallowsNewFSObject_class(problem, interpretation); | ||
1620 | neg find isPrimitive(element); | ||
1621 | } or { | ||
1622 | find interpretation(problem,interpretation); | ||
1623 | PartialInterpretation.openWorldElements(interpretation,element); | ||
1624 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
1625 | neg find mustInstanceOfFile_class(problem,interpretation,element); | ||
1626 | neg find mustInstanceOfDir_class(problem,interpretation,element); | ||
1627 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
1628 | neg find scopeDisallowsNewFSObject_class(problem, interpretation); | ||
1629 | neg find isPrimitive(element); | ||
1630 | } or | ||
1631 | { find mustInstanceOfFSObject_class(problem,interpretation,element); } | ||
1632 | /** | ||
1633 | * An element must be an instance of type "Dir class". | ||
1634 | */ | ||
1635 | private pattern mustInstanceOfDir_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
1636 | Type.name(type,"Dir class"); | ||
1637 | find directInstanceOf(problem,interpretation,element,type); | ||
1638 | } | ||
1639 | private pattern scopeDisallowsNewDir_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
1640 | find interpretation(problem,interpretation); | ||
1641 | PartialInterpretation.scopes(interpretation,scope); | ||
1642 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
1643 | Scope.maxNewElements(scope,0); | ||
1644 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
1645 | Type.name(type,"Dir class"); | ||
1646 | } | ||
1647 | |||
1648 | /** | ||
1649 | * An element may be an instance of type "Dir class". | ||
1650 | */ | ||
1651 | private pattern mayInstanceOfDir_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
1652 | { | ||
1653 | find interpretation(problem,interpretation); | ||
1654 | PartialInterpretation.newElements(interpretation,element); | ||
1655 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
1656 | neg find mustInstanceOfFile_class(problem,interpretation,element); | ||
1657 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
1658 | neg find scopeDisallowsNewDir_class(problem, interpretation); | ||
1659 | neg find isPrimitive(element); | ||
1660 | } or { | ||
1661 | find interpretation(problem,interpretation); | ||
1662 | PartialInterpretation.openWorldElements(interpretation,element); | ||
1663 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
1664 | neg find mustInstanceOfFile_class(problem,interpretation,element); | ||
1665 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
1666 | neg find scopeDisallowsNewDir_class(problem, interpretation); | ||
1667 | neg find isPrimitive(element); | ||
1668 | } or | ||
1669 | { find mustInstanceOfDir_class(problem,interpretation,element); } | ||
1670 | /** | ||
1671 | * An element must be an instance of type "File class". | ||
1672 | */ | ||
1673 | private pattern mustInstanceOfFile_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
1674 | Type.name(type,"File class"); | ||
1675 | find directInstanceOf(problem,interpretation,element,type); | ||
1676 | } | ||
1677 | private pattern scopeDisallowsNewFile_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
1678 | find interpretation(problem,interpretation); | ||
1679 | PartialInterpretation.scopes(interpretation,scope); | ||
1680 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
1681 | Scope.maxNewElements(scope,0); | ||
1682 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
1683 | Type.name(type,"File class"); | ||
1684 | } | ||
1685 | |||
1686 | /** | ||
1687 | * An element may be an instance of type "File class". | ||
1688 | */ | ||
1689 | private pattern mayInstanceOfFile_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
1690 | { | ||
1691 | find interpretation(problem,interpretation); | ||
1692 | PartialInterpretation.newElements(interpretation,element); | ||
1693 | neg find mustInstanceOfDir_class(problem,interpretation,element); | ||
1694 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
1695 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
1696 | neg find scopeDisallowsNewFile_class(problem, interpretation); | ||
1697 | neg find isPrimitive(element); | ||
1698 | } or { | ||
1699 | find interpretation(problem,interpretation); | ||
1700 | PartialInterpretation.openWorldElements(interpretation,element); | ||
1701 | neg find mustInstanceOfDir_class(problem,interpretation,element); | ||
1702 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
1703 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
1704 | neg find scopeDisallowsNewFile_class(problem, interpretation); | ||
1705 | neg find isPrimitive(element); | ||
1706 | } or | ||
1707 | { find mustInstanceOfFile_class(problem,interpretation,element); } | ||
1708 | /** | ||
1709 | * An element must be an instance of type "Model class". | ||
1710 | */ | ||
1711 | private pattern mustInstanceOfModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
1712 | Type.name(type,"Model class"); | ||
1713 | find directInstanceOf(problem,interpretation,element,type); | ||
1714 | } | ||
1715 | private pattern scopeDisallowsNewModel_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
1716 | find interpretation(problem,interpretation); | ||
1717 | PartialInterpretation.scopes(interpretation,scope); | ||
1718 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
1719 | Scope.maxNewElements(scope,0); | ||
1720 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
1721 | Type.name(type,"Model class"); | ||
1722 | } | ||
1723 | |||
1724 | /** | ||
1725 | * An element may be an instance of type "Model class". | ||
1726 | */ | ||
1727 | private pattern mayInstanceOfModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
1728 | { | ||
1729 | find interpretation(problem,interpretation); | ||
1730 | PartialInterpretation.newElements(interpretation,element); | ||
1731 | neg find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element); | ||
1732 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
1733 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
1734 | neg find scopeDisallowsNewModel_class(problem, interpretation); | ||
1735 | neg find isPrimitive(element); | ||
1736 | } or { | ||
1737 | find interpretation(problem,interpretation); | ||
1738 | PartialInterpretation.openWorldElements(interpretation,element); | ||
1739 | neg find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element); | ||
1740 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
1741 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
1742 | neg find scopeDisallowsNewModel_class(problem, interpretation); | ||
1743 | neg find isPrimitive(element); | ||
1744 | } or | ||
1745 | { find mustInstanceOfModel_class(problem,interpretation,element); } | ||
1746 | /** | ||
1747 | * An element must be an instance of type "Model class DefinedPart". | ||
1748 | */ | ||
1749 | private pattern mustInstanceOfModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
1750 | Type.name(type,"Model class DefinedPart"); | ||
1751 | find directInstanceOf(problem,interpretation,element,type); | ||
1752 | } | ||
1753 | private pattern scopeDisallowsNewModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
1754 | find interpretation(problem,interpretation); | ||
1755 | PartialInterpretation.scopes(interpretation,scope); | ||
1756 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
1757 | Scope.maxNewElements(scope,0); | ||
1758 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
1759 | Type.name(type,"Model class DefinedPart"); | ||
1760 | } | ||
1761 | |||
1762 | /** | ||
1763 | * An element may be an instance of type "Model class DefinedPart". | ||
1764 | */ | ||
1765 | private pattern mayInstanceOfModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
1766 | { find mustInstanceOfModel_class_DefinedPart(problem,interpretation,element); } | ||
1767 | /** | ||
1768 | * An element must be an instance of type "Model class UndefinedPart". | ||
1769 | */ | ||
1770 | private pattern mustInstanceOfModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
1771 | Type.name(type,"Model class UndefinedPart"); | ||
1772 | find directInstanceOf(problem,interpretation,element,type); | ||
1773 | } | ||
1774 | private pattern scopeDisallowsNewModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
1775 | find interpretation(problem,interpretation); | ||
1776 | PartialInterpretation.scopes(interpretation,scope); | ||
1777 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
1778 | Scope.maxNewElements(scope,0); | ||
1779 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
1780 | Type.name(type,"Model class UndefinedPart"); | ||
1781 | } | ||
1782 | |||
1783 | /** | ||
1784 | * An element may be an instance of type "Model class UndefinedPart". | ||
1785 | */ | ||
1786 | private pattern mayInstanceOfModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
1787 | { | ||
1788 | find interpretation(problem,interpretation); | ||
1789 | PartialInterpretation.newElements(interpretation,element); | ||
1790 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
1791 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
1792 | neg find scopeDisallowsNewModel_class_UndefinedPart(problem, interpretation); | ||
1793 | neg find isPrimitive(element); | ||
1794 | } or { | ||
1795 | find interpretation(problem,interpretation); | ||
1796 | PartialInterpretation.openWorldElements(interpretation,element); | ||
1797 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
1798 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
1799 | neg find scopeDisallowsNewModel_class_UndefinedPart(problem, interpretation); | ||
1800 | neg find isPrimitive(element); | ||
1801 | } or | ||
1802 | { find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element); } | ||
1803 | |||
1804 | ////////// | ||
1805 | // 1.2 Relation Declaration Indexers | ||
1806 | ////////// | ||
1807 | /** | ||
1808 | * Matcher for detecting tuples t where []root reference FileSystem(source,target) | ||
1809 | */ | ||
1810 | private pattern mustInRelationroot_reference_FileSystem( | ||
1811 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1812 | source: DefinedElement, target:DefinedElement) | ||
1813 | { | ||
1814 | find interpretation(problem,interpretation); | ||
1815 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
1816 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"root reference FileSystem"); | ||
1817 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
1818 | BinaryElementRelationLink.param1(link,source); | ||
1819 | BinaryElementRelationLink.param2(link,target); | ||
1820 | } | ||
1821 | /** | ||
1822 | * Matcher for detecting tuples t where <>root reference FileSystem(source,target) | ||
1823 | */ | ||
1824 | private pattern mayInRelationroot_reference_FileSystem( | ||
1825 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1826 | source: DefinedElement, target:DefinedElement) | ||
1827 | { | ||
1828 | find interpretation(problem,interpretation); | ||
1829 | // The two endpoint of the link have to exist | ||
1830 | find mayExist(problem, interpretation, source); | ||
1831 | find mayExist(problem, interpretation, target); | ||
1832 | // Type consistency | ||
1833 | find mayInstanceOfFileSystem_class(problem,interpretation,source); | ||
1834 | find mayInstanceOfDir_class(problem,interpretation,target); | ||
1835 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
1836 | // the upper bound of the multiplicity should be considered. | ||
1837 | numberOfExistingReferences == count find mustInRelationroot_reference_FileSystem(problem,interpretation,source,_); | ||
1838 | check(numberOfExistingReferences < 1); | ||
1839 | // The reference is containment, then a new reference cannot be create if: | ||
1840 | // 1. Multiple parents | ||
1841 | neg find mustContains4(problem,interpretation,_,target); | ||
1842 | // 2. Circle in the containment hierarchy | ||
1843 | neg find mustTransitiveContains(source,target); | ||
1844 | } or { | ||
1845 | find mustInRelationroot_reference_FileSystem(problem,interpretation,source,target); | ||
1846 | } | ||
1847 | /** | ||
1848 | * Matcher for detecting tuples t where []live reference FileSystem(source,target) | ||
1849 | */ | ||
1850 | private pattern mustInRelationlive_reference_FileSystem( | ||
1851 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1852 | source: DefinedElement, target:DefinedElement) | ||
1853 | { | ||
1854 | find interpretation(problem,interpretation); | ||
1855 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
1856 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"live reference FileSystem"); | ||
1857 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
1858 | BinaryElementRelationLink.param1(link,source); | ||
1859 | BinaryElementRelationLink.param2(link,target); | ||
1860 | } | ||
1861 | /** | ||
1862 | * Matcher for detecting tuples t where <>live reference FileSystem(source,target) | ||
1863 | */ | ||
1864 | private pattern mayInRelationlive_reference_FileSystem( | ||
1865 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1866 | source: DefinedElement, target:DefinedElement) | ||
1867 | { | ||
1868 | find interpretation(problem,interpretation); | ||
1869 | // The two endpoint of the link have to exist | ||
1870 | find mayExist(problem, interpretation, source); | ||
1871 | find mayExist(problem, interpretation, target); | ||
1872 | // Type consistency | ||
1873 | find mayInstanceOfFileSystem_class(problem,interpretation,source); | ||
1874 | find mayInstanceOfFSObject_class(problem,interpretation,target); | ||
1875 | } or { | ||
1876 | find mustInRelationlive_reference_FileSystem(problem,interpretation,source,target); | ||
1877 | } | ||
1878 | /** | ||
1879 | * Matcher for detecting tuples t where []parent reference FSObject(source,target) | ||
1880 | */ | ||
1881 | private pattern mustInRelationparent_reference_FSObject( | ||
1882 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1883 | source: DefinedElement, target:DefinedElement) | ||
1884 | { | ||
1885 | find interpretation(problem,interpretation); | ||
1886 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
1887 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FSObject"); | ||
1888 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
1889 | BinaryElementRelationLink.param1(link,source); | ||
1890 | BinaryElementRelationLink.param2(link,target); | ||
1891 | } | ||
1892 | /** | ||
1893 | * Matcher for detecting tuples t where <>parent reference FSObject(source,target) | ||
1894 | */ | ||
1895 | private pattern mayInRelationparent_reference_FSObject( | ||
1896 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1897 | source: DefinedElement, target:DefinedElement) | ||
1898 | { | ||
1899 | find interpretation(problem,interpretation); | ||
1900 | // The two endpoint of the link have to exist | ||
1901 | find mayExist(problem, interpretation, source); | ||
1902 | find mayExist(problem, interpretation, target); | ||
1903 | // Type consistency | ||
1904 | find mayInstanceOfFSObject_class(problem,interpretation,source); | ||
1905 | find mayInstanceOfDir_class(problem,interpretation,target); | ||
1906 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
1907 | // the upper bound of the multiplicity should be considered. | ||
1908 | numberOfExistingReferences == count find mustInRelationparent_reference_FSObject(problem,interpretation,source,_); | ||
1909 | check(numberOfExistingReferences < 1); | ||
1910 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
1911 | // 1. Multiple parents | ||
1912 | neg find mustContains4(problem,interpretation,source,_); | ||
1913 | // 2. Circle in the containment hierarchy | ||
1914 | neg find mustTransitiveContains(source,target); | ||
1915 | } or { | ||
1916 | find mustInRelationparent_reference_FSObject(problem,interpretation,source,target); | ||
1917 | } | ||
1918 | /** | ||
1919 | * Matcher for detecting tuples t where []contents reference Dir(source,target) | ||
1920 | */ | ||
1921 | private pattern mustInRelationcontents_reference_Dir( | ||
1922 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1923 | source: DefinedElement, target:DefinedElement) | ||
1924 | { | ||
1925 | find interpretation(problem,interpretation); | ||
1926 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
1927 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"contents reference Dir"); | ||
1928 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
1929 | BinaryElementRelationLink.param1(link,source); | ||
1930 | BinaryElementRelationLink.param2(link,target); | ||
1931 | } | ||
1932 | /** | ||
1933 | * Matcher for detecting tuples t where <>contents reference Dir(source,target) | ||
1934 | */ | ||
1935 | private pattern mayInRelationcontents_reference_Dir( | ||
1936 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1937 | source: DefinedElement, target:DefinedElement) | ||
1938 | { | ||
1939 | find interpretation(problem,interpretation); | ||
1940 | // The two endpoint of the link have to exist | ||
1941 | find mayExist(problem, interpretation, source); | ||
1942 | find mayExist(problem, interpretation, target); | ||
1943 | // Type consistency | ||
1944 | find mayInstanceOfDir_class(problem,interpretation,source); | ||
1945 | find mayInstanceOfFSObject_class(problem,interpretation,target); | ||
1946 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
1947 | // the upper bound of the opposite reference multiplicity should be considered. | ||
1948 | numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FSObject(problem,interpretation,target,_); | ||
1949 | check(numberOfExistingOppositeReferences < 1); | ||
1950 | // The reference is containment, then a new reference cannot be create if: | ||
1951 | // 1. Multiple parents | ||
1952 | neg find mustContains4(problem,interpretation,_,target); | ||
1953 | // 2. Circle in the containment hierarchy | ||
1954 | neg find mustTransitiveContains(source,target); | ||
1955 | } or { | ||
1956 | find mustInRelationcontents_reference_Dir(problem,interpretation,source,target); | ||
1957 | } | ||
1958 | /** | ||
1959 | * Matcher for detecting tuples t where []filesystems reference Model(source,target) | ||
1960 | */ | ||
1961 | private pattern mustInRelationfilesystems_reference_Model( | ||
1962 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1963 | source: DefinedElement, target:DefinedElement) | ||
1964 | { | ||
1965 | find interpretation(problem,interpretation); | ||
1966 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
1967 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"filesystems reference Model"); | ||
1968 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
1969 | BinaryElementRelationLink.param1(link,source); | ||
1970 | BinaryElementRelationLink.param2(link,target); | ||
1971 | } | ||
1972 | /** | ||
1973 | * Matcher for detecting tuples t where <>filesystems reference Model(source,target) | ||
1974 | */ | ||
1975 | private pattern mayInRelationfilesystems_reference_Model( | ||
1976 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
1977 | source: DefinedElement, target:DefinedElement) | ||
1978 | { | ||
1979 | find interpretation(problem,interpretation); | ||
1980 | // The two endpoint of the link have to exist | ||
1981 | find mayExist(problem, interpretation, source); | ||
1982 | find mayExist(problem, interpretation, target); | ||
1983 | // Type consistency | ||
1984 | find mayInstanceOfModel_class(problem,interpretation,source); | ||
1985 | find mayInstanceOfFileSystem_class(problem,interpretation,target); | ||
1986 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
1987 | // the upper bound of the multiplicity should be considered. | ||
1988 | numberOfExistingReferences == count find mustInRelationfilesystems_reference_Model(problem,interpretation,source,_); | ||
1989 | check(numberOfExistingReferences < 1); | ||
1990 | // The reference is containment, then a new reference cannot be create if: | ||
1991 | // 1. Multiple parents | ||
1992 | neg find mustContains4(problem,interpretation,_,target); | ||
1993 | // 2. Circle in the containment hierarchy | ||
1994 | neg find mustTransitiveContains(source,target); | ||
1995 | } or { | ||
1996 | find mustInRelationfilesystems_reference_Model(problem,interpretation,source,target); | ||
1997 | } | ||
1998 | /** | ||
1999 | * Matcher for detecting tuples t where []otherFSObjects reference Model(source,target) | ||
2000 | */ | ||
2001 | private pattern mustInRelationotherFSObjects_reference_Model( | ||
2002 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2003 | source: DefinedElement, target:DefinedElement) | ||
2004 | { | ||
2005 | find interpretation(problem,interpretation); | ||
2006 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
2007 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"otherFSObjects reference Model"); | ||
2008 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
2009 | BinaryElementRelationLink.param1(link,source); | ||
2010 | BinaryElementRelationLink.param2(link,target); | ||
2011 | } | ||
2012 | /** | ||
2013 | * Matcher for detecting tuples t where <>otherFSObjects reference Model(source,target) | ||
2014 | */ | ||
2015 | private pattern mayInRelationotherFSObjects_reference_Model( | ||
2016 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2017 | source: DefinedElement, target:DefinedElement) | ||
2018 | { | ||
2019 | find interpretation(problem,interpretation); | ||
2020 | // The two endpoint of the link have to exist | ||
2021 | find mayExist(problem, interpretation, source); | ||
2022 | find mayExist(problem, interpretation, target); | ||
2023 | // Type consistency | ||
2024 | find mayInstanceOfModel_class(problem,interpretation,source); | ||
2025 | find mayInstanceOfFSObject_class(problem,interpretation,target); | ||
2026 | // The reference is containment, then a new reference cannot be create if: | ||
2027 | // 1. Multiple parents | ||
2028 | neg find mustContains4(problem,interpretation,_,target); | ||
2029 | // 2. Circle in the containment hierarchy | ||
2030 | neg find mustTransitiveContains(source,target); | ||
2031 | } or { | ||
2032 | find mustInRelationotherFSObjects_reference_Model(problem,interpretation,source,target); | ||
2033 | } | ||
2034 | |||
2035 | ////////// | ||
2036 | // 1.3 Relation Definition Indexers | ||
2037 | ////////// | ||
2038 | |||
2039 | ////////// | ||
2040 | // 1.4 Containment Indexer | ||
2041 | ////////// | ||
2042 | private pattern mustContains2(source: DefinedElement, target: DefinedElement) { | ||
2043 | find mustContains4(_,_,source,target); | ||
2044 | } | ||
2045 | |||
2046 | private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, | ||
2047 | source: DefinedElement, target: DefinedElement) | ||
2048 | { find mustInRelationroot_reference_FileSystem(problem,interpretation,source,target); }or | ||
2049 | |||
2050 | { find mustInRelationcontents_reference_Dir(problem,interpretation,source,target); }or | ||
2051 | |||
2052 | { find mustInRelationfilesystems_reference_Model(problem,interpretation,source,target); }or | ||
2053 | |||
2054 | { find mustInRelationotherFSObjects_reference_Model(problem,interpretation,source,target); } | ||
2055 | |||
2056 | private pattern mustTransitiveContains(source,target) { | ||
2057 | find mustContains2+(source,target); | ||
2058 | } | ||
2059 | |||
2060 | ////////// | ||
2061 | // 2. Invalidation Indexers | ||
2062 | ////////// | ||
2063 | // 2.1 Invalidated by WF Queries | ||
2064 | ////////// | ||
2065 | |||
2066 | ////////// | ||
2067 | // 3. Unfinishedness Indexers | ||
2068 | ////////// | ||
2069 | // 3.1 Unfinishedness Measured by Multiplicity | ||
2070 | ////////// | ||
2071 | pattern unfinishedLowerMultiplicity_root_reference_FileSystem(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
2072 | find interpretation(problem,interpretation); | ||
2073 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
2074 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"root reference FileSystem"); | ||
2075 | find mustInstanceOfFileSystem_class(problem,interpretation,object); | ||
2076 | numberOfExistingReferences == count find mustInRelationroot_reference_FileSystem(problem,interpretation,object,_); | ||
2077 | check(numberOfExistingReferences < 1); | ||
2078 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
2079 | } | ||
2080 | pattern unfinishedLowerMultiplicity_filesystems_reference_Model(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
2081 | find interpretation(problem,interpretation); | ||
2082 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
2083 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"filesystems reference Model"); | ||
2084 | find mustInstanceOfModel_class(problem,interpretation,object); | ||
2085 | numberOfExistingReferences == count find mustInRelationfilesystems_reference_Model(problem,interpretation,object,_); | ||
2086 | check(numberOfExistingReferences < 1); | ||
2087 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
2088 | } | ||
2089 | |||
2090 | ////////// | ||
2091 | // 3.2 Unfinishedness Measured by WF Queries | ||
2092 | ////////// | ||
2093 | |||
2094 | ////////// | ||
2095 | // 4. Refinement Indexers | ||
2096 | ////////// | ||
2097 | // 4.1 Object constructors | ||
2098 | ////////// | ||
2099 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) | ||
2100 | { | ||
2101 | find interpretation(problem,interpretation); | ||
2102 | find mustInstanceOfFile_class(problem,interpretation,root); | ||
2103 | find mustExist(problem, interpretation, root); | ||
2104 | }or{ | ||
2105 | find interpretation(problem,interpretation); | ||
2106 | find mustInstanceOfDir_class(problem,interpretation,root); | ||
2107 | find mustExist(problem, interpretation, root); | ||
2108 | }or{ | ||
2109 | find interpretation(problem,interpretation); | ||
2110 | find mustInstanceOfFileSystem_class(problem,interpretation,root); | ||
2111 | find mustExist(problem, interpretation, root); | ||
2112 | }or{ | ||
2113 | find interpretation(problem,interpretation); | ||
2114 | find mustInstanceOfModel_class(problem,interpretation,root); | ||
2115 | find mustExist(problem, interpretation, root); | ||
2116 | }or{ | ||
2117 | find interpretation(problem,interpretation); | ||
2118 | find mustInstanceOfFSObject_class(problem,interpretation,root); | ||
2119 | find mustExist(problem, interpretation, root); | ||
2120 | }or{ | ||
2121 | find interpretation(problem,interpretation); | ||
2122 | find mustInstanceOfModel_class_DefinedPart(problem,interpretation,root); | ||
2123 | find mustExist(problem, interpretation, root); | ||
2124 | }or{ | ||
2125 | find interpretation(problem,interpretation); | ||
2126 | find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,root); | ||
2127 | find mustExist(problem, interpretation, root); | ||
2128 | } | ||
2129 | pattern createObject_Model_class_UndefinedPart( | ||
2130 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2131 | typeInterpretation:PartialComplexTypeInterpretation) | ||
2132 | { | ||
2133 | find interpretation(problem,interpretation); | ||
2134 | neg find hasElementInContainment(problem,interpretation); | ||
2135 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
2136 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Model class UndefinedPart"); | ||
2137 | find mayInstanceOfModel_class_UndefinedPart(problem,interpretation,newObject); | ||
2138 | find mayExist(problem, interpretation, newObject); | ||
2139 | neg find mustExist(problem, interpretation, newObject); | ||
2140 | } | ||
2141 | pattern createObject_Dir_class_by_root_reference_FileSystem( | ||
2142 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2143 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
2144 | container:DefinedElement) | ||
2145 | { | ||
2146 | find interpretation(problem,interpretation); | ||
2147 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
2148 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class"); | ||
2149 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
2150 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"root reference FileSystem"); | ||
2151 | find mustInstanceOfFileSystem_class(problem,interpretation,container); | ||
2152 | find mayInstanceOfDir_class(problem,interpretation,newObject); | ||
2153 | find mayInRelationroot_reference_FileSystem(problem,interpretation,container,newObject); | ||
2154 | find mustExist(problem, interpretation, container); | ||
2155 | neg find mustExist(problem, interpretation, newObject); | ||
2156 | } | ||
2157 | pattern createObject_Dir_class_by_contents_reference_Dir_with_parent_reference_FSObject( | ||
2158 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2159 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
2160 | container:DefinedElement) | ||
2161 | { | ||
2162 | find interpretation(problem,interpretation); | ||
2163 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
2164 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class"); | ||
2165 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
2166 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"contents reference Dir"); | ||
2167 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
2168 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FSObject"); | ||
2169 | find mustInstanceOfDir_class(problem,interpretation,container); | ||
2170 | find mayInstanceOfDir_class(problem,interpretation,newObject); | ||
2171 | find mayInRelationcontents_reference_Dir(problem,interpretation,container,newObject); | ||
2172 | find mustExist(problem, interpretation, container); | ||
2173 | neg find mustExist(problem, interpretation, newObject); | ||
2174 | } | ||
2175 | pattern createObject_Dir_class_by_otherFSObjects_reference_Model( | ||
2176 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2177 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
2178 | container:DefinedElement) | ||
2179 | { | ||
2180 | find interpretation(problem,interpretation); | ||
2181 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
2182 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class"); | ||
2183 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
2184 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"otherFSObjects reference Model"); | ||
2185 | find mustInstanceOfModel_class(problem,interpretation,container); | ||
2186 | find mayInstanceOfDir_class(problem,interpretation,newObject); | ||
2187 | find mayInRelationotherFSObjects_reference_Model(problem,interpretation,container,newObject); | ||
2188 | find mustExist(problem, interpretation, container); | ||
2189 | neg find mustExist(problem, interpretation, newObject); | ||
2190 | } | ||
2191 | pattern createObject_Dir_class( | ||
2192 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2193 | typeInterpretation:PartialComplexTypeInterpretation) | ||
2194 | { | ||
2195 | find interpretation(problem,interpretation); | ||
2196 | neg find hasElementInContainment(problem,interpretation); | ||
2197 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
2198 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class"); | ||
2199 | find mayInstanceOfDir_class(problem,interpretation,newObject); | ||
2200 | find mayExist(problem, interpretation, newObject); | ||
2201 | neg find mustExist(problem, interpretation, newObject); | ||
2202 | } | ||
2203 | pattern createObject_File_class_by_contents_reference_Dir_with_parent_reference_FSObject( | ||
2204 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2205 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
2206 | container:DefinedElement) | ||
2207 | { | ||
2208 | find interpretation(problem,interpretation); | ||
2209 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
2210 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"File class"); | ||
2211 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
2212 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"contents reference Dir"); | ||
2213 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
2214 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FSObject"); | ||
2215 | find mustInstanceOfDir_class(problem,interpretation,container); | ||
2216 | find mayInstanceOfFile_class(problem,interpretation,newObject); | ||
2217 | find mayInRelationcontents_reference_Dir(problem,interpretation,container,newObject); | ||
2218 | find mustExist(problem, interpretation, container); | ||
2219 | neg find mustExist(problem, interpretation, newObject); | ||
2220 | } | ||
2221 | pattern createObject_File_class_by_otherFSObjects_reference_Model( | ||
2222 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2223 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
2224 | container:DefinedElement) | ||
2225 | { | ||
2226 | find interpretation(problem,interpretation); | ||
2227 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
2228 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"File class"); | ||
2229 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
2230 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"otherFSObjects reference Model"); | ||
2231 | find mustInstanceOfModel_class(problem,interpretation,container); | ||
2232 | find mayInstanceOfFile_class(problem,interpretation,newObject); | ||
2233 | find mayInRelationotherFSObjects_reference_Model(problem,interpretation,container,newObject); | ||
2234 | find mustExist(problem, interpretation, container); | ||
2235 | neg find mustExist(problem, interpretation, newObject); | ||
2236 | } | ||
2237 | pattern createObject_File_class( | ||
2238 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2239 | typeInterpretation:PartialComplexTypeInterpretation) | ||
2240 | { | ||
2241 | find interpretation(problem,interpretation); | ||
2242 | neg find hasElementInContainment(problem,interpretation); | ||
2243 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
2244 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"File class"); | ||
2245 | find mayInstanceOfFile_class(problem,interpretation,newObject); | ||
2246 | find mayExist(problem, interpretation, newObject); | ||
2247 | neg find mustExist(problem, interpretation, newObject); | ||
2248 | } | ||
2249 | pattern createObject_FileSystem_class_by_filesystems_reference_Model( | ||
2250 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2251 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
2252 | container:DefinedElement) | ||
2253 | { | ||
2254 | find interpretation(problem,interpretation); | ||
2255 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
2256 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FileSystem class"); | ||
2257 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
2258 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"filesystems reference Model"); | ||
2259 | find mustInstanceOfModel_class(problem,interpretation,container); | ||
2260 | find mayInstanceOfFileSystem_class(problem,interpretation,newObject); | ||
2261 | find mayInRelationfilesystems_reference_Model(problem,interpretation,container,newObject); | ||
2262 | find mustExist(problem, interpretation, container); | ||
2263 | neg find mustExist(problem, interpretation, newObject); | ||
2264 | } | ||
2265 | pattern createObject_FileSystem_class( | ||
2266 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2267 | typeInterpretation:PartialComplexTypeInterpretation) | ||
2268 | { | ||
2269 | find interpretation(problem,interpretation); | ||
2270 | neg find hasElementInContainment(problem,interpretation); | ||
2271 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
2272 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FileSystem class"); | ||
2273 | find mayInstanceOfFileSystem_class(problem,interpretation,newObject); | ||
2274 | find mayExist(problem, interpretation, newObject); | ||
2275 | neg find mustExist(problem, interpretation, newObject); | ||
2276 | } | ||
2277 | |||
2278 | ////////// | ||
2279 | // 4.2 Type refinement | ||
2280 | ////////// | ||
2281 | pattern refineTypeTo_Model_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
2282 | find interpretation(problem,interpretation); | ||
2283 | PartialInterpretation.newElements(interpretation,element); | ||
2284 | find mayInstanceOfModel_class_UndefinedPart(problem,interpretation,element); | ||
2285 | neg find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element); | ||
2286 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
2287 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
2288 | } | ||
2289 | pattern refineTypeTo_Dir_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
2290 | find interpretation(problem,interpretation); | ||
2291 | PartialInterpretation.newElements(interpretation,element); | ||
2292 | find mayInstanceOfDir_class(problem,interpretation,element); | ||
2293 | neg find mustInstanceOfDir_class(problem,interpretation,element); | ||
2294 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
2295 | neg find mustInstanceOfFile_class(problem,interpretation,element); | ||
2296 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
2297 | } | ||
2298 | pattern refineTypeTo_File_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
2299 | find interpretation(problem,interpretation); | ||
2300 | PartialInterpretation.newElements(interpretation,element); | ||
2301 | find mayInstanceOfFile_class(problem,interpretation,element); | ||
2302 | neg find mustInstanceOfDir_class(problem,interpretation,element); | ||
2303 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
2304 | neg find mustInstanceOfFile_class(problem,interpretation,element); | ||
2305 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
2306 | } | ||
2307 | pattern refineTypeTo_FileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
2308 | find interpretation(problem,interpretation); | ||
2309 | PartialInterpretation.newElements(interpretation,element); | ||
2310 | find mayInstanceOfFileSystem_class(problem,interpretation,element); | ||
2311 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
2312 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
2313 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
2314 | } | ||
2315 | |||
2316 | ////////// | ||
2317 | // 4.3 Relation refinement | ||
2318 | ////////// | ||
2319 | pattern refineRelation_live_reference_FileSystem( | ||
2320 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2321 | relationIterpretation:PartialRelationInterpretation, | ||
2322 | from: DefinedElement, to: DefinedElement) | ||
2323 | { | ||
2324 | find interpretation(problem,interpretation); | ||
2325 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
2326 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"live reference FileSystem"); | ||
2327 | find mustExist(problem, interpretation, from); | ||
2328 | find mustExist(problem, interpretation, to); | ||
2329 | find mustInstanceOfFileSystem_class(problem,interpretation,from); | ||
2330 | find mustInstanceOfFSObject_class(problem,interpretation,to); | ||
2331 | find mayInRelationlive_reference_FileSystem(problem,interpretation,from,to); | ||
2332 | neg find mustInRelationlive_reference_FileSystem(problem,interpretation,from,to); | ||
2333 | } | ||
2334 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
2335 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" | ||
2336 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
2337 | |||
2338 | ////////// | ||
2339 | // 0. Util | ||
2340 | ////////// | ||
2341 | private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
2342 | PartialInterpretation.problem(interpretation,problem); | ||
2343 | } | ||
2344 | |||
2345 | ///////////////////////// | ||
2346 | // 0.1 Existence | ||
2347 | ///////////////////////// | ||
2348 | private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
2349 | find interpretation(problem,interpretation); | ||
2350 | LogicProblem.elements(problem,element); | ||
2351 | } or { | ||
2352 | find interpretation(problem,interpretation); | ||
2353 | PartialInterpretation.newElements(interpretation,element); | ||
2354 | } | ||
2355 | |||
2356 | private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
2357 | find mustExist(problem,interpretation,element); | ||
2358 | } or { | ||
2359 | find interpretation(problem,interpretation); | ||
2360 | neg find elementCloseWorld(element); | ||
2361 | PartialInterpretation.openWorldElements(interpretation,element); | ||
2362 | } | ||
2363 | |||
2364 | private pattern elementCloseWorld(element:DefinedElement) { | ||
2365 | PartialInterpretation.openWorldElements(i,element); | ||
2366 | PartialInterpretation.maxNewElements(i,0); | ||
2367 | } or { | ||
2368 | Scope.targetTypeInterpretation(scope,interpretation); | ||
2369 | PartialTypeInterpratation.elements(interpretation,element); | ||
2370 | Scope.maxNewElements(scope,0); | ||
2371 | } | ||
2372 | |||
2373 | //////////////////////// | ||
2374 | // 0.2 Equivalence | ||
2375 | //////////////////////// | ||
2376 | pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { | ||
2377 | find mayExist(problem,interpretation,a); | ||
2378 | find mayExist(problem,interpretation,b); | ||
2379 | a == b; | ||
2380 | } | ||
2381 | |||
2382 | //////////////////////// | ||
2383 | // 0.3 Required Patterns by TypeIndexer | ||
2384 | //////////////////////// | ||
2385 | private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { | ||
2386 | find interpretation(problem,interpretation); | ||
2387 | LogicProblem.types(problem,type); | ||
2388 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
2389 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
2390 | } | ||
2391 | |||
2392 | private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
2393 | find interpretation(problem,interpretation); | ||
2394 | LogicProblem.types(problem,type); | ||
2395 | TypeDefinition.elements(type,element); | ||
2396 | } or { | ||
2397 | find interpretation(problem,interpretation); | ||
2398 | find typeInterpretation(problem,interpretation,type,typeInterpretation); | ||
2399 | PartialComplexTypeInterpretation.elements(typeInterpretation,element); | ||
2400 | } | ||
2401 | |||
2402 | private pattern isPrimitive(element: PrimitiveElement) { | ||
2403 | PrimitiveElement(element); | ||
2404 | } | ||
2405 | |||
2406 | ////////// | ||
2407 | // 1. Problem-Specific Base Indexers | ||
2408 | ////////// | ||
2409 | // 1.1 Type Indexers | ||
2410 | ////////// | ||
2411 | // 1.1.1 primitive Type Indexers | ||
2412 | ////////// | ||
2413 | |||
2414 | ////////// | ||
2415 | // 1.1.2 domain-specific Type Indexers | ||
2416 | ////////// | ||
2417 | /** | ||
2418 | * An element must be an instance of type "FileSystem class". | ||
2419 | */ | ||
2420 | private pattern mustInstanceOfFileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
2421 | Type.name(type,"FileSystem class"); | ||
2422 | find directInstanceOf(problem,interpretation,element,type); | ||
2423 | } | ||
2424 | private pattern scopeDisallowsNewFileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
2425 | find interpretation(problem,interpretation); | ||
2426 | PartialInterpretation.scopes(interpretation,scope); | ||
2427 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
2428 | Scope.maxNewElements(scope,0); | ||
2429 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
2430 | Type.name(type,"FileSystem class"); | ||
2431 | } | ||
2432 | |||
2433 | /** | ||
2434 | * An element may be an instance of type "FileSystem class". | ||
2435 | */ | ||
2436 | private pattern mayInstanceOfFileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
2437 | { | ||
2438 | find interpretation(problem,interpretation); | ||
2439 | PartialInterpretation.newElements(interpretation,element); | ||
2440 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
2441 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
2442 | neg find scopeDisallowsNewFileSystem_class(problem, interpretation); | ||
2443 | neg find isPrimitive(element); | ||
2444 | } or { | ||
2445 | find interpretation(problem,interpretation); | ||
2446 | PartialInterpretation.openWorldElements(interpretation,element); | ||
2447 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
2448 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
2449 | neg find scopeDisallowsNewFileSystem_class(problem, interpretation); | ||
2450 | neg find isPrimitive(element); | ||
2451 | } or | ||
2452 | { find mustInstanceOfFileSystem_class(problem,interpretation,element); } | ||
2453 | /** | ||
2454 | * An element must be an instance of type "FSObject class". | ||
2455 | */ | ||
2456 | private pattern mustInstanceOfFSObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
2457 | Type.name(type,"FSObject class"); | ||
2458 | find directInstanceOf(problem,interpretation,element,type); | ||
2459 | } | ||
2460 | private pattern scopeDisallowsNewFSObject_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
2461 | find interpretation(problem,interpretation); | ||
2462 | PartialInterpretation.scopes(interpretation,scope); | ||
2463 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
2464 | Scope.maxNewElements(scope,0); | ||
2465 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
2466 | Type.name(type,"FSObject class"); | ||
2467 | } | ||
2468 | |||
2469 | /** | ||
2470 | * An element may be an instance of type "FSObject class". | ||
2471 | */ | ||
2472 | private pattern mayInstanceOfFSObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
2473 | { | ||
2474 | find interpretation(problem,interpretation); | ||
2475 | PartialInterpretation.newElements(interpretation,element); | ||
2476 | neg find mustInstanceOfFile_class(problem,interpretation,element); | ||
2477 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
2478 | neg find mustInstanceOfDir_class(problem,interpretation,element); | ||
2479 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
2480 | neg find scopeDisallowsNewFSObject_class(problem, interpretation); | ||
2481 | neg find isPrimitive(element); | ||
2482 | } or { | ||
2483 | find interpretation(problem,interpretation); | ||
2484 | PartialInterpretation.openWorldElements(interpretation,element); | ||
2485 | neg find mustInstanceOfFile_class(problem,interpretation,element); | ||
2486 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
2487 | neg find mustInstanceOfDir_class(problem,interpretation,element); | ||
2488 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
2489 | neg find scopeDisallowsNewFSObject_class(problem, interpretation); | ||
2490 | neg find isPrimitive(element); | ||
2491 | } or | ||
2492 | { find mustInstanceOfFSObject_class(problem,interpretation,element); } | ||
2493 | /** | ||
2494 | * An element must be an instance of type "Dir class". | ||
2495 | */ | ||
2496 | private pattern mustInstanceOfDir_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
2497 | Type.name(type,"Dir class"); | ||
2498 | find directInstanceOf(problem,interpretation,element,type); | ||
2499 | } | ||
2500 | private pattern scopeDisallowsNewDir_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
2501 | find interpretation(problem,interpretation); | ||
2502 | PartialInterpretation.scopes(interpretation,scope); | ||
2503 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
2504 | Scope.maxNewElements(scope,0); | ||
2505 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
2506 | Type.name(type,"Dir class"); | ||
2507 | } | ||
2508 | |||
2509 | /** | ||
2510 | * An element may be an instance of type "Dir class". | ||
2511 | */ | ||
2512 | private pattern mayInstanceOfDir_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
2513 | { | ||
2514 | find interpretation(problem,interpretation); | ||
2515 | PartialInterpretation.newElements(interpretation,element); | ||
2516 | neg find mustInstanceOfFile_class(problem,interpretation,element); | ||
2517 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
2518 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
2519 | neg find scopeDisallowsNewDir_class(problem, interpretation); | ||
2520 | neg find isPrimitive(element); | ||
2521 | } or { | ||
2522 | find interpretation(problem,interpretation); | ||
2523 | PartialInterpretation.openWorldElements(interpretation,element); | ||
2524 | neg find mustInstanceOfFile_class(problem,interpretation,element); | ||
2525 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
2526 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
2527 | neg find scopeDisallowsNewDir_class(problem, interpretation); | ||
2528 | neg find isPrimitive(element); | ||
2529 | } or | ||
2530 | { find mustInstanceOfDir_class(problem,interpretation,element); } | ||
2531 | /** | ||
2532 | * An element must be an instance of type "File class". | ||
2533 | */ | ||
2534 | private pattern mustInstanceOfFile_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
2535 | Type.name(type,"File class"); | ||
2536 | find directInstanceOf(problem,interpretation,element,type); | ||
2537 | } | ||
2538 | private pattern scopeDisallowsNewFile_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
2539 | find interpretation(problem,interpretation); | ||
2540 | PartialInterpretation.scopes(interpretation,scope); | ||
2541 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
2542 | Scope.maxNewElements(scope,0); | ||
2543 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
2544 | Type.name(type,"File class"); | ||
2545 | } | ||
2546 | |||
2547 | /** | ||
2548 | * An element may be an instance of type "File class". | ||
2549 | */ | ||
2550 | private pattern mayInstanceOfFile_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
2551 | { | ||
2552 | find interpretation(problem,interpretation); | ||
2553 | PartialInterpretation.newElements(interpretation,element); | ||
2554 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
2555 | neg find mustInstanceOfDir_class(problem,interpretation,element); | ||
2556 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
2557 | neg find scopeDisallowsNewFile_class(problem, interpretation); | ||
2558 | neg find isPrimitive(element); | ||
2559 | } or { | ||
2560 | find interpretation(problem,interpretation); | ||
2561 | PartialInterpretation.openWorldElements(interpretation,element); | ||
2562 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
2563 | neg find mustInstanceOfDir_class(problem,interpretation,element); | ||
2564 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
2565 | neg find scopeDisallowsNewFile_class(problem, interpretation); | ||
2566 | neg find isPrimitive(element); | ||
2567 | } or | ||
2568 | { find mustInstanceOfFile_class(problem,interpretation,element); } | ||
2569 | /** | ||
2570 | * An element must be an instance of type "Model class". | ||
2571 | */ | ||
2572 | private pattern mustInstanceOfModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
2573 | Type.name(type,"Model class"); | ||
2574 | find directInstanceOf(problem,interpretation,element,type); | ||
2575 | } | ||
2576 | private pattern scopeDisallowsNewModel_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
2577 | find interpretation(problem,interpretation); | ||
2578 | PartialInterpretation.scopes(interpretation,scope); | ||
2579 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
2580 | Scope.maxNewElements(scope,0); | ||
2581 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
2582 | Type.name(type,"Model class"); | ||
2583 | } | ||
2584 | |||
2585 | /** | ||
2586 | * An element may be an instance of type "Model class". | ||
2587 | */ | ||
2588 | private pattern mayInstanceOfModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
2589 | { | ||
2590 | find interpretation(problem,interpretation); | ||
2591 | PartialInterpretation.newElements(interpretation,element); | ||
2592 | neg find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element); | ||
2593 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
2594 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
2595 | neg find scopeDisallowsNewModel_class(problem, interpretation); | ||
2596 | neg find isPrimitive(element); | ||
2597 | } or { | ||
2598 | find interpretation(problem,interpretation); | ||
2599 | PartialInterpretation.openWorldElements(interpretation,element); | ||
2600 | neg find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element); | ||
2601 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
2602 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
2603 | neg find scopeDisallowsNewModel_class(problem, interpretation); | ||
2604 | neg find isPrimitive(element); | ||
2605 | } or | ||
2606 | { find mustInstanceOfModel_class(problem,interpretation,element); } | ||
2607 | /** | ||
2608 | * An element must be an instance of type "Model class DefinedPart". | ||
2609 | */ | ||
2610 | private pattern mustInstanceOfModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
2611 | Type.name(type,"Model class DefinedPart"); | ||
2612 | find directInstanceOf(problem,interpretation,element,type); | ||
2613 | } | ||
2614 | private pattern scopeDisallowsNewModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
2615 | find interpretation(problem,interpretation); | ||
2616 | PartialInterpretation.scopes(interpretation,scope); | ||
2617 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
2618 | Scope.maxNewElements(scope,0); | ||
2619 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
2620 | Type.name(type,"Model class DefinedPart"); | ||
2621 | } | ||
2622 | |||
2623 | /** | ||
2624 | * An element may be an instance of type "Model class DefinedPart". | ||
2625 | */ | ||
2626 | private pattern mayInstanceOfModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
2627 | { find mustInstanceOfModel_class_DefinedPart(problem,interpretation,element); } | ||
2628 | /** | ||
2629 | * An element must be an instance of type "Model class UndefinedPart". | ||
2630 | */ | ||
2631 | private pattern mustInstanceOfModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
2632 | Type.name(type,"Model class UndefinedPart"); | ||
2633 | find directInstanceOf(problem,interpretation,element,type); | ||
2634 | } | ||
2635 | private pattern scopeDisallowsNewModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
2636 | find interpretation(problem,interpretation); | ||
2637 | PartialInterpretation.scopes(interpretation,scope); | ||
2638 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
2639 | Scope.maxNewElements(scope,0); | ||
2640 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
2641 | Type.name(type,"Model class UndefinedPart"); | ||
2642 | } | ||
2643 | |||
2644 | /** | ||
2645 | * An element may be an instance of type "Model class UndefinedPart". | ||
2646 | */ | ||
2647 | private pattern mayInstanceOfModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
2648 | { | ||
2649 | find interpretation(problem,interpretation); | ||
2650 | PartialInterpretation.newElements(interpretation,element); | ||
2651 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
2652 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
2653 | neg find scopeDisallowsNewModel_class_UndefinedPart(problem, interpretation); | ||
2654 | neg find isPrimitive(element); | ||
2655 | } or { | ||
2656 | find interpretation(problem,interpretation); | ||
2657 | PartialInterpretation.openWorldElements(interpretation,element); | ||
2658 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
2659 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
2660 | neg find scopeDisallowsNewModel_class_UndefinedPart(problem, interpretation); | ||
2661 | neg find isPrimitive(element); | ||
2662 | } or | ||
2663 | { find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element); } | ||
2664 | |||
2665 | ////////// | ||
2666 | // 1.2 Relation Declaration Indexers | ||
2667 | ////////// | ||
2668 | /** | ||
2669 | * Matcher for detecting tuples t where []root reference FileSystem(source,target) | ||
2670 | */ | ||
2671 | private pattern mustInRelationroot_reference_FileSystem( | ||
2672 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2673 | source: DefinedElement, target:DefinedElement) | ||
2674 | { | ||
2675 | find interpretation(problem,interpretation); | ||
2676 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
2677 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"root reference FileSystem"); | ||
2678 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
2679 | BinaryElementRelationLink.param1(link,source); | ||
2680 | BinaryElementRelationLink.param2(link,target); | ||
2681 | } | ||
2682 | /** | ||
2683 | * Matcher for detecting tuples t where <>root reference FileSystem(source,target) | ||
2684 | */ | ||
2685 | private pattern mayInRelationroot_reference_FileSystem( | ||
2686 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2687 | source: DefinedElement, target:DefinedElement) | ||
2688 | { | ||
2689 | find interpretation(problem,interpretation); | ||
2690 | // The two endpoint of the link have to exist | ||
2691 | find mayExist(problem, interpretation, source); | ||
2692 | find mayExist(problem, interpretation, target); | ||
2693 | // Type consistency | ||
2694 | find mayInstanceOfFileSystem_class(problem,interpretation,source); | ||
2695 | find mayInstanceOfDir_class(problem,interpretation,target); | ||
2696 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
2697 | // the upper bound of the multiplicity should be considered. | ||
2698 | numberOfExistingReferences == count find mustInRelationroot_reference_FileSystem(problem,interpretation,source,_); | ||
2699 | check(numberOfExistingReferences < 1); | ||
2700 | // The reference is containment, then a new reference cannot be create if: | ||
2701 | // 1. Multiple parents | ||
2702 | neg find mustContains4(problem,interpretation,_,target); | ||
2703 | // 2. Circle in the containment hierarchy | ||
2704 | neg find mustTransitiveContains(source,target); | ||
2705 | } or { | ||
2706 | find mustInRelationroot_reference_FileSystem(problem,interpretation,source,target); | ||
2707 | } | ||
2708 | /** | ||
2709 | * Matcher for detecting tuples t where []live reference FileSystem(source,target) | ||
2710 | */ | ||
2711 | private pattern mustInRelationlive_reference_FileSystem( | ||
2712 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2713 | source: DefinedElement, target:DefinedElement) | ||
2714 | { | ||
2715 | find interpretation(problem,interpretation); | ||
2716 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
2717 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"live reference FileSystem"); | ||
2718 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
2719 | BinaryElementRelationLink.param1(link,source); | ||
2720 | BinaryElementRelationLink.param2(link,target); | ||
2721 | } | ||
2722 | /** | ||
2723 | * Matcher for detecting tuples t where <>live reference FileSystem(source,target) | ||
2724 | */ | ||
2725 | private pattern mayInRelationlive_reference_FileSystem( | ||
2726 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2727 | source: DefinedElement, target:DefinedElement) | ||
2728 | { | ||
2729 | find interpretation(problem,interpretation); | ||
2730 | // The two endpoint of the link have to exist | ||
2731 | find mayExist(problem, interpretation, source); | ||
2732 | find mayExist(problem, interpretation, target); | ||
2733 | // Type consistency | ||
2734 | find mayInstanceOfFileSystem_class(problem,interpretation,source); | ||
2735 | find mayInstanceOfFSObject_class(problem,interpretation,target); | ||
2736 | } or { | ||
2737 | find mustInRelationlive_reference_FileSystem(problem,interpretation,source,target); | ||
2738 | } | ||
2739 | /** | ||
2740 | * Matcher for detecting tuples t where []parent reference FSObject(source,target) | ||
2741 | */ | ||
2742 | private pattern mustInRelationparent_reference_FSObject( | ||
2743 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2744 | source: DefinedElement, target:DefinedElement) | ||
2745 | { | ||
2746 | find interpretation(problem,interpretation); | ||
2747 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
2748 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FSObject"); | ||
2749 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
2750 | BinaryElementRelationLink.param1(link,source); | ||
2751 | BinaryElementRelationLink.param2(link,target); | ||
2752 | } | ||
2753 | /** | ||
2754 | * Matcher for detecting tuples t where <>parent reference FSObject(source,target) | ||
2755 | */ | ||
2756 | private pattern mayInRelationparent_reference_FSObject( | ||
2757 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2758 | source: DefinedElement, target:DefinedElement) | ||
2759 | { | ||
2760 | find interpretation(problem,interpretation); | ||
2761 | // The two endpoint of the link have to exist | ||
2762 | find mayExist(problem, interpretation, source); | ||
2763 | find mayExist(problem, interpretation, target); | ||
2764 | // Type consistency | ||
2765 | find mayInstanceOfFSObject_class(problem,interpretation,source); | ||
2766 | find mayInstanceOfDir_class(problem,interpretation,target); | ||
2767 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
2768 | // the upper bound of the multiplicity should be considered. | ||
2769 | numberOfExistingReferences == count find mustInRelationparent_reference_FSObject(problem,interpretation,source,_); | ||
2770 | check(numberOfExistingReferences < 1); | ||
2771 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
2772 | // 1. Multiple parents | ||
2773 | neg find mustContains4(problem,interpretation,source,_); | ||
2774 | // 2. Circle in the containment hierarchy | ||
2775 | neg find mustTransitiveContains(source,target); | ||
2776 | } or { | ||
2777 | find mustInRelationparent_reference_FSObject(problem,interpretation,source,target); | ||
2778 | } | ||
2779 | /** | ||
2780 | * Matcher for detecting tuples t where []contents reference Dir(source,target) | ||
2781 | */ | ||
2782 | private pattern mustInRelationcontents_reference_Dir( | ||
2783 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2784 | source: DefinedElement, target:DefinedElement) | ||
2785 | { | ||
2786 | find interpretation(problem,interpretation); | ||
2787 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
2788 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"contents reference Dir"); | ||
2789 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
2790 | BinaryElementRelationLink.param1(link,source); | ||
2791 | BinaryElementRelationLink.param2(link,target); | ||
2792 | } | ||
2793 | /** | ||
2794 | * Matcher for detecting tuples t where <>contents reference Dir(source,target) | ||
2795 | */ | ||
2796 | private pattern mayInRelationcontents_reference_Dir( | ||
2797 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2798 | source: DefinedElement, target:DefinedElement) | ||
2799 | { | ||
2800 | find interpretation(problem,interpretation); | ||
2801 | // The two endpoint of the link have to exist | ||
2802 | find mayExist(problem, interpretation, source); | ||
2803 | find mayExist(problem, interpretation, target); | ||
2804 | // Type consistency | ||
2805 | find mayInstanceOfDir_class(problem,interpretation,source); | ||
2806 | find mayInstanceOfFSObject_class(problem,interpretation,target); | ||
2807 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
2808 | // the upper bound of the opposite reference multiplicity should be considered. | ||
2809 | numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FSObject(problem,interpretation,target,_); | ||
2810 | check(numberOfExistingOppositeReferences < 1); | ||
2811 | // The reference is containment, then a new reference cannot be create if: | ||
2812 | // 1. Multiple parents | ||
2813 | neg find mustContains4(problem,interpretation,_,target); | ||
2814 | // 2. Circle in the containment hierarchy | ||
2815 | neg find mustTransitiveContains(source,target); | ||
2816 | } or { | ||
2817 | find mustInRelationcontents_reference_Dir(problem,interpretation,source,target); | ||
2818 | } | ||
2819 | /** | ||
2820 | * Matcher for detecting tuples t where []filesystems reference Model(source,target) | ||
2821 | */ | ||
2822 | private pattern mustInRelationfilesystems_reference_Model( | ||
2823 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2824 | source: DefinedElement, target:DefinedElement) | ||
2825 | { | ||
2826 | find interpretation(problem,interpretation); | ||
2827 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
2828 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"filesystems reference Model"); | ||
2829 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
2830 | BinaryElementRelationLink.param1(link,source); | ||
2831 | BinaryElementRelationLink.param2(link,target); | ||
2832 | } | ||
2833 | /** | ||
2834 | * Matcher for detecting tuples t where <>filesystems reference Model(source,target) | ||
2835 | */ | ||
2836 | private pattern mayInRelationfilesystems_reference_Model( | ||
2837 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2838 | source: DefinedElement, target:DefinedElement) | ||
2839 | { | ||
2840 | find interpretation(problem,interpretation); | ||
2841 | // The two endpoint of the link have to exist | ||
2842 | find mayExist(problem, interpretation, source); | ||
2843 | find mayExist(problem, interpretation, target); | ||
2844 | // Type consistency | ||
2845 | find mayInstanceOfModel_class(problem,interpretation,source); | ||
2846 | find mayInstanceOfFileSystem_class(problem,interpretation,target); | ||
2847 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
2848 | // the upper bound of the multiplicity should be considered. | ||
2849 | numberOfExistingReferences == count find mustInRelationfilesystems_reference_Model(problem,interpretation,source,_); | ||
2850 | check(numberOfExistingReferences < 1); | ||
2851 | // The reference is containment, then a new reference cannot be create if: | ||
2852 | // 1. Multiple parents | ||
2853 | neg find mustContains4(problem,interpretation,_,target); | ||
2854 | // 2. Circle in the containment hierarchy | ||
2855 | neg find mustTransitiveContains(source,target); | ||
2856 | } or { | ||
2857 | find mustInRelationfilesystems_reference_Model(problem,interpretation,source,target); | ||
2858 | } | ||
2859 | /** | ||
2860 | * Matcher for detecting tuples t where []otherFSObjects reference Model(source,target) | ||
2861 | */ | ||
2862 | private pattern mustInRelationotherFSObjects_reference_Model( | ||
2863 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2864 | source: DefinedElement, target:DefinedElement) | ||
2865 | { | ||
2866 | find interpretation(problem,interpretation); | ||
2867 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
2868 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"otherFSObjects reference Model"); | ||
2869 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
2870 | BinaryElementRelationLink.param1(link,source); | ||
2871 | BinaryElementRelationLink.param2(link,target); | ||
2872 | } | ||
2873 | /** | ||
2874 | * Matcher for detecting tuples t where <>otherFSObjects reference Model(source,target) | ||
2875 | */ | ||
2876 | private pattern mayInRelationotherFSObjects_reference_Model( | ||
2877 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2878 | source: DefinedElement, target:DefinedElement) | ||
2879 | { | ||
2880 | find interpretation(problem,interpretation); | ||
2881 | // The two endpoint of the link have to exist | ||
2882 | find mayExist(problem, interpretation, source); | ||
2883 | find mayExist(problem, interpretation, target); | ||
2884 | // Type consistency | ||
2885 | find mayInstanceOfModel_class(problem,interpretation,source); | ||
2886 | find mayInstanceOfFSObject_class(problem,interpretation,target); | ||
2887 | // The reference is containment, then a new reference cannot be create if: | ||
2888 | // 1. Multiple parents | ||
2889 | neg find mustContains4(problem,interpretation,_,target); | ||
2890 | // 2. Circle in the containment hierarchy | ||
2891 | neg find mustTransitiveContains(source,target); | ||
2892 | } or { | ||
2893 | find mustInRelationotherFSObjects_reference_Model(problem,interpretation,source,target); | ||
2894 | } | ||
2895 | |||
2896 | ////////// | ||
2897 | // 1.3 Relation Definition Indexers | ||
2898 | ////////// | ||
2899 | |||
2900 | ////////// | ||
2901 | // 1.4 Containment Indexer | ||
2902 | ////////// | ||
2903 | private pattern mustContains2(source: DefinedElement, target: DefinedElement) { | ||
2904 | find mustContains4(_,_,source,target); | ||
2905 | } | ||
2906 | |||
2907 | private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, | ||
2908 | source: DefinedElement, target: DefinedElement) | ||
2909 | { find mustInRelationroot_reference_FileSystem(problem,interpretation,source,target); }or | ||
2910 | |||
2911 | { find mustInRelationcontents_reference_Dir(problem,interpretation,source,target); }or | ||
2912 | |||
2913 | { find mustInRelationfilesystems_reference_Model(problem,interpretation,source,target); }or | ||
2914 | |||
2915 | { find mustInRelationotherFSObjects_reference_Model(problem,interpretation,source,target); } | ||
2916 | |||
2917 | private pattern mustTransitiveContains(source,target) { | ||
2918 | find mustContains2+(source,target); | ||
2919 | } | ||
2920 | |||
2921 | ////////// | ||
2922 | // 2. Invalidation Indexers | ||
2923 | ////////// | ||
2924 | // 2.1 Invalidated by WF Queries | ||
2925 | ////////// | ||
2926 | |||
2927 | ////////// | ||
2928 | // 3. Unfinishedness Indexers | ||
2929 | ////////// | ||
2930 | // 3.1 Unfinishedness Measured by Multiplicity | ||
2931 | ////////// | ||
2932 | pattern unfinishedLowerMultiplicity_root_reference_FileSystem(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
2933 | find interpretation(problem,interpretation); | ||
2934 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
2935 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"root reference FileSystem"); | ||
2936 | find mustInstanceOfFileSystem_class(problem,interpretation,object); | ||
2937 | numberOfExistingReferences == count find mustInRelationroot_reference_FileSystem(problem,interpretation,object,_); | ||
2938 | check(numberOfExistingReferences < 1); | ||
2939 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
2940 | } | ||
2941 | pattern unfinishedLowerMultiplicity_filesystems_reference_Model(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
2942 | find interpretation(problem,interpretation); | ||
2943 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
2944 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"filesystems reference Model"); | ||
2945 | find mustInstanceOfModel_class(problem,interpretation,object); | ||
2946 | numberOfExistingReferences == count find mustInRelationfilesystems_reference_Model(problem,interpretation,object,_); | ||
2947 | check(numberOfExistingReferences < 1); | ||
2948 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
2949 | } | ||
2950 | |||
2951 | ////////// | ||
2952 | // 3.2 Unfinishedness Measured by WF Queries | ||
2953 | ////////// | ||
2954 | |||
2955 | ////////// | ||
2956 | // 4. Refinement Indexers | ||
2957 | ////////// | ||
2958 | // 4.1 Object constructors | ||
2959 | ////////// | ||
2960 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) | ||
2961 | { | ||
2962 | find interpretation(problem,interpretation); | ||
2963 | find mustInstanceOfFile_class(problem,interpretation,root); | ||
2964 | find mustExist(problem, interpretation, root); | ||
2965 | }or{ | ||
2966 | find interpretation(problem,interpretation); | ||
2967 | find mustInstanceOfDir_class(problem,interpretation,root); | ||
2968 | find mustExist(problem, interpretation, root); | ||
2969 | }or{ | ||
2970 | find interpretation(problem,interpretation); | ||
2971 | find mustInstanceOfFileSystem_class(problem,interpretation,root); | ||
2972 | find mustExist(problem, interpretation, root); | ||
2973 | }or{ | ||
2974 | find interpretation(problem,interpretation); | ||
2975 | find mustInstanceOfModel_class(problem,interpretation,root); | ||
2976 | find mustExist(problem, interpretation, root); | ||
2977 | }or{ | ||
2978 | find interpretation(problem,interpretation); | ||
2979 | find mustInstanceOfFSObject_class(problem,interpretation,root); | ||
2980 | find mustExist(problem, interpretation, root); | ||
2981 | }or{ | ||
2982 | find interpretation(problem,interpretation); | ||
2983 | find mustInstanceOfModel_class_DefinedPart(problem,interpretation,root); | ||
2984 | find mustExist(problem, interpretation, root); | ||
2985 | }or{ | ||
2986 | find interpretation(problem,interpretation); | ||
2987 | find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,root); | ||
2988 | find mustExist(problem, interpretation, root); | ||
2989 | } | ||
2990 | pattern createObject_Model_class_UndefinedPart( | ||
2991 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
2992 | typeInterpretation:PartialComplexTypeInterpretation) | ||
2993 | { | ||
2994 | find interpretation(problem,interpretation); | ||
2995 | neg find hasElementInContainment(problem,interpretation); | ||
2996 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
2997 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Model class UndefinedPart"); | ||
2998 | find mayInstanceOfModel_class_UndefinedPart(problem,interpretation,newObject); | ||
2999 | find mayExist(problem, interpretation, newObject); | ||
3000 | neg find mustExist(problem, interpretation, newObject); | ||
3001 | } | ||
3002 | pattern createObject_File_class_by_contents_reference_Dir_with_parent_reference_FSObject( | ||
3003 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3004 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
3005 | container:DefinedElement) | ||
3006 | { | ||
3007 | find interpretation(problem,interpretation); | ||
3008 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
3009 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"File class"); | ||
3010 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
3011 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"contents reference Dir"); | ||
3012 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
3013 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FSObject"); | ||
3014 | find mustInstanceOfDir_class(problem,interpretation,container); | ||
3015 | find mayInstanceOfFile_class(problem,interpretation,newObject); | ||
3016 | find mayInRelationcontents_reference_Dir(problem,interpretation,container,newObject); | ||
3017 | find mustExist(problem, interpretation, container); | ||
3018 | neg find mustExist(problem, interpretation, newObject); | ||
3019 | } | ||
3020 | pattern createObject_File_class_by_otherFSObjects_reference_Model( | ||
3021 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3022 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
3023 | container:DefinedElement) | ||
3024 | { | ||
3025 | find interpretation(problem,interpretation); | ||
3026 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
3027 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"File class"); | ||
3028 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
3029 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"otherFSObjects reference Model"); | ||
3030 | find mustInstanceOfModel_class(problem,interpretation,container); | ||
3031 | find mayInstanceOfFile_class(problem,interpretation,newObject); | ||
3032 | find mayInRelationotherFSObjects_reference_Model(problem,interpretation,container,newObject); | ||
3033 | find mustExist(problem, interpretation, container); | ||
3034 | neg find mustExist(problem, interpretation, newObject); | ||
3035 | } | ||
3036 | pattern createObject_File_class( | ||
3037 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3038 | typeInterpretation:PartialComplexTypeInterpretation) | ||
3039 | { | ||
3040 | find interpretation(problem,interpretation); | ||
3041 | neg find hasElementInContainment(problem,interpretation); | ||
3042 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
3043 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"File class"); | ||
3044 | find mayInstanceOfFile_class(problem,interpretation,newObject); | ||
3045 | find mayExist(problem, interpretation, newObject); | ||
3046 | neg find mustExist(problem, interpretation, newObject); | ||
3047 | } | ||
3048 | pattern createObject_Dir_class_by_root_reference_FileSystem( | ||
3049 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3050 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
3051 | container:DefinedElement) | ||
3052 | { | ||
3053 | find interpretation(problem,interpretation); | ||
3054 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
3055 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class"); | ||
3056 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
3057 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"root reference FileSystem"); | ||
3058 | find mustInstanceOfFileSystem_class(problem,interpretation,container); | ||
3059 | find mayInstanceOfDir_class(problem,interpretation,newObject); | ||
3060 | find mayInRelationroot_reference_FileSystem(problem,interpretation,container,newObject); | ||
3061 | find mustExist(problem, interpretation, container); | ||
3062 | neg find mustExist(problem, interpretation, newObject); | ||
3063 | } | ||
3064 | pattern createObject_Dir_class_by_contents_reference_Dir_with_parent_reference_FSObject( | ||
3065 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3066 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
3067 | container:DefinedElement) | ||
3068 | { | ||
3069 | find interpretation(problem,interpretation); | ||
3070 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
3071 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class"); | ||
3072 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
3073 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"contents reference Dir"); | ||
3074 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
3075 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FSObject"); | ||
3076 | find mustInstanceOfDir_class(problem,interpretation,container); | ||
3077 | find mayInstanceOfDir_class(problem,interpretation,newObject); | ||
3078 | find mayInRelationcontents_reference_Dir(problem,interpretation,container,newObject); | ||
3079 | find mustExist(problem, interpretation, container); | ||
3080 | neg find mustExist(problem, interpretation, newObject); | ||
3081 | } | ||
3082 | pattern createObject_Dir_class_by_otherFSObjects_reference_Model( | ||
3083 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3084 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
3085 | container:DefinedElement) | ||
3086 | { | ||
3087 | find interpretation(problem,interpretation); | ||
3088 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
3089 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class"); | ||
3090 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
3091 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"otherFSObjects reference Model"); | ||
3092 | find mustInstanceOfModel_class(problem,interpretation,container); | ||
3093 | find mayInstanceOfDir_class(problem,interpretation,newObject); | ||
3094 | find mayInRelationotherFSObjects_reference_Model(problem,interpretation,container,newObject); | ||
3095 | find mustExist(problem, interpretation, container); | ||
3096 | neg find mustExist(problem, interpretation, newObject); | ||
3097 | } | ||
3098 | pattern createObject_Dir_class( | ||
3099 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3100 | typeInterpretation:PartialComplexTypeInterpretation) | ||
3101 | { | ||
3102 | find interpretation(problem,interpretation); | ||
3103 | neg find hasElementInContainment(problem,interpretation); | ||
3104 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
3105 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class"); | ||
3106 | find mayInstanceOfDir_class(problem,interpretation,newObject); | ||
3107 | find mayExist(problem, interpretation, newObject); | ||
3108 | neg find mustExist(problem, interpretation, newObject); | ||
3109 | } | ||
3110 | pattern createObject_FileSystem_class_by_filesystems_reference_Model( | ||
3111 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3112 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
3113 | container:DefinedElement) | ||
3114 | { | ||
3115 | find interpretation(problem,interpretation); | ||
3116 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
3117 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FileSystem class"); | ||
3118 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
3119 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"filesystems reference Model"); | ||
3120 | find mustInstanceOfModel_class(problem,interpretation,container); | ||
3121 | find mayInstanceOfFileSystem_class(problem,interpretation,newObject); | ||
3122 | find mayInRelationfilesystems_reference_Model(problem,interpretation,container,newObject); | ||
3123 | find mustExist(problem, interpretation, container); | ||
3124 | neg find mustExist(problem, interpretation, newObject); | ||
3125 | } | ||
3126 | pattern createObject_FileSystem_class( | ||
3127 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3128 | typeInterpretation:PartialComplexTypeInterpretation) | ||
3129 | { | ||
3130 | find interpretation(problem,interpretation); | ||
3131 | neg find hasElementInContainment(problem,interpretation); | ||
3132 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
3133 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FileSystem class"); | ||
3134 | find mayInstanceOfFileSystem_class(problem,interpretation,newObject); | ||
3135 | find mayExist(problem, interpretation, newObject); | ||
3136 | neg find mustExist(problem, interpretation, newObject); | ||
3137 | } | ||
3138 | |||
3139 | ////////// | ||
3140 | // 4.2 Type refinement | ||
3141 | ////////// | ||
3142 | pattern refineTypeTo_Model_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
3143 | find interpretation(problem,interpretation); | ||
3144 | PartialInterpretation.newElements(interpretation,element); | ||
3145 | find mayInstanceOfModel_class_UndefinedPart(problem,interpretation,element); | ||
3146 | neg find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element); | ||
3147 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
3148 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
3149 | } | ||
3150 | pattern refineTypeTo_File_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
3151 | find interpretation(problem,interpretation); | ||
3152 | PartialInterpretation.newElements(interpretation,element); | ||
3153 | find mayInstanceOfFile_class(problem,interpretation,element); | ||
3154 | neg find mustInstanceOfFile_class(problem,interpretation,element); | ||
3155 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
3156 | neg find mustInstanceOfDir_class(problem,interpretation,element); | ||
3157 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
3158 | } | ||
3159 | pattern refineTypeTo_Dir_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
3160 | find interpretation(problem,interpretation); | ||
3161 | PartialInterpretation.newElements(interpretation,element); | ||
3162 | find mayInstanceOfDir_class(problem,interpretation,element); | ||
3163 | neg find mustInstanceOfFile_class(problem,interpretation,element); | ||
3164 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
3165 | neg find mustInstanceOfDir_class(problem,interpretation,element); | ||
3166 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
3167 | } | ||
3168 | pattern refineTypeTo_FileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
3169 | find interpretation(problem,interpretation); | ||
3170 | PartialInterpretation.newElements(interpretation,element); | ||
3171 | find mayInstanceOfFileSystem_class(problem,interpretation,element); | ||
3172 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
3173 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
3174 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
3175 | } | ||
3176 | |||
3177 | ////////// | ||
3178 | // 4.3 Relation refinement | ||
3179 | ////////// | ||
3180 | pattern refineRelation_live_reference_FileSystem( | ||
3181 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3182 | relationIterpretation:PartialRelationInterpretation, | ||
3183 | from: DefinedElement, to: DefinedElement) | ||
3184 | { | ||
3185 | find interpretation(problem,interpretation); | ||
3186 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
3187 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"live reference FileSystem"); | ||
3188 | find mustExist(problem, interpretation, from); | ||
3189 | find mustExist(problem, interpretation, to); | ||
3190 | find mustInstanceOfFileSystem_class(problem,interpretation,from); | ||
3191 | find mustInstanceOfFSObject_class(problem,interpretation,to); | ||
3192 | find mayInRelationlive_reference_FileSystem(problem,interpretation,from,to); | ||
3193 | neg find mustInRelationlive_reference_FileSystem(problem,interpretation,from,to); | ||
3194 | } | ||
3195 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
3196 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" | ||
3197 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
3198 | |||
3199 | ////////// | ||
3200 | // 0. Util | ||
3201 | ////////// | ||
3202 | private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
3203 | PartialInterpretation.problem(interpretation,problem); | ||
3204 | } | ||
3205 | |||
3206 | ///////////////////////// | ||
3207 | // 0.1 Existence | ||
3208 | ///////////////////////// | ||
3209 | private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3210 | find interpretation(problem,interpretation); | ||
3211 | LogicProblem.elements(problem,element); | ||
3212 | } or { | ||
3213 | find interpretation(problem,interpretation); | ||
3214 | PartialInterpretation.newElements(interpretation,element); | ||
3215 | } | ||
3216 | |||
3217 | private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3218 | find mustExist(problem,interpretation,element); | ||
3219 | } or { | ||
3220 | find interpretation(problem,interpretation); | ||
3221 | neg find elementCloseWorld(element); | ||
3222 | PartialInterpretation.openWorldElements(interpretation,element); | ||
3223 | } | ||
3224 | |||
3225 | private pattern elementCloseWorld(element:DefinedElement) { | ||
3226 | PartialInterpretation.openWorldElements(i,element); | ||
3227 | PartialInterpretation.maxNewElements(i,0); | ||
3228 | } or { | ||
3229 | Scope.targetTypeInterpretation(scope,interpretation); | ||
3230 | PartialTypeInterpratation.elements(interpretation,element); | ||
3231 | Scope.maxNewElements(scope,0); | ||
3232 | } | ||
3233 | |||
3234 | //////////////////////// | ||
3235 | // 0.2 Equivalence | ||
3236 | //////////////////////// | ||
3237 | pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { | ||
3238 | find mayExist(problem,interpretation,a); | ||
3239 | find mayExist(problem,interpretation,b); | ||
3240 | a == b; | ||
3241 | } | ||
3242 | |||
3243 | //////////////////////// | ||
3244 | // 0.3 Required Patterns by TypeIndexer | ||
3245 | //////////////////////// | ||
3246 | private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { | ||
3247 | find interpretation(problem,interpretation); | ||
3248 | LogicProblem.types(problem,type); | ||
3249 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
3250 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
3251 | } | ||
3252 | |||
3253 | private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
3254 | find interpretation(problem,interpretation); | ||
3255 | LogicProblem.types(problem,type); | ||
3256 | TypeDefinition.elements(type,element); | ||
3257 | } or { | ||
3258 | find interpretation(problem,interpretation); | ||
3259 | find typeInterpretation(problem,interpretation,type,typeInterpretation); | ||
3260 | PartialComplexTypeInterpretation.elements(typeInterpretation,element); | ||
3261 | } | ||
3262 | |||
3263 | private pattern isPrimitive(element: PrimitiveElement) { | ||
3264 | PrimitiveElement(element); | ||
3265 | } | ||
3266 | |||
3267 | ////////// | ||
3268 | // 1. Problem-Specific Base Indexers | ||
3269 | ////////// | ||
3270 | // 1.1 Type Indexers | ||
3271 | ////////// | ||
3272 | // 1.1.1 primitive Type Indexers | ||
3273 | ////////// | ||
3274 | |||
3275 | ////////// | ||
3276 | // 1.1.2 domain-specific Type Indexers | ||
3277 | ////////// | ||
3278 | /** | ||
3279 | * An element must be an instance of type "Pseudostate class". | ||
3280 | */ | ||
3281 | private pattern mustInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3282 | Type.name(type,"Pseudostate class"); | ||
3283 | find directInstanceOf(problem,interpretation,element,type); | ||
3284 | } | ||
3285 | private pattern scopeDisallowsNewPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
3286 | find interpretation(problem,interpretation); | ||
3287 | PartialInterpretation.scopes(interpretation,scope); | ||
3288 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
3289 | Scope.maxNewElements(scope,0); | ||
3290 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
3291 | Type.name(type,"Pseudostate class"); | ||
3292 | } | ||
3293 | |||
3294 | /** | ||
3295 | * An element may be an instance of type "Pseudostate class". | ||
3296 | */ | ||
3297 | private pattern mayInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
3298 | { | ||
3299 | find interpretation(problem,interpretation); | ||
3300 | PartialInterpretation.newElements(interpretation,element); | ||
3301 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3302 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
3303 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
3304 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3305 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3306 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
3307 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
3308 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
3309 | neg find scopeDisallowsNewPseudostate_class(problem, interpretation); | ||
3310 | neg find isPrimitive(element); | ||
3311 | } or { | ||
3312 | find interpretation(problem,interpretation); | ||
3313 | PartialInterpretation.openWorldElements(interpretation,element); | ||
3314 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3315 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
3316 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
3317 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3318 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3319 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
3320 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
3321 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
3322 | neg find scopeDisallowsNewPseudostate_class(problem, interpretation); | ||
3323 | neg find isPrimitive(element); | ||
3324 | } or | ||
3325 | { find mustInstanceOfPseudostate_class(problem,interpretation,element); } | ||
3326 | /** | ||
3327 | * An element must be an instance of type "Vertex class". | ||
3328 | */ | ||
3329 | private pattern mustInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3330 | Type.name(type,"Vertex class"); | ||
3331 | find directInstanceOf(problem,interpretation,element,type); | ||
3332 | } | ||
3333 | private pattern scopeDisallowsNewVertex_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
3334 | find interpretation(problem,interpretation); | ||
3335 | PartialInterpretation.scopes(interpretation,scope); | ||
3336 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
3337 | Scope.maxNewElements(scope,0); | ||
3338 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
3339 | Type.name(type,"Vertex class"); | ||
3340 | } | ||
3341 | |||
3342 | /** | ||
3343 | * An element may be an instance of type "Vertex class". | ||
3344 | */ | ||
3345 | private pattern mayInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
3346 | { | ||
3347 | find interpretation(problem,interpretation); | ||
3348 | PartialInterpretation.newElements(interpretation,element); | ||
3349 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3350 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
3351 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3352 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3353 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
3354 | neg find scopeDisallowsNewVertex_class(problem, interpretation); | ||
3355 | neg find isPrimitive(element); | ||
3356 | } or { | ||
3357 | find interpretation(problem,interpretation); | ||
3358 | PartialInterpretation.openWorldElements(interpretation,element); | ||
3359 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3360 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
3361 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3362 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3363 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
3364 | neg find scopeDisallowsNewVertex_class(problem, interpretation); | ||
3365 | neg find isPrimitive(element); | ||
3366 | } or | ||
3367 | { find mustInstanceOfVertex_class(problem,interpretation,element); } | ||
3368 | /** | ||
3369 | * An element must be an instance of type "Region class". | ||
3370 | */ | ||
3371 | private pattern mustInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3372 | Type.name(type,"Region class"); | ||
3373 | find directInstanceOf(problem,interpretation,element,type); | ||
3374 | } | ||
3375 | private pattern scopeDisallowsNewRegion_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
3376 | find interpretation(problem,interpretation); | ||
3377 | PartialInterpretation.scopes(interpretation,scope); | ||
3378 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
3379 | Scope.maxNewElements(scope,0); | ||
3380 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
3381 | Type.name(type,"Region class"); | ||
3382 | } | ||
3383 | |||
3384 | /** | ||
3385 | * An element may be an instance of type "Region class". | ||
3386 | */ | ||
3387 | private pattern mayInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
3388 | { | ||
3389 | find interpretation(problem,interpretation); | ||
3390 | PartialInterpretation.newElements(interpretation,element); | ||
3391 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3392 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3393 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
3394 | neg find scopeDisallowsNewRegion_class(problem, interpretation); | ||
3395 | neg find isPrimitive(element); | ||
3396 | } or { | ||
3397 | find interpretation(problem,interpretation); | ||
3398 | PartialInterpretation.openWorldElements(interpretation,element); | ||
3399 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3400 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3401 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
3402 | neg find scopeDisallowsNewRegion_class(problem, interpretation); | ||
3403 | neg find isPrimitive(element); | ||
3404 | } or | ||
3405 | { find mustInstanceOfRegion_class(problem,interpretation,element); } | ||
3406 | /** | ||
3407 | * An element must be an instance of type "Transition class". | ||
3408 | */ | ||
3409 | private pattern mustInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3410 | Type.name(type,"Transition class"); | ||
3411 | find directInstanceOf(problem,interpretation,element,type); | ||
3412 | } | ||
3413 | private pattern scopeDisallowsNewTransition_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
3414 | find interpretation(problem,interpretation); | ||
3415 | PartialInterpretation.scopes(interpretation,scope); | ||
3416 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
3417 | Scope.maxNewElements(scope,0); | ||
3418 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
3419 | Type.name(type,"Transition class"); | ||
3420 | } | ||
3421 | |||
3422 | /** | ||
3423 | * An element may be an instance of type "Transition class". | ||
3424 | */ | ||
3425 | private pattern mayInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
3426 | { | ||
3427 | find interpretation(problem,interpretation); | ||
3428 | PartialInterpretation.newElements(interpretation,element); | ||
3429 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3430 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3431 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
3432 | neg find scopeDisallowsNewTransition_class(problem, interpretation); | ||
3433 | neg find isPrimitive(element); | ||
3434 | } or { | ||
3435 | find interpretation(problem,interpretation); | ||
3436 | PartialInterpretation.openWorldElements(interpretation,element); | ||
3437 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3438 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3439 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
3440 | neg find scopeDisallowsNewTransition_class(problem, interpretation); | ||
3441 | neg find isPrimitive(element); | ||
3442 | } or | ||
3443 | { find mustInstanceOfTransition_class(problem,interpretation,element); } | ||
3444 | /** | ||
3445 | * An element must be an instance of type "Statechart class". | ||
3446 | */ | ||
3447 | private pattern mustInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3448 | Type.name(type,"Statechart class"); | ||
3449 | find directInstanceOf(problem,interpretation,element,type); | ||
3450 | } | ||
3451 | private pattern scopeDisallowsNewStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
3452 | find interpretation(problem,interpretation); | ||
3453 | PartialInterpretation.scopes(interpretation,scope); | ||
3454 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
3455 | Scope.maxNewElements(scope,0); | ||
3456 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
3457 | Type.name(type,"Statechart class"); | ||
3458 | } | ||
3459 | |||
3460 | /** | ||
3461 | * An element may be an instance of type "Statechart class". | ||
3462 | */ | ||
3463 | private pattern mayInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
3464 | { | ||
3465 | find interpretation(problem,interpretation); | ||
3466 | PartialInterpretation.newElements(interpretation,element); | ||
3467 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3468 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3469 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
3470 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
3471 | neg find scopeDisallowsNewStatechart_class(problem, interpretation); | ||
3472 | neg find isPrimitive(element); | ||
3473 | } or { | ||
3474 | find interpretation(problem,interpretation); | ||
3475 | PartialInterpretation.openWorldElements(interpretation,element); | ||
3476 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3477 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3478 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
3479 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
3480 | neg find scopeDisallowsNewStatechart_class(problem, interpretation); | ||
3481 | neg find isPrimitive(element); | ||
3482 | } or | ||
3483 | { find mustInstanceOfStatechart_class(problem,interpretation,element); } | ||
3484 | /** | ||
3485 | * An element must be an instance of type "Entry class". | ||
3486 | */ | ||
3487 | private pattern mustInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3488 | Type.name(type,"Entry class"); | ||
3489 | find directInstanceOf(problem,interpretation,element,type); | ||
3490 | } | ||
3491 | private pattern scopeDisallowsNewEntry_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
3492 | find interpretation(problem,interpretation); | ||
3493 | PartialInterpretation.scopes(interpretation,scope); | ||
3494 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
3495 | Scope.maxNewElements(scope,0); | ||
3496 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
3497 | Type.name(type,"Entry class"); | ||
3498 | } | ||
3499 | |||
3500 | /** | ||
3501 | * An element may be an instance of type "Entry class". | ||
3502 | */ | ||
3503 | private pattern mayInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
3504 | { | ||
3505 | find interpretation(problem,interpretation); | ||
3506 | PartialInterpretation.newElements(interpretation,element); | ||
3507 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3508 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
3509 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3510 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3511 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
3512 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
3513 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
3514 | neg find scopeDisallowsNewEntry_class(problem, interpretation); | ||
3515 | neg find isPrimitive(element); | ||
3516 | } or { | ||
3517 | find interpretation(problem,interpretation); | ||
3518 | PartialInterpretation.openWorldElements(interpretation,element); | ||
3519 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3520 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
3521 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3522 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3523 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
3524 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
3525 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
3526 | neg find scopeDisallowsNewEntry_class(problem, interpretation); | ||
3527 | neg find isPrimitive(element); | ||
3528 | } or | ||
3529 | { find mustInstanceOfEntry_class(problem,interpretation,element); } | ||
3530 | /** | ||
3531 | * An element must be an instance of type "Synchronization class". | ||
3532 | */ | ||
3533 | private pattern mustInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3534 | Type.name(type,"Synchronization class"); | ||
3535 | find directInstanceOf(problem,interpretation,element,type); | ||
3536 | } | ||
3537 | private pattern scopeDisallowsNewSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
3538 | find interpretation(problem,interpretation); | ||
3539 | PartialInterpretation.scopes(interpretation,scope); | ||
3540 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
3541 | Scope.maxNewElements(scope,0); | ||
3542 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
3543 | Type.name(type,"Synchronization class"); | ||
3544 | } | ||
3545 | |||
3546 | /** | ||
3547 | * An element may be an instance of type "Synchronization class". | ||
3548 | */ | ||
3549 | private pattern mayInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
3550 | { | ||
3551 | find interpretation(problem,interpretation); | ||
3552 | PartialInterpretation.newElements(interpretation,element); | ||
3553 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3554 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
3555 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
3556 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3557 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3558 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
3559 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
3560 | neg find scopeDisallowsNewSynchronization_class(problem, interpretation); | ||
3561 | neg find isPrimitive(element); | ||
3562 | } or { | ||
3563 | find interpretation(problem,interpretation); | ||
3564 | PartialInterpretation.openWorldElements(interpretation,element); | ||
3565 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3566 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
3567 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
3568 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3569 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3570 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
3571 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
3572 | neg find scopeDisallowsNewSynchronization_class(problem, interpretation); | ||
3573 | neg find isPrimitive(element); | ||
3574 | } or | ||
3575 | { find mustInstanceOfSynchronization_class(problem,interpretation,element); } | ||
3576 | /** | ||
3577 | * An element must be an instance of type "State class". | ||
3578 | */ | ||
3579 | private pattern mustInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3580 | Type.name(type,"State class"); | ||
3581 | find directInstanceOf(problem,interpretation,element,type); | ||
3582 | } | ||
3583 | private pattern scopeDisallowsNewState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
3584 | find interpretation(problem,interpretation); | ||
3585 | PartialInterpretation.scopes(interpretation,scope); | ||
3586 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
3587 | Scope.maxNewElements(scope,0); | ||
3588 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
3589 | Type.name(type,"State class"); | ||
3590 | } | ||
3591 | |||
3592 | /** | ||
3593 | * An element may be an instance of type "State class". | ||
3594 | */ | ||
3595 | private pattern mayInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
3596 | { | ||
3597 | find interpretation(problem,interpretation); | ||
3598 | PartialInterpretation.newElements(interpretation,element); | ||
3599 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
3600 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3601 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3602 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
3603 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
3604 | neg find scopeDisallowsNewState_class(problem, interpretation); | ||
3605 | neg find isPrimitive(element); | ||
3606 | } or { | ||
3607 | find interpretation(problem,interpretation); | ||
3608 | PartialInterpretation.openWorldElements(interpretation,element); | ||
3609 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
3610 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3611 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3612 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
3613 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
3614 | neg find scopeDisallowsNewState_class(problem, interpretation); | ||
3615 | neg find isPrimitive(element); | ||
3616 | } or | ||
3617 | { find mustInstanceOfState_class(problem,interpretation,element); } | ||
3618 | /** | ||
3619 | * An element must be an instance of type "RegularState class". | ||
3620 | */ | ||
3621 | private pattern mustInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3622 | Type.name(type,"RegularState class"); | ||
3623 | find directInstanceOf(problem,interpretation,element,type); | ||
3624 | } | ||
3625 | private pattern scopeDisallowsNewRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
3626 | find interpretation(problem,interpretation); | ||
3627 | PartialInterpretation.scopes(interpretation,scope); | ||
3628 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
3629 | Scope.maxNewElements(scope,0); | ||
3630 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
3631 | Type.name(type,"RegularState class"); | ||
3632 | } | ||
3633 | |||
3634 | /** | ||
3635 | * An element may be an instance of type "RegularState class". | ||
3636 | */ | ||
3637 | private pattern mayInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
3638 | { | ||
3639 | find interpretation(problem,interpretation); | ||
3640 | PartialInterpretation.newElements(interpretation,element); | ||
3641 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3642 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
3643 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3644 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3645 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
3646 | neg find scopeDisallowsNewRegularState_class(problem, interpretation); | ||
3647 | neg find isPrimitive(element); | ||
3648 | } or { | ||
3649 | find interpretation(problem,interpretation); | ||
3650 | PartialInterpretation.openWorldElements(interpretation,element); | ||
3651 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3652 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
3653 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3654 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3655 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
3656 | neg find scopeDisallowsNewRegularState_class(problem, interpretation); | ||
3657 | neg find isPrimitive(element); | ||
3658 | } or | ||
3659 | { find mustInstanceOfRegularState_class(problem,interpretation,element); } | ||
3660 | /** | ||
3661 | * An element must be an instance of type "CompositeElement class". | ||
3662 | */ | ||
3663 | private pattern mustInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3664 | Type.name(type,"CompositeElement class"); | ||
3665 | find directInstanceOf(problem,interpretation,element,type); | ||
3666 | } | ||
3667 | private pattern scopeDisallowsNewCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
3668 | find interpretation(problem,interpretation); | ||
3669 | PartialInterpretation.scopes(interpretation,scope); | ||
3670 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
3671 | Scope.maxNewElements(scope,0); | ||
3672 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
3673 | Type.name(type,"CompositeElement class"); | ||
3674 | } | ||
3675 | |||
3676 | /** | ||
3677 | * An element may be an instance of type "CompositeElement class". | ||
3678 | */ | ||
3679 | private pattern mayInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
3680 | { | ||
3681 | find interpretation(problem,interpretation); | ||
3682 | PartialInterpretation.newElements(interpretation,element); | ||
3683 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3684 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
3685 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3686 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
3687 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
3688 | neg find scopeDisallowsNewCompositeElement_class(problem, interpretation); | ||
3689 | neg find isPrimitive(element); | ||
3690 | } or { | ||
3691 | find interpretation(problem,interpretation); | ||
3692 | PartialInterpretation.openWorldElements(interpretation,element); | ||
3693 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3694 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
3695 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3696 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
3697 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
3698 | neg find scopeDisallowsNewCompositeElement_class(problem, interpretation); | ||
3699 | neg find isPrimitive(element); | ||
3700 | } or | ||
3701 | { find mustInstanceOfCompositeElement_class(problem,interpretation,element); } | ||
3702 | /** | ||
3703 | * An element must be an instance of type "Choice class". | ||
3704 | */ | ||
3705 | private pattern mustInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3706 | Type.name(type,"Choice class"); | ||
3707 | find directInstanceOf(problem,interpretation,element,type); | ||
3708 | } | ||
3709 | private pattern scopeDisallowsNewChoice_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
3710 | find interpretation(problem,interpretation); | ||
3711 | PartialInterpretation.scopes(interpretation,scope); | ||
3712 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
3713 | Scope.maxNewElements(scope,0); | ||
3714 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
3715 | Type.name(type,"Choice class"); | ||
3716 | } | ||
3717 | |||
3718 | /** | ||
3719 | * An element may be an instance of type "Choice class". | ||
3720 | */ | ||
3721 | private pattern mayInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
3722 | { | ||
3723 | find interpretation(problem,interpretation); | ||
3724 | PartialInterpretation.newElements(interpretation,element); | ||
3725 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3726 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
3727 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3728 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3729 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
3730 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
3731 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
3732 | neg find scopeDisallowsNewChoice_class(problem, interpretation); | ||
3733 | neg find isPrimitive(element); | ||
3734 | } or { | ||
3735 | find interpretation(problem,interpretation); | ||
3736 | PartialInterpretation.openWorldElements(interpretation,element); | ||
3737 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3738 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
3739 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3740 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3741 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
3742 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
3743 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
3744 | neg find scopeDisallowsNewChoice_class(problem, interpretation); | ||
3745 | neg find isPrimitive(element); | ||
3746 | } or | ||
3747 | { find mustInstanceOfChoice_class(problem,interpretation,element); } | ||
3748 | /** | ||
3749 | * An element must be an instance of type "Exit class". | ||
3750 | */ | ||
3751 | private pattern mustInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3752 | Type.name(type,"Exit class"); | ||
3753 | find directInstanceOf(problem,interpretation,element,type); | ||
3754 | } | ||
3755 | private pattern scopeDisallowsNewExit_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
3756 | find interpretation(problem,interpretation); | ||
3757 | PartialInterpretation.scopes(interpretation,scope); | ||
3758 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
3759 | Scope.maxNewElements(scope,0); | ||
3760 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
3761 | Type.name(type,"Exit class"); | ||
3762 | } | ||
3763 | |||
3764 | /** | ||
3765 | * An element may be an instance of type "Exit class". | ||
3766 | */ | ||
3767 | private pattern mayInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
3768 | { | ||
3769 | find interpretation(problem,interpretation); | ||
3770 | PartialInterpretation.newElements(interpretation,element); | ||
3771 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
3772 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3773 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
3774 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3775 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3776 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
3777 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
3778 | neg find scopeDisallowsNewExit_class(problem, interpretation); | ||
3779 | neg find isPrimitive(element); | ||
3780 | } or { | ||
3781 | find interpretation(problem,interpretation); | ||
3782 | PartialInterpretation.openWorldElements(interpretation,element); | ||
3783 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
3784 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3785 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
3786 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3787 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3788 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
3789 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
3790 | neg find scopeDisallowsNewExit_class(problem, interpretation); | ||
3791 | neg find isPrimitive(element); | ||
3792 | } or | ||
3793 | { find mustInstanceOfExit_class(problem,interpretation,element); } | ||
3794 | /** | ||
3795 | * An element must be an instance of type "FinalState class". | ||
3796 | */ | ||
3797 | private pattern mustInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3798 | Type.name(type,"FinalState class"); | ||
3799 | find directInstanceOf(problem,interpretation,element,type); | ||
3800 | } | ||
3801 | private pattern scopeDisallowsNewFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
3802 | find interpretation(problem,interpretation); | ||
3803 | PartialInterpretation.scopes(interpretation,scope); | ||
3804 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
3805 | Scope.maxNewElements(scope,0); | ||
3806 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
3807 | Type.name(type,"FinalState class"); | ||
3808 | } | ||
3809 | |||
3810 | /** | ||
3811 | * An element may be an instance of type "FinalState class". | ||
3812 | */ | ||
3813 | private pattern mayInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
3814 | { | ||
3815 | find interpretation(problem,interpretation); | ||
3816 | PartialInterpretation.newElements(interpretation,element); | ||
3817 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
3818 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3819 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3820 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3821 | neg find scopeDisallowsNewFinalState_class(problem, interpretation); | ||
3822 | neg find isPrimitive(element); | ||
3823 | } or { | ||
3824 | find interpretation(problem,interpretation); | ||
3825 | PartialInterpretation.openWorldElements(interpretation,element); | ||
3826 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
3827 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
3828 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3829 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3830 | neg find scopeDisallowsNewFinalState_class(problem, interpretation); | ||
3831 | neg find isPrimitive(element); | ||
3832 | } or | ||
3833 | { find mustInstanceOfFinalState_class(problem,interpretation,element); } | ||
3834 | /** | ||
3835 | * An element must be an instance of type "Statechart class DefinedPart". | ||
3836 | */ | ||
3837 | private pattern mustInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3838 | Type.name(type,"Statechart class DefinedPart"); | ||
3839 | find directInstanceOf(problem,interpretation,element,type); | ||
3840 | } | ||
3841 | private pattern scopeDisallowsNewStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
3842 | find interpretation(problem,interpretation); | ||
3843 | PartialInterpretation.scopes(interpretation,scope); | ||
3844 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
3845 | Scope.maxNewElements(scope,0); | ||
3846 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
3847 | Type.name(type,"Statechart class DefinedPart"); | ||
3848 | } | ||
3849 | |||
3850 | /** | ||
3851 | * An element may be an instance of type "Statechart class DefinedPart". | ||
3852 | */ | ||
3853 | private pattern mayInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
3854 | { find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,element); } | ||
3855 | /** | ||
3856 | * An element must be an instance of type "Statechart class UndefinedPart". | ||
3857 | */ | ||
3858 | private pattern mustInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3859 | Type.name(type,"Statechart class UndefinedPart"); | ||
3860 | find directInstanceOf(problem,interpretation,element,type); | ||
3861 | } | ||
3862 | private pattern scopeDisallowsNewStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
3863 | find interpretation(problem,interpretation); | ||
3864 | PartialInterpretation.scopes(interpretation,scope); | ||
3865 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
3866 | Scope.maxNewElements(scope,0); | ||
3867 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
3868 | Type.name(type,"Statechart class UndefinedPart"); | ||
3869 | } | ||
3870 | |||
3871 | /** | ||
3872 | * An element may be an instance of type "Statechart class UndefinedPart". | ||
3873 | */ | ||
3874 | private pattern mayInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
3875 | { | ||
3876 | find interpretation(problem,interpretation); | ||
3877 | PartialInterpretation.newElements(interpretation,element); | ||
3878 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3879 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3880 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
3881 | neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation); | ||
3882 | neg find isPrimitive(element); | ||
3883 | } or { | ||
3884 | find interpretation(problem,interpretation); | ||
3885 | PartialInterpretation.openWorldElements(interpretation,element); | ||
3886 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3887 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3888 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
3889 | neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation); | ||
3890 | neg find isPrimitive(element); | ||
3891 | } or | ||
3892 | { find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); } | ||
3893 | /** | ||
3894 | * An element must be an instance of type "CompositeElement class DefinedPart". | ||
3895 | */ | ||
3896 | private pattern mustInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3897 | Type.name(type,"CompositeElement class DefinedPart"); | ||
3898 | find directInstanceOf(problem,interpretation,element,type); | ||
3899 | } | ||
3900 | private pattern scopeDisallowsNewCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
3901 | find interpretation(problem,interpretation); | ||
3902 | PartialInterpretation.scopes(interpretation,scope); | ||
3903 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
3904 | Scope.maxNewElements(scope,0); | ||
3905 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
3906 | Type.name(type,"CompositeElement class DefinedPart"); | ||
3907 | } | ||
3908 | |||
3909 | /** | ||
3910 | * An element may be an instance of type "CompositeElement class DefinedPart". | ||
3911 | */ | ||
3912 | private pattern mayInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
3913 | { find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,element); } | ||
3914 | /** | ||
3915 | * An element must be an instance of type "CompositeElement class UndefinedPart". | ||
3916 | */ | ||
3917 | private pattern mustInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
3918 | Type.name(type,"CompositeElement class UndefinedPart"); | ||
3919 | find directInstanceOf(problem,interpretation,element,type); | ||
3920 | } | ||
3921 | private pattern scopeDisallowsNewCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
3922 | find interpretation(problem,interpretation); | ||
3923 | PartialInterpretation.scopes(interpretation,scope); | ||
3924 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
3925 | Scope.maxNewElements(scope,0); | ||
3926 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
3927 | Type.name(type,"CompositeElement class UndefinedPart"); | ||
3928 | } | ||
3929 | |||
3930 | /** | ||
3931 | * An element may be an instance of type "CompositeElement class UndefinedPart". | ||
3932 | */ | ||
3933 | private pattern mayInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
3934 | { | ||
3935 | find interpretation(problem,interpretation); | ||
3936 | PartialInterpretation.newElements(interpretation,element); | ||
3937 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3938 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
3939 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3940 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
3941 | neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation); | ||
3942 | neg find isPrimitive(element); | ||
3943 | } or { | ||
3944 | find interpretation(problem,interpretation); | ||
3945 | PartialInterpretation.openWorldElements(interpretation,element); | ||
3946 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
3947 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
3948 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
3949 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
3950 | neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation); | ||
3951 | neg find isPrimitive(element); | ||
3952 | } or | ||
3953 | { find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); } | ||
3954 | |||
3955 | ////////// | ||
3956 | // 1.2 Relation Declaration Indexers | ||
3957 | ////////// | ||
3958 | /** | ||
3959 | * Matcher for detecting tuples t where []incomingTransitions reference Vertex(source,target) | ||
3960 | */ | ||
3961 | private pattern mustInRelationincomingTransitions_reference_Vertex( | ||
3962 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3963 | source: DefinedElement, target:DefinedElement) | ||
3964 | { | ||
3965 | find interpretation(problem,interpretation); | ||
3966 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
3967 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex"); | ||
3968 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
3969 | BinaryElementRelationLink.param1(link,source); | ||
3970 | BinaryElementRelationLink.param2(link,target); | ||
3971 | } | ||
3972 | /** | ||
3973 | * Matcher for detecting tuples t where <>incomingTransitions reference Vertex(source,target) | ||
3974 | */ | ||
3975 | private pattern mayInRelationincomingTransitions_reference_Vertex( | ||
3976 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3977 | source: DefinedElement, target:DefinedElement) | ||
3978 | { | ||
3979 | find interpretation(problem,interpretation); | ||
3980 | // The two endpoint of the link have to exist | ||
3981 | find mayExist(problem, interpretation, source); | ||
3982 | find mayExist(problem, interpretation, target); | ||
3983 | // Type consistency | ||
3984 | find mayInstanceOfVertex_class(problem,interpretation,source); | ||
3985 | find mayInstanceOfTransition_class(problem,interpretation,target); | ||
3986 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
3987 | // the upper bound of the opposite reference multiplicity should be considered. | ||
3988 | numberOfExistingOppositeReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,target,_); | ||
3989 | check(numberOfExistingOppositeReferences < 1); | ||
3990 | } or { | ||
3991 | find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,source,target); | ||
3992 | } | ||
3993 | /** | ||
3994 | * Matcher for detecting tuples t where []outgoingTransitions reference Vertex(source,target) | ||
3995 | */ | ||
3996 | private pattern mustInRelationoutgoingTransitions_reference_Vertex( | ||
3997 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
3998 | source: DefinedElement, target:DefinedElement) | ||
3999 | { | ||
4000 | find interpretation(problem,interpretation); | ||
4001 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
4002 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingTransitions reference Vertex"); | ||
4003 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
4004 | BinaryElementRelationLink.param1(link,source); | ||
4005 | BinaryElementRelationLink.param2(link,target); | ||
4006 | } | ||
4007 | /** | ||
4008 | * Matcher for detecting tuples t where <>outgoingTransitions reference Vertex(source,target) | ||
4009 | */ | ||
4010 | private pattern mayInRelationoutgoingTransitions_reference_Vertex( | ||
4011 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4012 | source: DefinedElement, target:DefinedElement) | ||
4013 | { | ||
4014 | find interpretation(problem,interpretation); | ||
4015 | // The two endpoint of the link have to exist | ||
4016 | find mayExist(problem, interpretation, source); | ||
4017 | find mayExist(problem, interpretation, target); | ||
4018 | // Type consistency | ||
4019 | find mayInstanceOfVertex_class(problem,interpretation,source); | ||
4020 | find mayInstanceOfTransition_class(problem,interpretation,target); | ||
4021 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
4022 | // the upper bound of the opposite reference multiplicity should be considered. | ||
4023 | numberOfExistingOppositeReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,target,_); | ||
4024 | check(numberOfExistingOppositeReferences < 1); | ||
4025 | // The reference is containment, then a new reference cannot be create if: | ||
4026 | // 1. Multiple parents | ||
4027 | neg find mustContains4(problem,interpretation,_,target); | ||
4028 | // 2. Circle in the containment hierarchy | ||
4029 | neg find mustTransitiveContains(source,target); | ||
4030 | } or { | ||
4031 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target); | ||
4032 | } | ||
4033 | /** | ||
4034 | * Matcher for detecting tuples t where []vertices reference Region(source,target) | ||
4035 | */ | ||
4036 | private pattern mustInRelationvertices_reference_Region( | ||
4037 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4038 | source: DefinedElement, target:DefinedElement) | ||
4039 | { | ||
4040 | find interpretation(problem,interpretation); | ||
4041 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
4042 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"vertices reference Region"); | ||
4043 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
4044 | BinaryElementRelationLink.param1(link,source); | ||
4045 | BinaryElementRelationLink.param2(link,target); | ||
4046 | } | ||
4047 | /** | ||
4048 | * Matcher for detecting tuples t where <>vertices reference Region(source,target) | ||
4049 | */ | ||
4050 | private pattern mayInRelationvertices_reference_Region( | ||
4051 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4052 | source: DefinedElement, target:DefinedElement) | ||
4053 | { | ||
4054 | find interpretation(problem,interpretation); | ||
4055 | // The two endpoint of the link have to exist | ||
4056 | find mayExist(problem, interpretation, source); | ||
4057 | find mayExist(problem, interpretation, target); | ||
4058 | // Type consistency | ||
4059 | find mayInstanceOfRegion_class(problem,interpretation,source); | ||
4060 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
4061 | // The reference is containment, then a new reference cannot be create if: | ||
4062 | // 1. Multiple parents | ||
4063 | neg find mustContains4(problem,interpretation,_,target); | ||
4064 | // 2. Circle in the containment hierarchy | ||
4065 | neg find mustTransitiveContains(source,target); | ||
4066 | } or { | ||
4067 | find mustInRelationvertices_reference_Region(problem,interpretation,source,target); | ||
4068 | } | ||
4069 | /** | ||
4070 | * Matcher for detecting tuples t where []target reference Transition(source,target) | ||
4071 | */ | ||
4072 | private pattern mustInRelationtarget_reference_Transition( | ||
4073 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4074 | source: DefinedElement, target:DefinedElement) | ||
4075 | { | ||
4076 | find interpretation(problem,interpretation); | ||
4077 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
4078 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition"); | ||
4079 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
4080 | BinaryElementRelationLink.param1(link,source); | ||
4081 | BinaryElementRelationLink.param2(link,target); | ||
4082 | } | ||
4083 | /** | ||
4084 | * Matcher for detecting tuples t where <>target reference Transition(source,target) | ||
4085 | */ | ||
4086 | private pattern mayInRelationtarget_reference_Transition( | ||
4087 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4088 | source: DefinedElement, target:DefinedElement) | ||
4089 | { | ||
4090 | find interpretation(problem,interpretation); | ||
4091 | // The two endpoint of the link have to exist | ||
4092 | find mayExist(problem, interpretation, source); | ||
4093 | find mayExist(problem, interpretation, target); | ||
4094 | // Type consistency | ||
4095 | find mayInstanceOfTransition_class(problem,interpretation,source); | ||
4096 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
4097 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
4098 | // the upper bound of the multiplicity should be considered. | ||
4099 | numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,source,_); | ||
4100 | check(numberOfExistingReferences < 1); | ||
4101 | } or { | ||
4102 | find mustInRelationtarget_reference_Transition(problem,interpretation,source,target); | ||
4103 | } | ||
4104 | /** | ||
4105 | * Matcher for detecting tuples t where []source reference Transition(source,target) | ||
4106 | */ | ||
4107 | private pattern mustInRelationsource_reference_Transition( | ||
4108 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4109 | source: DefinedElement, target:DefinedElement) | ||
4110 | { | ||
4111 | find interpretation(problem,interpretation); | ||
4112 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
4113 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"source reference Transition"); | ||
4114 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
4115 | BinaryElementRelationLink.param1(link,source); | ||
4116 | BinaryElementRelationLink.param2(link,target); | ||
4117 | } | ||
4118 | /** | ||
4119 | * Matcher for detecting tuples t where <>source reference Transition(source,target) | ||
4120 | */ | ||
4121 | private pattern mayInRelationsource_reference_Transition( | ||
4122 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4123 | source: DefinedElement, target:DefinedElement) | ||
4124 | { | ||
4125 | find interpretation(problem,interpretation); | ||
4126 | // The two endpoint of the link have to exist | ||
4127 | find mayExist(problem, interpretation, source); | ||
4128 | find mayExist(problem, interpretation, target); | ||
4129 | // Type consistency | ||
4130 | find mayInstanceOfTransition_class(problem,interpretation,source); | ||
4131 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
4132 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
4133 | // the upper bound of the multiplicity should be considered. | ||
4134 | numberOfExistingReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,source,_); | ||
4135 | check(numberOfExistingReferences < 1); | ||
4136 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
4137 | // 1. Multiple parents | ||
4138 | neg find mustContains4(problem,interpretation,source,_); | ||
4139 | // 2. Circle in the containment hierarchy | ||
4140 | neg find mustTransitiveContains(source,target); | ||
4141 | } or { | ||
4142 | find mustInRelationsource_reference_Transition(problem,interpretation,source,target); | ||
4143 | } | ||
4144 | /** | ||
4145 | * Matcher for detecting tuples t where []regions reference CompositeElement(source,target) | ||
4146 | */ | ||
4147 | private pattern mustInRelationregions_reference_CompositeElement( | ||
4148 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4149 | source: DefinedElement, target:DefinedElement) | ||
4150 | { | ||
4151 | find interpretation(problem,interpretation); | ||
4152 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
4153 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"regions reference CompositeElement"); | ||
4154 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
4155 | BinaryElementRelationLink.param1(link,source); | ||
4156 | BinaryElementRelationLink.param2(link,target); | ||
4157 | } | ||
4158 | /** | ||
4159 | * Matcher for detecting tuples t where <>regions reference CompositeElement(source,target) | ||
4160 | */ | ||
4161 | private pattern mayInRelationregions_reference_CompositeElement( | ||
4162 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4163 | source: DefinedElement, target:DefinedElement) | ||
4164 | { | ||
4165 | find interpretation(problem,interpretation); | ||
4166 | // The two endpoint of the link have to exist | ||
4167 | find mayExist(problem, interpretation, source); | ||
4168 | find mayExist(problem, interpretation, target); | ||
4169 | // Type consistency | ||
4170 | find mayInstanceOfCompositeElement_class(problem,interpretation,source); | ||
4171 | find mayInstanceOfRegion_class(problem,interpretation,target); | ||
4172 | // The reference is containment, then a new reference cannot be create if: | ||
4173 | // 1. Multiple parents | ||
4174 | neg find mustContains4(problem,interpretation,_,target); | ||
4175 | // 2. Circle in the containment hierarchy | ||
4176 | neg find mustTransitiveContains(source,target); | ||
4177 | } or { | ||
4178 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target); | ||
4179 | } | ||
4180 | |||
4181 | ////////// | ||
4182 | // 1.3 Relation Definition Indexers | ||
4183 | ////////// | ||
4184 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries entryInRegion | ||
4185 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
4186 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4187 | var_r1, var_e1) | ||
4188 | { | ||
4189 | find interpretation(problem,interpretation); | ||
4190 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
4191 | find mustInstanceOfEntry_class(problem,interpretation,var_e1); | ||
4192 | // r1 is exported | ||
4193 | // e1 is exported | ||
4194 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
4195 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
4196 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
4197 | var_virtual0 == var_e1; | ||
4198 | } | ||
4199 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
4200 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4201 | var_r1, var_e1) | ||
4202 | { | ||
4203 | find interpretation(problem,interpretation); | ||
4204 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
4205 | find mayInstanceOfEntry_class(problem,interpretation,var_e1); | ||
4206 | // r1 is exported | ||
4207 | // e1 is exported | ||
4208 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
4209 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
4210 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
4211 | find mayEquivalent(problem, interpretation, var_virtual0, var_e1); | ||
4212 | } | ||
4213 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
4214 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4215 | var_r1, var_e1) | ||
4216 | { | ||
4217 | find interpretation(problem,interpretation); | ||
4218 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
4219 | find mustInstanceOfEntry_class(problem,interpretation,var_e1); | ||
4220 | // r1 is exported | ||
4221 | // e1 is exported | ||
4222 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
4223 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
4224 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
4225 | var_virtual0 == var_e1; | ||
4226 | } | ||
4227 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noEntryInRegion | ||
4228 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
4229 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4230 | var_r1) | ||
4231 | { | ||
4232 | find interpretation(problem,interpretation); | ||
4233 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
4234 | // r1 is exported | ||
4235 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
4236 | } | ||
4237 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
4238 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4239 | var_r1) | ||
4240 | { | ||
4241 | find interpretation(problem,interpretation); | ||
4242 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
4243 | // r1 is exported | ||
4244 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
4245 | } | ||
4246 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
4247 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4248 | var_r1) | ||
4249 | { | ||
4250 | find interpretation(problem,interpretation); | ||
4251 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
4252 | // r1 is exported | ||
4253 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
4254 | } | ||
4255 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleEntryInRegion | ||
4256 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
4257 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4258 | var_r) | ||
4259 | { | ||
4260 | find interpretation(problem,interpretation); | ||
4261 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
4262 | // r is exported | ||
4263 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
4264 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
4265 | neg find mayEquivalent(problem, interpretation, var_e1, var_e2); | ||
4266 | } | ||
4267 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
4268 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4269 | var_r) | ||
4270 | { | ||
4271 | find interpretation(problem,interpretation); | ||
4272 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
4273 | // r is exported | ||
4274 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
4275 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
4276 | var_e1 != var_e2; | ||
4277 | } | ||
4278 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
4279 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4280 | var_r) | ||
4281 | { | ||
4282 | find interpretation(problem,interpretation); | ||
4283 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
4284 | // r is exported | ||
4285 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
4286 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
4287 | var_e1 != var_e2; | ||
4288 | } | ||
4289 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries transition | ||
4290 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
4291 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4292 | var_t, var_src, var_trg) | ||
4293 | { | ||
4294 | find interpretation(problem,interpretation); | ||
4295 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
4296 | find mustInstanceOfVertex_class(problem,interpretation,var_src); | ||
4297 | find mustInstanceOfVertex_class(problem,interpretation,var_trg); | ||
4298 | // t is exported | ||
4299 | // src is exported | ||
4300 | // trg is exported | ||
4301 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
4302 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
4303 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
4304 | var_virtual0 == var_src; | ||
4305 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
4306 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
4307 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
4308 | var_virtual1 == var_trg; | ||
4309 | } | ||
4310 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
4311 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4312 | var_t, var_src, var_trg) | ||
4313 | { | ||
4314 | find interpretation(problem,interpretation); | ||
4315 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
4316 | find mayInstanceOfVertex_class(problem,interpretation,var_src); | ||
4317 | find mayInstanceOfVertex_class(problem,interpretation,var_trg); | ||
4318 | // t is exported | ||
4319 | // src is exported | ||
4320 | // trg is exported | ||
4321 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
4322 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
4323 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
4324 | find mayEquivalent(problem, interpretation, var_virtual0, var_src); | ||
4325 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
4326 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
4327 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
4328 | find mayEquivalent(problem, interpretation, var_virtual1, var_trg); | ||
4329 | } | ||
4330 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
4331 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4332 | var_t, var_src, var_trg) | ||
4333 | { | ||
4334 | find interpretation(problem,interpretation); | ||
4335 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
4336 | find mustInstanceOfVertex_class(problem,interpretation,var_src); | ||
4337 | find mustInstanceOfVertex_class(problem,interpretation,var_trg); | ||
4338 | // t is exported | ||
4339 | // src is exported | ||
4340 | // trg is exported | ||
4341 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
4342 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
4343 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
4344 | var_virtual0 == var_src; | ||
4345 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
4346 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
4347 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
4348 | var_virtual1 == var_trg; | ||
4349 | } | ||
4350 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries incomingToEntry | ||
4351 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
4352 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4353 | var_t, var_e) | ||
4354 | { | ||
4355 | find interpretation(problem,interpretation); | ||
4356 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
4357 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
4358 | // t is exported | ||
4359 | // e is exported | ||
4360 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
4361 | } | ||
4362 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
4363 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4364 | var_t, var_e) | ||
4365 | { | ||
4366 | find interpretation(problem,interpretation); | ||
4367 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
4368 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
4369 | // t is exported | ||
4370 | // e is exported | ||
4371 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
4372 | } | ||
4373 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
4374 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4375 | var_t, var_e) | ||
4376 | { | ||
4377 | find interpretation(problem,interpretation); | ||
4378 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
4379 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
4380 | // t is exported | ||
4381 | // e is exported | ||
4382 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
4383 | } | ||
4384 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noOutgoingTransitionFromEntry | ||
4385 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
4386 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4387 | var_e) | ||
4388 | { | ||
4389 | find interpretation(problem,interpretation); | ||
4390 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
4391 | // e is exported | ||
4392 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
4393 | } | ||
4394 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
4395 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4396 | var_e) | ||
4397 | { | ||
4398 | find interpretation(problem,interpretation); | ||
4399 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
4400 | // e is exported | ||
4401 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
4402 | } | ||
4403 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
4404 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4405 | var_e) | ||
4406 | { | ||
4407 | find interpretation(problem,interpretation); | ||
4408 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
4409 | // e is exported | ||
4410 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
4411 | } | ||
4412 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleTransitionFromEntry | ||
4413 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
4414 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4415 | var_e, var_t1, var_t2) | ||
4416 | { | ||
4417 | find interpretation(problem,interpretation); | ||
4418 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
4419 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
4420 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
4421 | // e is exported | ||
4422 | // t1 is exported | ||
4423 | // t2 is exported | ||
4424 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
4425 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
4426 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
4427 | var_virtual0 == var_t1; | ||
4428 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
4429 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
4430 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
4431 | var_virtual1 == var_t2; | ||
4432 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
4433 | } | ||
4434 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
4435 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4436 | var_e, var_t1, var_t2) | ||
4437 | { | ||
4438 | find interpretation(problem,interpretation); | ||
4439 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
4440 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
4441 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
4442 | // e is exported | ||
4443 | // t1 is exported | ||
4444 | // t2 is exported | ||
4445 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
4446 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
4447 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
4448 | find mayEquivalent(problem, interpretation, var_virtual0, var_t1); | ||
4449 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
4450 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
4451 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
4452 | find mayEquivalent(problem, interpretation, var_virtual1, var_t2); | ||
4453 | var_t1 != var_t2; | ||
4454 | } | ||
4455 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
4456 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4457 | var_e, var_t1, var_t2) | ||
4458 | { | ||
4459 | find interpretation(problem,interpretation); | ||
4460 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
4461 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
4462 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
4463 | // e is exported | ||
4464 | // t1 is exported | ||
4465 | // t2 is exported | ||
4466 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
4467 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
4468 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
4469 | var_virtual0 == var_t1; | ||
4470 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
4471 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
4472 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
4473 | var_virtual1 == var_t2; | ||
4474 | var_t1 != var_t2; | ||
4475 | } | ||
4476 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromExit | ||
4477 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
4478 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4479 | var_t, var_e) | ||
4480 | { | ||
4481 | find interpretation(problem,interpretation); | ||
4482 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
4483 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
4484 | // t is exported | ||
4485 | // e is exported | ||
4486 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
4487 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
4488 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
4489 | var_virtual0 == var_t; | ||
4490 | } | ||
4491 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
4492 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4493 | var_t, var_e) | ||
4494 | { | ||
4495 | find interpretation(problem,interpretation); | ||
4496 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
4497 | find mayInstanceOfExit_class(problem,interpretation,var_e); | ||
4498 | // t is exported | ||
4499 | // e is exported | ||
4500 | find mayInstanceOfExit_class(problem,interpretation,var_e); | ||
4501 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
4502 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
4503 | find mayEquivalent(problem, interpretation, var_virtual0, var_t); | ||
4504 | } | ||
4505 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
4506 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4507 | var_t, var_e) | ||
4508 | { | ||
4509 | find interpretation(problem,interpretation); | ||
4510 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
4511 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
4512 | // t is exported | ||
4513 | // e is exported | ||
4514 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
4515 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
4516 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
4517 | var_virtual0 == var_t; | ||
4518 | } | ||
4519 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromFinal | ||
4520 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
4521 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4522 | var_t, var_f) | ||
4523 | { | ||
4524 | find interpretation(problem,interpretation); | ||
4525 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
4526 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
4527 | // t is exported | ||
4528 | // f is exported | ||
4529 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
4530 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
4531 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
4532 | var_virtual0 == var_t; | ||
4533 | } | ||
4534 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
4535 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4536 | var_t, var_f) | ||
4537 | { | ||
4538 | find interpretation(problem,interpretation); | ||
4539 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
4540 | find mayInstanceOfFinalState_class(problem,interpretation,var_f); | ||
4541 | // t is exported | ||
4542 | // f is exported | ||
4543 | find mayInstanceOfFinalState_class(problem,interpretation,var_f); | ||
4544 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
4545 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
4546 | find mayEquivalent(problem, interpretation, var_virtual0, var_t); | ||
4547 | } | ||
4548 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
4549 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4550 | var_t, var_f) | ||
4551 | { | ||
4552 | find interpretation(problem,interpretation); | ||
4553 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
4554 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
4555 | // t is exported | ||
4556 | // f is exported | ||
4557 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
4558 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
4559 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
4560 | var_virtual0 == var_t; | ||
4561 | } | ||
4562 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noStateInRegion | ||
4563 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
4564 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4565 | var_region) | ||
4566 | { | ||
4567 | find interpretation(problem,interpretation); | ||
4568 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
4569 | // region is exported | ||
4570 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
4571 | } | ||
4572 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
4573 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4574 | var_region) | ||
4575 | { | ||
4576 | find interpretation(problem,interpretation); | ||
4577 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
4578 | // region is exported | ||
4579 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
4580 | } | ||
4581 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
4582 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4583 | var_region) | ||
4584 | { | ||
4585 | find interpretation(problem,interpretation); | ||
4586 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
4587 | // region is exported | ||
4588 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
4589 | } | ||
4590 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries StateInRegion | ||
4591 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
4592 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4593 | var_region, var_state) | ||
4594 | { | ||
4595 | find interpretation(problem,interpretation); | ||
4596 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
4597 | find mustInstanceOfState_class(problem,interpretation,var_state); | ||
4598 | // region is exported | ||
4599 | // state is exported | ||
4600 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
4601 | find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
4602 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
4603 | var_virtual0 == var_state; | ||
4604 | } | ||
4605 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
4606 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4607 | var_region, var_state) | ||
4608 | { | ||
4609 | find interpretation(problem,interpretation); | ||
4610 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
4611 | find mayInstanceOfState_class(problem,interpretation,var_state); | ||
4612 | // region is exported | ||
4613 | // state is exported | ||
4614 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
4615 | find mayInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
4616 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
4617 | find mayEquivalent(problem, interpretation, var_virtual0, var_state); | ||
4618 | } | ||
4619 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
4620 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4621 | var_region, var_state) | ||
4622 | { | ||
4623 | find interpretation(problem,interpretation); | ||
4624 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
4625 | find mustInstanceOfState_class(problem,interpretation,var_state); | ||
4626 | // region is exported | ||
4627 | // state is exported | ||
4628 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
4629 | find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
4630 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
4631 | var_virtual0 == var_state; | ||
4632 | } | ||
4633 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoOutgoing | ||
4634 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
4635 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4636 | var_c) | ||
4637 | { | ||
4638 | find interpretation(problem,interpretation); | ||
4639 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
4640 | // c is exported | ||
4641 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
4642 | } | ||
4643 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
4644 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4645 | var_c) | ||
4646 | { | ||
4647 | find interpretation(problem,interpretation); | ||
4648 | find mayInstanceOfChoice_class(problem,interpretation,var_c); | ||
4649 | // c is exported | ||
4650 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
4651 | } | ||
4652 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
4653 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4654 | var_c) | ||
4655 | { | ||
4656 | find interpretation(problem,interpretation); | ||
4657 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
4658 | // c is exported | ||
4659 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
4660 | } | ||
4661 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoIncoming | ||
4662 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
4663 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4664 | var_c) | ||
4665 | { | ||
4666 | find interpretation(problem,interpretation); | ||
4667 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
4668 | // c is exported | ||
4669 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
4670 | } | ||
4671 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
4672 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4673 | var_c) | ||
4674 | { | ||
4675 | find interpretation(problem,interpretation); | ||
4676 | find mayInstanceOfChoice_class(problem,interpretation,var_c); | ||
4677 | // c is exported | ||
4678 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
4679 | } | ||
4680 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
4681 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4682 | var_c) | ||
4683 | { | ||
4684 | find interpretation(problem,interpretation); | ||
4685 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
4686 | // c is exported | ||
4687 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
4688 | } | ||
4689 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoOutgoing | ||
4690 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
4691 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4692 | var_s) | ||
4693 | { | ||
4694 | find interpretation(problem,interpretation); | ||
4695 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4696 | // s is exported | ||
4697 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
4698 | } | ||
4699 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
4700 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4701 | var_s) | ||
4702 | { | ||
4703 | find interpretation(problem,interpretation); | ||
4704 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4705 | // s is exported | ||
4706 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
4707 | } | ||
4708 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
4709 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4710 | var_s) | ||
4711 | { | ||
4712 | find interpretation(problem,interpretation); | ||
4713 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4714 | // s is exported | ||
4715 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
4716 | } | ||
4717 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoIncoming | ||
4718 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
4719 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4720 | var_s) | ||
4721 | { | ||
4722 | find interpretation(problem,interpretation); | ||
4723 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4724 | // s is exported | ||
4725 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
4726 | } | ||
4727 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
4728 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4729 | var_s) | ||
4730 | { | ||
4731 | find interpretation(problem,interpretation); | ||
4732 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4733 | // s is exported | ||
4734 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
4735 | } | ||
4736 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
4737 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4738 | var_s) | ||
4739 | { | ||
4740 | find interpretation(problem,interpretation); | ||
4741 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4742 | // s is exported | ||
4743 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
4744 | } | ||
4745 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedIncomingInSameRegion | ||
4746 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
4747 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4748 | var_s, var_v1, var_v2) | ||
4749 | { | ||
4750 | find interpretation(problem,interpretation); | ||
4751 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4752 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
4753 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
4754 | // s is exported | ||
4755 | // v1 is exported | ||
4756 | // v2 is exported | ||
4757 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
4758 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
4759 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
4760 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
4761 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
4762 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
4763 | var_virtual0 == var_v1; | ||
4764 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
4765 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
4766 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
4767 | var_virtual1 == var_v2; | ||
4768 | }or{ | ||
4769 | find interpretation(problem,interpretation); | ||
4770 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4771 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
4772 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
4773 | // s is exported | ||
4774 | // v1 is exported | ||
4775 | // v2 is exported | ||
4776 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
4777 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
4778 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
4779 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
4780 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
4781 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
4782 | var_virtual0 == var_v1; | ||
4783 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
4784 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
4785 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
4786 | var_virtual1 == var_v2; | ||
4787 | } | ||
4788 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
4789 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4790 | var_s, var_v1, var_v2) | ||
4791 | { | ||
4792 | find interpretation(problem,interpretation); | ||
4793 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4794 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
4795 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
4796 | // s is exported | ||
4797 | // v1 is exported | ||
4798 | // v2 is exported | ||
4799 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
4800 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
4801 | var_t1 != var_t2; | ||
4802 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
4803 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
4804 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
4805 | find mayEquivalent(problem, interpretation, var_virtual0, var_v1); | ||
4806 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
4807 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
4808 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
4809 | find mayEquivalent(problem, interpretation, var_virtual1, var_v2); | ||
4810 | }or{ | ||
4811 | find interpretation(problem,interpretation); | ||
4812 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4813 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
4814 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
4815 | // s is exported | ||
4816 | // v1 is exported | ||
4817 | // v2 is exported | ||
4818 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
4819 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
4820 | var_t1 != var_t2; | ||
4821 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
4822 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
4823 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
4824 | find mayEquivalent(problem, interpretation, var_virtual0, var_v1); | ||
4825 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
4826 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
4827 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
4828 | find mayEquivalent(problem, interpretation, var_virtual1, var_v2); | ||
4829 | } | ||
4830 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
4831 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4832 | var_s, var_v1, var_v2) | ||
4833 | { | ||
4834 | find interpretation(problem,interpretation); | ||
4835 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4836 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
4837 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
4838 | // s is exported | ||
4839 | // v1 is exported | ||
4840 | // v2 is exported | ||
4841 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
4842 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
4843 | var_t1 != var_t2; | ||
4844 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
4845 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
4846 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
4847 | var_virtual0 == var_v1; | ||
4848 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
4849 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
4850 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
4851 | var_virtual1 == var_v2; | ||
4852 | }or{ | ||
4853 | find interpretation(problem,interpretation); | ||
4854 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4855 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
4856 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
4857 | // s is exported | ||
4858 | // v1 is exported | ||
4859 | // v2 is exported | ||
4860 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
4861 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
4862 | var_t1 != var_t2; | ||
4863 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
4864 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
4865 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
4866 | var_virtual0 == var_v1; | ||
4867 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
4868 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
4869 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
4870 | var_virtual1 == var_v2; | ||
4871 | } | ||
4872 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries notSynchronizingStates | ||
4873 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
4874 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4875 | var_s) | ||
4876 | { | ||
4877 | find interpretation(problem,interpretation); | ||
4878 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4879 | // s is exported | ||
4880 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
4881 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
4882 | } | ||
4883 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
4884 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4885 | var_s) | ||
4886 | { | ||
4887 | find interpretation(problem,interpretation); | ||
4888 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4889 | // s is exported | ||
4890 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
4891 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
4892 | } | ||
4893 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
4894 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4895 | var_s) | ||
4896 | { | ||
4897 | find interpretation(problem,interpretation); | ||
4898 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4899 | // s is exported | ||
4900 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
4901 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
4902 | } | ||
4903 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleOutgoingTrainsition | ||
4904 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
4905 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4906 | var_v) | ||
4907 | { | ||
4908 | find interpretation(problem,interpretation); | ||
4909 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
4910 | // v is exported | ||
4911 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
4912 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
4913 | neg find mayEquivalent(problem, interpretation, var_trg1, var_trg2); | ||
4914 | } | ||
4915 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
4916 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4917 | var_v) | ||
4918 | { | ||
4919 | find interpretation(problem,interpretation); | ||
4920 | find mayInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
4921 | // v is exported | ||
4922 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
4923 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
4924 | var_trg1 != var_trg2; | ||
4925 | } | ||
4926 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
4927 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4928 | var_v) | ||
4929 | { | ||
4930 | find interpretation(problem,interpretation); | ||
4931 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
4932 | // v is exported | ||
4933 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
4934 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
4935 | var_trg1 != var_trg2; | ||
4936 | } | ||
4937 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleIncomingTrainsition | ||
4938 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
4939 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4940 | var_v) | ||
4941 | { | ||
4942 | find interpretation(problem,interpretation); | ||
4943 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
4944 | // v is exported | ||
4945 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
4946 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
4947 | neg find mayEquivalent(problem, interpretation, var_src1, var_src2); | ||
4948 | } | ||
4949 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
4950 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4951 | var_v) | ||
4952 | { | ||
4953 | find interpretation(problem,interpretation); | ||
4954 | find mayInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
4955 | // v is exported | ||
4956 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
4957 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
4958 | var_src1 != var_src2; | ||
4959 | } | ||
4960 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
4961 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4962 | var_v) | ||
4963 | { | ||
4964 | find interpretation(problem,interpretation); | ||
4965 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
4966 | // v is exported | ||
4967 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
4968 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
4969 | var_src1 != var_src2; | ||
4970 | } | ||
4971 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionsAreNotSiblings | ||
4972 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
4973 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
4974 | var_s, var_v1, var_v2) | ||
4975 | { | ||
4976 | find interpretation(problem,interpretation); | ||
4977 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
4978 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
4979 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
4980 | // s is exported | ||
4981 | // v1 is exported | ||
4982 | // v2 is exported | ||
4983 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
4984 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
4985 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
4986 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
4987 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
4988 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
4989 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
4990 | var_virtual1 == var_v1; | ||
4991 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
4992 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
4993 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
4994 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
4995 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
4996 | var_virtual3 == var_v2; | ||
4997 | neg find mayEquivalent(problem, interpretation, var_r1, var_r2); | ||
4998 | }or{ | ||
4999 | find interpretation(problem,interpretation); | ||
5000 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
5001 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
5002 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
5003 | // s is exported | ||
5004 | // v1 is exported | ||
5005 | // v2 is exported | ||
5006 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
5007 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
5008 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
5009 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
5010 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
5011 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
5012 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
5013 | var_virtual1 == var_v1; | ||
5014 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
5015 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
5016 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
5017 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
5018 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
5019 | var_virtual3 == var_v2; | ||
5020 | neg find mayEquivalent(problem, interpretation, var_r1, var_r2); | ||
5021 | } | ||
5022 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
5023 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5024 | var_s, var_v1, var_v2) | ||
5025 | { | ||
5026 | find interpretation(problem,interpretation); | ||
5027 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
5028 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
5029 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
5030 | // s is exported | ||
5031 | // v1 is exported | ||
5032 | // v2 is exported | ||
5033 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
5034 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
5035 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
5036 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
5037 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
5038 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
5039 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
5040 | find mayEquivalent(problem, interpretation, var_virtual1, var_v1); | ||
5041 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
5042 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
5043 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
5044 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
5045 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
5046 | find mayEquivalent(problem, interpretation, var_virtual3, var_v2); | ||
5047 | var_r1 != var_r2; | ||
5048 | }or{ | ||
5049 | find interpretation(problem,interpretation); | ||
5050 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
5051 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
5052 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
5053 | // s is exported | ||
5054 | // v1 is exported | ||
5055 | // v2 is exported | ||
5056 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
5057 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
5058 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
5059 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
5060 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
5061 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
5062 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
5063 | find mayEquivalent(problem, interpretation, var_virtual1, var_v1); | ||
5064 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
5065 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
5066 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
5067 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
5068 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
5069 | find mayEquivalent(problem, interpretation, var_virtual3, var_v2); | ||
5070 | var_r1 != var_r2; | ||
5071 | } | ||
5072 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
5073 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5074 | var_s, var_v1, var_v2) | ||
5075 | { | ||
5076 | find interpretation(problem,interpretation); | ||
5077 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
5078 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
5079 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
5080 | // s is exported | ||
5081 | // v1 is exported | ||
5082 | // v2 is exported | ||
5083 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
5084 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
5085 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
5086 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
5087 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
5088 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
5089 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
5090 | var_virtual1 == var_v1; | ||
5091 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
5092 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
5093 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
5094 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
5095 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
5096 | var_virtual3 == var_v2; | ||
5097 | var_r1 != var_r2; | ||
5098 | }or{ | ||
5099 | find interpretation(problem,interpretation); | ||
5100 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
5101 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
5102 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
5103 | // s is exported | ||
5104 | // v1 is exported | ||
5105 | // v2 is exported | ||
5106 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
5107 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
5108 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
5109 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
5110 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
5111 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
5112 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
5113 | var_virtual1 == var_v1; | ||
5114 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
5115 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
5116 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
5117 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
5118 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
5119 | var_virtual3 == var_v2; | ||
5120 | var_r1 != var_r2; | ||
5121 | } | ||
5122 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries child | ||
5123 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
5124 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5125 | var_parent, var_child) | ||
5126 | { | ||
5127 | find interpretation(problem,interpretation); | ||
5128 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
5129 | find mustInstanceOfVertex_class(problem,interpretation,var_child); | ||
5130 | // parent is exported | ||
5131 | // child is exported | ||
5132 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
5133 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
5134 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
5135 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
5136 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
5137 | var_virtual1 == var_child; | ||
5138 | } | ||
5139 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
5140 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5141 | var_parent, var_child) | ||
5142 | { | ||
5143 | find interpretation(problem,interpretation); | ||
5144 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
5145 | find mayInstanceOfVertex_class(problem,interpretation,var_child); | ||
5146 | // parent is exported | ||
5147 | // child is exported | ||
5148 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
5149 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
5150 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
5151 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
5152 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
5153 | find mayEquivalent(problem, interpretation, var_virtual1, var_child); | ||
5154 | } | ||
5155 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
5156 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5157 | var_parent, var_child) | ||
5158 | { | ||
5159 | find interpretation(problem,interpretation); | ||
5160 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
5161 | find mustInstanceOfVertex_class(problem,interpretation,var_child); | ||
5162 | // parent is exported | ||
5163 | // child is exported | ||
5164 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
5165 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
5166 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
5167 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
5168 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
5169 | var_virtual1 == var_child; | ||
5170 | } | ||
5171 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionDoesNotHaveMultipleRegions | ||
5172 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
5173 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5174 | var_s, var_v) | ||
5175 | { | ||
5176 | find interpretation(problem,interpretation); | ||
5177 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
5178 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
5179 | // s is exported | ||
5180 | // v is exported | ||
5181 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
5182 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
5183 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
5184 | }or{ | ||
5185 | find interpretation(problem,interpretation); | ||
5186 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
5187 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
5188 | // s is exported | ||
5189 | // v is exported | ||
5190 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
5191 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
5192 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
5193 | } | ||
5194 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
5195 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5196 | var_s, var_v) | ||
5197 | { | ||
5198 | find interpretation(problem,interpretation); | ||
5199 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
5200 | find mayInstanceOfVertex_class(problem,interpretation,var_v); | ||
5201 | // s is exported | ||
5202 | // v is exported | ||
5203 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
5204 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
5205 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
5206 | }or{ | ||
5207 | find interpretation(problem,interpretation); | ||
5208 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
5209 | find mayInstanceOfVertex_class(problem,interpretation,var_v); | ||
5210 | // s is exported | ||
5211 | // v is exported | ||
5212 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
5213 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
5214 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
5215 | } | ||
5216 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
5217 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5218 | var_s, var_v) | ||
5219 | { | ||
5220 | find interpretation(problem,interpretation); | ||
5221 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
5222 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
5223 | // s is exported | ||
5224 | // v is exported | ||
5225 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
5226 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
5227 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
5228 | }or{ | ||
5229 | find interpretation(problem,interpretation); | ||
5230 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
5231 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
5232 | // s is exported | ||
5233 | // v is exported | ||
5234 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
5235 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
5236 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
5237 | } | ||
5238 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleRegions | ||
5239 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
5240 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5241 | var_composite) | ||
5242 | { | ||
5243 | find interpretation(problem,interpretation); | ||
5244 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
5245 | // composite is exported | ||
5246 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
5247 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
5248 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
5249 | var_virtual0 == var_region1; | ||
5250 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
5251 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
5252 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
5253 | var_virtual1 == var_region2; | ||
5254 | neg find mayEquivalent(problem, interpretation, var_region1, var_region2); | ||
5255 | } | ||
5256 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
5257 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5258 | var_composite) | ||
5259 | { | ||
5260 | find interpretation(problem,interpretation); | ||
5261 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
5262 | // composite is exported | ||
5263 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
5264 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
5265 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
5266 | find mayEquivalent(problem, interpretation, var_virtual0, var_region1); | ||
5267 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
5268 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
5269 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
5270 | find mayEquivalent(problem, interpretation, var_virtual1, var_region2); | ||
5271 | var_region1 != var_region2; | ||
5272 | } | ||
5273 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
5274 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5275 | var_composite) | ||
5276 | { | ||
5277 | find interpretation(problem,interpretation); | ||
5278 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
5279 | // composite is exported | ||
5280 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
5281 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
5282 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
5283 | var_virtual0 == var_region1; | ||
5284 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
5285 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
5286 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
5287 | var_virtual1 == var_region2; | ||
5288 | var_region1 != var_region2; | ||
5289 | } | ||
5290 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchThree | ||
5291 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
5292 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5293 | var_s) | ||
5294 | { | ||
5295 | find interpretation(problem,interpretation); | ||
5296 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
5297 | // s is exported | ||
5298 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
5299 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
5300 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
5301 | var_virtual0 == var_s; | ||
5302 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
5303 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
5304 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
5305 | var_virtual1 == var_s; | ||
5306 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
5307 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
5308 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
5309 | var_virtual2 == var_s; | ||
5310 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
5311 | neg find mayEquivalent(problem, interpretation, var_t2, var_t3); | ||
5312 | neg find mayEquivalent(problem, interpretation, var_t1, var_t3); | ||
5313 | }or{ | ||
5314 | find interpretation(problem,interpretation); | ||
5315 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
5316 | // s is exported | ||
5317 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
5318 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
5319 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
5320 | var_virtual0 == var_s; | ||
5321 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
5322 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
5323 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
5324 | var_virtual1 == var_s; | ||
5325 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
5326 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
5327 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
5328 | var_virtual2 == var_s; | ||
5329 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
5330 | neg find mayEquivalent(problem, interpretation, var_t2, var_t3); | ||
5331 | neg find mayEquivalent(problem, interpretation, var_t1, var_t3); | ||
5332 | } | ||
5333 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
5334 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5335 | var_s) | ||
5336 | { | ||
5337 | find interpretation(problem,interpretation); | ||
5338 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
5339 | // s is exported | ||
5340 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
5341 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
5342 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
5343 | find mayEquivalent(problem, interpretation, var_virtual0, var_s); | ||
5344 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
5345 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
5346 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
5347 | find mayEquivalent(problem, interpretation, var_virtual1, var_s); | ||
5348 | find mayInstanceOfTransition_class(problem,interpretation,var_t3); | ||
5349 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
5350 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
5351 | find mayEquivalent(problem, interpretation, var_virtual2, var_s); | ||
5352 | var_t1 != var_t2; | ||
5353 | var_t2 != var_t3; | ||
5354 | var_t1 != var_t3; | ||
5355 | }or{ | ||
5356 | find interpretation(problem,interpretation); | ||
5357 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
5358 | // s is exported | ||
5359 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
5360 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
5361 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
5362 | find mayEquivalent(problem, interpretation, var_virtual0, var_s); | ||
5363 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
5364 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
5365 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
5366 | find mayEquivalent(problem, interpretation, var_virtual1, var_s); | ||
5367 | find mayInstanceOfTransition_class(problem,interpretation,var_t3); | ||
5368 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
5369 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
5370 | find mayEquivalent(problem, interpretation, var_virtual2, var_s); | ||
5371 | var_t1 != var_t2; | ||
5372 | var_t2 != var_t3; | ||
5373 | var_t1 != var_t3; | ||
5374 | } | ||
5375 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
5376 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5377 | var_s) | ||
5378 | { | ||
5379 | find interpretation(problem,interpretation); | ||
5380 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
5381 | // s is exported | ||
5382 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
5383 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
5384 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
5385 | var_virtual0 == var_s; | ||
5386 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
5387 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
5388 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
5389 | var_virtual1 == var_s; | ||
5390 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
5391 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
5392 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
5393 | var_virtual2 == var_s; | ||
5394 | var_t1 != var_t2; | ||
5395 | var_t2 != var_t3; | ||
5396 | var_t1 != var_t3; | ||
5397 | }or{ | ||
5398 | find interpretation(problem,interpretation); | ||
5399 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
5400 | // s is exported | ||
5401 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
5402 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
5403 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
5404 | var_virtual0 == var_s; | ||
5405 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
5406 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
5407 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
5408 | var_virtual1 == var_s; | ||
5409 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
5410 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
5411 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
5412 | var_virtual2 == var_s; | ||
5413 | var_t1 != var_t2; | ||
5414 | var_t2 != var_t3; | ||
5415 | var_t1 != var_t3; | ||
5416 | } | ||
5417 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries twoSynch | ||
5418 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
5419 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5420 | var_s1, var_s2) | ||
5421 | { | ||
5422 | find interpretation(problem,interpretation); | ||
5423 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
5424 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
5425 | // s1 is exported | ||
5426 | // s2 is exported | ||
5427 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
5428 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
5429 | neg find mayEquivalent(problem, interpretation, var_s1, var_s2); | ||
5430 | } | ||
5431 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
5432 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5433 | var_s1, var_s2) | ||
5434 | { | ||
5435 | find interpretation(problem,interpretation); | ||
5436 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
5437 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
5438 | // s1 is exported | ||
5439 | // s2 is exported | ||
5440 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
5441 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
5442 | var_s1 != var_s2; | ||
5443 | } | ||
5444 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
5445 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5446 | var_s1, var_s2) | ||
5447 | { | ||
5448 | find interpretation(problem,interpretation); | ||
5449 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
5450 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
5451 | // s1 is exported | ||
5452 | // s2 is exported | ||
5453 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
5454 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
5455 | var_s1 != var_s2; | ||
5456 | } | ||
5457 | |||
5458 | ////////// | ||
5459 | // 1.4 Containment Indexer | ||
5460 | ////////// | ||
5461 | private pattern mustContains2(source: DefinedElement, target: DefinedElement) { | ||
5462 | find mustContains4(_,_,source,target); | ||
5463 | } | ||
5464 | |||
5465 | private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5466 | source: DefinedElement, target: DefinedElement) | ||
5467 | { find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target); }or | ||
5468 | |||
5469 | { find mustInRelationvertices_reference_Region(problem,interpretation,source,target); }or | ||
5470 | |||
5471 | { find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target); } | ||
5472 | |||
5473 | private pattern mustTransitiveContains(source,target) { | ||
5474 | find mustContains2+(source,target); | ||
5475 | } | ||
5476 | |||
5477 | ////////// | ||
5478 | // 2. Invalidation Indexers | ||
5479 | ////////// | ||
5480 | // 2.1 Invalidated by WF Queries | ||
5481 | ////////// | ||
5482 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5483 | var_r1) | ||
5484 | { | ||
5485 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1); | ||
5486 | } | ||
5487 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5488 | var_r) | ||
5489 | { | ||
5490 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r); | ||
5491 | } | ||
5492 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5493 | var_t, var_e) | ||
5494 | { | ||
5495 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e); | ||
5496 | } | ||
5497 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5498 | var_e) | ||
5499 | { | ||
5500 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e); | ||
5501 | } | ||
5502 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5503 | var_e, var_t1, var_t2) | ||
5504 | { | ||
5505 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2); | ||
5506 | } | ||
5507 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5508 | var_t, var_e) | ||
5509 | { | ||
5510 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e); | ||
5511 | } | ||
5512 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5513 | var_t, var_f) | ||
5514 | { | ||
5515 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f); | ||
5516 | } | ||
5517 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5518 | var_region) | ||
5519 | { | ||
5520 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region); | ||
5521 | } | ||
5522 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5523 | var_c) | ||
5524 | { | ||
5525 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c); | ||
5526 | } | ||
5527 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5528 | var_c) | ||
5529 | { | ||
5530 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c); | ||
5531 | } | ||
5532 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5533 | var_s) | ||
5534 | { | ||
5535 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s); | ||
5536 | } | ||
5537 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5538 | var_s) | ||
5539 | { | ||
5540 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s); | ||
5541 | } | ||
5542 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5543 | var_s, var_v1, var_v2) | ||
5544 | { | ||
5545 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2); | ||
5546 | } | ||
5547 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5548 | var_s) | ||
5549 | { | ||
5550 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s); | ||
5551 | } | ||
5552 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5553 | var_s, var_v1, var_v2) | ||
5554 | { | ||
5555 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2); | ||
5556 | } | ||
5557 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5558 | var_s, var_v) | ||
5559 | { | ||
5560 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v); | ||
5561 | } | ||
5562 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5563 | var_s) | ||
5564 | { | ||
5565 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s); | ||
5566 | } | ||
5567 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5568 | var_s1, var_s2) | ||
5569 | { | ||
5570 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2); | ||
5571 | } | ||
5572 | |||
5573 | ////////// | ||
5574 | // 3. Unfinishedness Indexers | ||
5575 | ////////// | ||
5576 | // 3.1 Unfinishedness Measured by Multiplicity | ||
5577 | ////////// | ||
5578 | pattern unfinishedLowerMultiplicity_target_reference_Transition(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
5579 | find interpretation(problem,interpretation); | ||
5580 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
5581 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition"); | ||
5582 | find mustInstanceOfTransition_class(problem,interpretation,object); | ||
5583 | numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,object,_); | ||
5584 | check(numberOfExistingReferences < 1); | ||
5585 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
5586 | } | ||
5587 | |||
5588 | ////////// | ||
5589 | // 3.2 Unfinishedness Measured by WF Queries | ||
5590 | ////////// | ||
5591 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5592 | var_r1) | ||
5593 | { | ||
5594 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1); | ||
5595 | } | ||
5596 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5597 | var_r) | ||
5598 | { | ||
5599 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r); | ||
5600 | } | ||
5601 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5602 | var_t, var_e) | ||
5603 | { | ||
5604 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e); | ||
5605 | } | ||
5606 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5607 | var_e) | ||
5608 | { | ||
5609 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e); | ||
5610 | } | ||
5611 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5612 | var_e, var_t1, var_t2) | ||
5613 | { | ||
5614 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2); | ||
5615 | } | ||
5616 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5617 | var_t, var_e) | ||
5618 | { | ||
5619 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e); | ||
5620 | } | ||
5621 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5622 | var_t, var_f) | ||
5623 | { | ||
5624 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f); | ||
5625 | } | ||
5626 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5627 | var_region) | ||
5628 | { | ||
5629 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region); | ||
5630 | } | ||
5631 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5632 | var_c) | ||
5633 | { | ||
5634 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c); | ||
5635 | } | ||
5636 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5637 | var_c) | ||
5638 | { | ||
5639 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c); | ||
5640 | } | ||
5641 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5642 | var_s) | ||
5643 | { | ||
5644 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s); | ||
5645 | } | ||
5646 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5647 | var_s) | ||
5648 | { | ||
5649 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s); | ||
5650 | } | ||
5651 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5652 | var_s, var_v1, var_v2) | ||
5653 | { | ||
5654 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2); | ||
5655 | } | ||
5656 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5657 | var_s) | ||
5658 | { | ||
5659 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s); | ||
5660 | } | ||
5661 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5662 | var_s, var_v1, var_v2) | ||
5663 | { | ||
5664 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2); | ||
5665 | } | ||
5666 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5667 | var_s, var_v) | ||
5668 | { | ||
5669 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v); | ||
5670 | } | ||
5671 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5672 | var_s) | ||
5673 | { | ||
5674 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s); | ||
5675 | } | ||
5676 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation, | ||
5677 | var_s1, var_s2) | ||
5678 | { | ||
5679 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2); | ||
5680 | } | ||
5681 | |||
5682 | ////////// | ||
5683 | // 4. Refinement Indexers | ||
5684 | ////////// | ||
5685 | // 4.1 Object constructors | ||
5686 | ////////// | ||
5687 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) | ||
5688 | { | ||
5689 | find interpretation(problem,interpretation); | ||
5690 | find mustInstanceOfPseudostate_class(problem,interpretation,root); | ||
5691 | find mustExist(problem, interpretation, root); | ||
5692 | }or{ | ||
5693 | find interpretation(problem,interpretation); | ||
5694 | find mustInstanceOfVertex_class(problem,interpretation,root); | ||
5695 | find mustExist(problem, interpretation, root); | ||
5696 | }or{ | ||
5697 | find interpretation(problem,interpretation); | ||
5698 | find mustInstanceOfCompositeElement_class(problem,interpretation,root); | ||
5699 | find mustExist(problem, interpretation, root); | ||
5700 | }or{ | ||
5701 | find interpretation(problem,interpretation); | ||
5702 | find mustInstanceOfFinalState_class(problem,interpretation,root); | ||
5703 | find mustExist(problem, interpretation, root); | ||
5704 | }or{ | ||
5705 | find interpretation(problem,interpretation); | ||
5706 | find mustInstanceOfTransition_class(problem,interpretation,root); | ||
5707 | find mustExist(problem, interpretation, root); | ||
5708 | }or{ | ||
5709 | find interpretation(problem,interpretation); | ||
5710 | find mustInstanceOfRegion_class(problem,interpretation,root); | ||
5711 | find mustExist(problem, interpretation, root); | ||
5712 | }or{ | ||
5713 | find interpretation(problem,interpretation); | ||
5714 | find mustInstanceOfStatechart_class(problem,interpretation,root); | ||
5715 | find mustExist(problem, interpretation, root); | ||
5716 | }or{ | ||
5717 | find interpretation(problem,interpretation); | ||
5718 | find mustInstanceOfExit_class(problem,interpretation,root); | ||
5719 | find mustExist(problem, interpretation, root); | ||
5720 | }or{ | ||
5721 | find interpretation(problem,interpretation); | ||
5722 | find mustInstanceOfChoice_class(problem,interpretation,root); | ||
5723 | find mustExist(problem, interpretation, root); | ||
5724 | }or{ | ||
5725 | find interpretation(problem,interpretation); | ||
5726 | find mustInstanceOfRegularState_class(problem,interpretation,root); | ||
5727 | find mustExist(problem, interpretation, root); | ||
5728 | }or{ | ||
5729 | find interpretation(problem,interpretation); | ||
5730 | find mustInstanceOfSynchronization_class(problem,interpretation,root); | ||
5731 | find mustExist(problem, interpretation, root); | ||
5732 | }or{ | ||
5733 | find interpretation(problem,interpretation); | ||
5734 | find mustInstanceOfEntry_class(problem,interpretation,root); | ||
5735 | find mustExist(problem, interpretation, root); | ||
5736 | }or{ | ||
5737 | find interpretation(problem,interpretation); | ||
5738 | find mustInstanceOfState_class(problem,interpretation,root); | ||
5739 | find mustExist(problem, interpretation, root); | ||
5740 | }or{ | ||
5741 | find interpretation(problem,interpretation); | ||
5742 | find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,root); | ||
5743 | find mustExist(problem, interpretation, root); | ||
5744 | }or{ | ||
5745 | find interpretation(problem,interpretation); | ||
5746 | find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,root); | ||
5747 | find mustExist(problem, interpretation, root); | ||
5748 | }or{ | ||
5749 | find interpretation(problem,interpretation); | ||
5750 | find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,root); | ||
5751 | find mustExist(problem, interpretation, root); | ||
5752 | }or{ | ||
5753 | find interpretation(problem,interpretation); | ||
5754 | find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,root); | ||
5755 | find mustExist(problem, interpretation, root); | ||
5756 | } | ||
5757 | pattern createObject_Entry_class_by_vertices_reference_Region( | ||
5758 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5759 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
5760 | container:DefinedElement) | ||
5761 | { | ||
5762 | find interpretation(problem,interpretation); | ||
5763 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5764 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class"); | ||
5765 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
5766 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
5767 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
5768 | find mayInstanceOfEntry_class(problem,interpretation,newObject); | ||
5769 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
5770 | find mustExist(problem, interpretation, container); | ||
5771 | neg find mustExist(problem, interpretation, newObject); | ||
5772 | } | ||
5773 | pattern createObject_Entry_class( | ||
5774 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5775 | typeInterpretation:PartialComplexTypeInterpretation) | ||
5776 | { | ||
5777 | find interpretation(problem,interpretation); | ||
5778 | neg find hasElementInContainment(problem,interpretation); | ||
5779 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5780 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class"); | ||
5781 | find mayInstanceOfEntry_class(problem,interpretation,newObject); | ||
5782 | find mayExist(problem, interpretation, newObject); | ||
5783 | neg find mustExist(problem, interpretation, newObject); | ||
5784 | } | ||
5785 | pattern createObject_Choice_class_by_vertices_reference_Region( | ||
5786 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5787 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
5788 | container:DefinedElement) | ||
5789 | { | ||
5790 | find interpretation(problem,interpretation); | ||
5791 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5792 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class"); | ||
5793 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
5794 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
5795 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
5796 | find mayInstanceOfChoice_class(problem,interpretation,newObject); | ||
5797 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
5798 | find mustExist(problem, interpretation, container); | ||
5799 | neg find mustExist(problem, interpretation, newObject); | ||
5800 | } | ||
5801 | pattern createObject_Choice_class( | ||
5802 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5803 | typeInterpretation:PartialComplexTypeInterpretation) | ||
5804 | { | ||
5805 | find interpretation(problem,interpretation); | ||
5806 | neg find hasElementInContainment(problem,interpretation); | ||
5807 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5808 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class"); | ||
5809 | find mayInstanceOfChoice_class(problem,interpretation,newObject); | ||
5810 | find mayExist(problem, interpretation, newObject); | ||
5811 | neg find mustExist(problem, interpretation, newObject); | ||
5812 | } | ||
5813 | pattern createObject_State_class_by_vertices_reference_Region( | ||
5814 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5815 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
5816 | container:DefinedElement) | ||
5817 | { | ||
5818 | find interpretation(problem,interpretation); | ||
5819 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5820 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class"); | ||
5821 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
5822 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
5823 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
5824 | find mayInstanceOfState_class(problem,interpretation,newObject); | ||
5825 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
5826 | find mustExist(problem, interpretation, container); | ||
5827 | neg find mustExist(problem, interpretation, newObject); | ||
5828 | } | ||
5829 | pattern createObject_State_class( | ||
5830 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5831 | typeInterpretation:PartialComplexTypeInterpretation) | ||
5832 | { | ||
5833 | find interpretation(problem,interpretation); | ||
5834 | neg find hasElementInContainment(problem,interpretation); | ||
5835 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5836 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class"); | ||
5837 | find mayInstanceOfState_class(problem,interpretation,newObject); | ||
5838 | find mayExist(problem, interpretation, newObject); | ||
5839 | neg find mustExist(problem, interpretation, newObject); | ||
5840 | } | ||
5841 | pattern createObject_Statechart_class_UndefinedPart( | ||
5842 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5843 | typeInterpretation:PartialComplexTypeInterpretation) | ||
5844 | { | ||
5845 | find interpretation(problem,interpretation); | ||
5846 | neg find hasElementInContainment(problem,interpretation); | ||
5847 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5848 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Statechart class UndefinedPart"); | ||
5849 | find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,newObject); | ||
5850 | find mayExist(problem, interpretation, newObject); | ||
5851 | neg find mustExist(problem, interpretation, newObject); | ||
5852 | } | ||
5853 | pattern createObject_Transition_class_by_outgoingTransitions_reference_Vertex_with_source_reference_Transition( | ||
5854 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5855 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
5856 | container:DefinedElement) | ||
5857 | { | ||
5858 | find interpretation(problem,interpretation); | ||
5859 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5860 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class"); | ||
5861 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
5862 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingTransitions reference Vertex"); | ||
5863 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
5864 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"source reference Transition"); | ||
5865 | find mustInstanceOfVertex_class(problem,interpretation,container); | ||
5866 | find mayInstanceOfTransition_class(problem,interpretation,newObject); | ||
5867 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,container,newObject); | ||
5868 | find mustExist(problem, interpretation, container); | ||
5869 | neg find mustExist(problem, interpretation, newObject); | ||
5870 | } | ||
5871 | pattern createObject_Transition_class( | ||
5872 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5873 | typeInterpretation:PartialComplexTypeInterpretation) | ||
5874 | { | ||
5875 | find interpretation(problem,interpretation); | ||
5876 | neg find hasElementInContainment(problem,interpretation); | ||
5877 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5878 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class"); | ||
5879 | find mayInstanceOfTransition_class(problem,interpretation,newObject); | ||
5880 | find mayExist(problem, interpretation, newObject); | ||
5881 | neg find mustExist(problem, interpretation, newObject); | ||
5882 | } | ||
5883 | pattern createObject_Region_class_by_regions_reference_CompositeElement( | ||
5884 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5885 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
5886 | container:DefinedElement) | ||
5887 | { | ||
5888 | find interpretation(problem,interpretation); | ||
5889 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5890 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class"); | ||
5891 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
5892 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"regions reference CompositeElement"); | ||
5893 | find mustInstanceOfCompositeElement_class(problem,interpretation,container); | ||
5894 | find mayInstanceOfRegion_class(problem,interpretation,newObject); | ||
5895 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,container,newObject); | ||
5896 | find mustExist(problem, interpretation, container); | ||
5897 | neg find mustExist(problem, interpretation, newObject); | ||
5898 | } | ||
5899 | pattern createObject_Region_class( | ||
5900 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5901 | typeInterpretation:PartialComplexTypeInterpretation) | ||
5902 | { | ||
5903 | find interpretation(problem,interpretation); | ||
5904 | neg find hasElementInContainment(problem,interpretation); | ||
5905 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5906 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class"); | ||
5907 | find mayInstanceOfRegion_class(problem,interpretation,newObject); | ||
5908 | find mayExist(problem, interpretation, newObject); | ||
5909 | neg find mustExist(problem, interpretation, newObject); | ||
5910 | } | ||
5911 | pattern createObject_FinalState_class_by_vertices_reference_Region( | ||
5912 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5913 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
5914 | container:DefinedElement) | ||
5915 | { | ||
5916 | find interpretation(problem,interpretation); | ||
5917 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5918 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class"); | ||
5919 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
5920 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
5921 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
5922 | find mayInstanceOfFinalState_class(problem,interpretation,newObject); | ||
5923 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
5924 | find mustExist(problem, interpretation, container); | ||
5925 | neg find mustExist(problem, interpretation, newObject); | ||
5926 | } | ||
5927 | pattern createObject_FinalState_class( | ||
5928 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5929 | typeInterpretation:PartialComplexTypeInterpretation) | ||
5930 | { | ||
5931 | find interpretation(problem,interpretation); | ||
5932 | neg find hasElementInContainment(problem,interpretation); | ||
5933 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5934 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class"); | ||
5935 | find mayInstanceOfFinalState_class(problem,interpretation,newObject); | ||
5936 | find mayExist(problem, interpretation, newObject); | ||
5937 | neg find mustExist(problem, interpretation, newObject); | ||
5938 | } | ||
5939 | pattern createObject_Exit_class_by_vertices_reference_Region( | ||
5940 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5941 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
5942 | container:DefinedElement) | ||
5943 | { | ||
5944 | find interpretation(problem,interpretation); | ||
5945 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5946 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class"); | ||
5947 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
5948 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
5949 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
5950 | find mayInstanceOfExit_class(problem,interpretation,newObject); | ||
5951 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
5952 | find mustExist(problem, interpretation, container); | ||
5953 | neg find mustExist(problem, interpretation, newObject); | ||
5954 | } | ||
5955 | pattern createObject_Exit_class( | ||
5956 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5957 | typeInterpretation:PartialComplexTypeInterpretation) | ||
5958 | { | ||
5959 | find interpretation(problem,interpretation); | ||
5960 | neg find hasElementInContainment(problem,interpretation); | ||
5961 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5962 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class"); | ||
5963 | find mayInstanceOfExit_class(problem,interpretation,newObject); | ||
5964 | find mayExist(problem, interpretation, newObject); | ||
5965 | neg find mustExist(problem, interpretation, newObject); | ||
5966 | } | ||
5967 | pattern createObject_Synchronization_class_by_vertices_reference_Region( | ||
5968 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5969 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
5970 | container:DefinedElement) | ||
5971 | { | ||
5972 | find interpretation(problem,interpretation); | ||
5973 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5974 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class"); | ||
5975 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
5976 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
5977 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
5978 | find mayInstanceOfSynchronization_class(problem,interpretation,newObject); | ||
5979 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
5980 | find mustExist(problem, interpretation, container); | ||
5981 | neg find mustExist(problem, interpretation, newObject); | ||
5982 | } | ||
5983 | pattern createObject_Synchronization_class( | ||
5984 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
5985 | typeInterpretation:PartialComplexTypeInterpretation) | ||
5986 | { | ||
5987 | find interpretation(problem,interpretation); | ||
5988 | neg find hasElementInContainment(problem,interpretation); | ||
5989 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
5990 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class"); | ||
5991 | find mayInstanceOfSynchronization_class(problem,interpretation,newObject); | ||
5992 | find mayExist(problem, interpretation, newObject); | ||
5993 | neg find mustExist(problem, interpretation, newObject); | ||
5994 | } | ||
5995 | |||
5996 | ////////// | ||
5997 | // 4.2 Type refinement | ||
5998 | ////////// | ||
5999 | pattern refineTypeTo_Entry_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
6000 | find interpretation(problem,interpretation); | ||
6001 | PartialInterpretation.newElements(interpretation,element); | ||
6002 | find mayInstanceOfEntry_class(problem,interpretation,element); | ||
6003 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6004 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
6005 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
6006 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6007 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6008 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
6009 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
6010 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
6011 | } | ||
6012 | pattern refineTypeTo_Choice_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
6013 | find interpretation(problem,interpretation); | ||
6014 | PartialInterpretation.newElements(interpretation,element); | ||
6015 | find mayInstanceOfChoice_class(problem,interpretation,element); | ||
6016 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6017 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
6018 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
6019 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6020 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6021 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
6022 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
6023 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
6024 | } | ||
6025 | pattern refineTypeTo_State_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
6026 | find interpretation(problem,interpretation); | ||
6027 | PartialInterpretation.newElements(interpretation,element); | ||
6028 | find mayInstanceOfState_class(problem,interpretation,element); | ||
6029 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
6030 | neg find mustInstanceOfState_class(problem,interpretation,element); | ||
6031 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6032 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6033 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
6034 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
6035 | } | ||
6036 | pattern refineTypeTo_Statechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
6037 | find interpretation(problem,interpretation); | ||
6038 | PartialInterpretation.newElements(interpretation,element); | ||
6039 | find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); | ||
6040 | neg find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); | ||
6041 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6042 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6043 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
6044 | } | ||
6045 | pattern refineTypeTo_Transition_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
6046 | find interpretation(problem,interpretation); | ||
6047 | PartialInterpretation.newElements(interpretation,element); | ||
6048 | find mayInstanceOfTransition_class(problem,interpretation,element); | ||
6049 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6050 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6051 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6052 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
6053 | } | ||
6054 | pattern refineTypeTo_Region_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
6055 | find interpretation(problem,interpretation); | ||
6056 | PartialInterpretation.newElements(interpretation,element); | ||
6057 | find mayInstanceOfRegion_class(problem,interpretation,element); | ||
6058 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6059 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6060 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6061 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
6062 | } | ||
6063 | pattern refineTypeTo_FinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
6064 | find interpretation(problem,interpretation); | ||
6065 | PartialInterpretation.newElements(interpretation,element); | ||
6066 | find mayInstanceOfFinalState_class(problem,interpretation,element); | ||
6067 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
6068 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6069 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6070 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6071 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
6072 | } | ||
6073 | pattern refineTypeTo_Exit_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
6074 | find interpretation(problem,interpretation); | ||
6075 | PartialInterpretation.newElements(interpretation,element); | ||
6076 | find mayInstanceOfExit_class(problem,interpretation,element); | ||
6077 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
6078 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6079 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
6080 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6081 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6082 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
6083 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
6084 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
6085 | } | ||
6086 | pattern refineTypeTo_Synchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
6087 | find interpretation(problem,interpretation); | ||
6088 | PartialInterpretation.newElements(interpretation,element); | ||
6089 | find mayInstanceOfSynchronization_class(problem,interpretation,element); | ||
6090 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6091 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
6092 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
6093 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6094 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6095 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
6096 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
6097 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
6098 | } | ||
6099 | |||
6100 | ////////// | ||
6101 | // 4.3 Relation refinement | ||
6102 | ////////// | ||
6103 | pattern refineRelation_incomingTransitions_reference_Vertex_and_target_reference_Transition( | ||
6104 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6105 | relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, | ||
6106 | from: DefinedElement, to: DefinedElement) | ||
6107 | { | ||
6108 | find interpretation(problem,interpretation); | ||
6109 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
6110 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex"); | ||
6111 | PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); | ||
6112 | PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"target reference Transition"); | ||
6113 | find mustExist(problem, interpretation, from); | ||
6114 | find mustExist(problem, interpretation, to); | ||
6115 | find mustInstanceOfVertex_class(problem,interpretation,from); | ||
6116 | find mustInstanceOfTransition_class(problem,interpretation,to); | ||
6117 | find mayInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to); | ||
6118 | neg find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to); | ||
6119 | } | ||
6120 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
6121 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" | ||
6122 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
6123 | |||
6124 | ////////// | ||
6125 | // 0. Util | ||
6126 | ////////// | ||
6127 | private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
6128 | PartialInterpretation.problem(interpretation,problem); | ||
6129 | } | ||
6130 | |||
6131 | ///////////////////////// | ||
6132 | // 0.1 Existence | ||
6133 | ///////////////////////// | ||
6134 | private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6135 | find interpretation(problem,interpretation); | ||
6136 | LogicProblem.elements(problem,element); | ||
6137 | } or { | ||
6138 | find interpretation(problem,interpretation); | ||
6139 | PartialInterpretation.newElements(interpretation,element); | ||
6140 | } | ||
6141 | |||
6142 | private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6143 | find mustExist(problem,interpretation,element); | ||
6144 | } or { | ||
6145 | find interpretation(problem,interpretation); | ||
6146 | neg find elementCloseWorld(element); | ||
6147 | PartialInterpretation.openWorldElements(interpretation,element); | ||
6148 | } | ||
6149 | |||
6150 | private pattern elementCloseWorld(element:DefinedElement) { | ||
6151 | PartialInterpretation.openWorldElements(i,element); | ||
6152 | PartialInterpretation.maxNewElements(i,0); | ||
6153 | } or { | ||
6154 | Scope.targetTypeInterpretation(scope,interpretation); | ||
6155 | PartialTypeInterpratation.elements(interpretation,element); | ||
6156 | Scope.maxNewElements(scope,0); | ||
6157 | } | ||
6158 | |||
6159 | //////////////////////// | ||
6160 | // 0.2 Equivalence | ||
6161 | //////////////////////// | ||
6162 | pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { | ||
6163 | find mayExist(problem,interpretation,a); | ||
6164 | find mayExist(problem,interpretation,b); | ||
6165 | a == b; | ||
6166 | } | ||
6167 | |||
6168 | //////////////////////// | ||
6169 | // 0.3 Required Patterns by TypeIndexer | ||
6170 | //////////////////////// | ||
6171 | private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { | ||
6172 | find interpretation(problem,interpretation); | ||
6173 | LogicProblem.types(problem,type); | ||
6174 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
6175 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
6176 | } | ||
6177 | |||
6178 | private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
6179 | find interpretation(problem,interpretation); | ||
6180 | LogicProblem.types(problem,type); | ||
6181 | TypeDefinition.elements(type,element); | ||
6182 | } or { | ||
6183 | find interpretation(problem,interpretation); | ||
6184 | find typeInterpretation(problem,interpretation,type,typeInterpretation); | ||
6185 | PartialComplexTypeInterpretation.elements(typeInterpretation,element); | ||
6186 | } | ||
6187 | |||
6188 | private pattern isPrimitive(element: PrimitiveElement) { | ||
6189 | PrimitiveElement(element); | ||
6190 | } | ||
6191 | |||
6192 | ////////// | ||
6193 | // 1. Problem-Specific Base Indexers | ||
6194 | ////////// | ||
6195 | // 1.1 Type Indexers | ||
6196 | ////////// | ||
6197 | // 1.1.1 primitive Type Indexers | ||
6198 | ////////// | ||
6199 | |||
6200 | ////////// | ||
6201 | // 1.1.2 domain-specific Type Indexers | ||
6202 | ////////// | ||
6203 | /** | ||
6204 | * An element must be an instance of type "Pseudostate class". | ||
6205 | */ | ||
6206 | private pattern mustInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6207 | Type.name(type,"Pseudostate class"); | ||
6208 | find directInstanceOf(problem,interpretation,element,type); | ||
6209 | } | ||
6210 | private pattern scopeDisallowsNewPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
6211 | find interpretation(problem,interpretation); | ||
6212 | PartialInterpretation.scopes(interpretation,scope); | ||
6213 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
6214 | Scope.maxNewElements(scope,0); | ||
6215 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
6216 | Type.name(type,"Pseudostate class"); | ||
6217 | } | ||
6218 | |||
6219 | /** | ||
6220 | * An element may be an instance of type "Pseudostate class". | ||
6221 | */ | ||
6222 | private pattern mayInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
6223 | { | ||
6224 | find interpretation(problem,interpretation); | ||
6225 | PartialInterpretation.newElements(interpretation,element); | ||
6226 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
6227 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
6228 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
6229 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
6230 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6231 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6232 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
6233 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6234 | neg find scopeDisallowsNewPseudostate_class(problem, interpretation); | ||
6235 | neg find isPrimitive(element); | ||
6236 | } or { | ||
6237 | find interpretation(problem,interpretation); | ||
6238 | PartialInterpretation.openWorldElements(interpretation,element); | ||
6239 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
6240 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
6241 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
6242 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
6243 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6244 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6245 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
6246 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6247 | neg find scopeDisallowsNewPseudostate_class(problem, interpretation); | ||
6248 | neg find isPrimitive(element); | ||
6249 | } or | ||
6250 | { find mustInstanceOfPseudostate_class(problem,interpretation,element); } | ||
6251 | /** | ||
6252 | * An element must be an instance of type "Vertex class". | ||
6253 | */ | ||
6254 | private pattern mustInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6255 | Type.name(type,"Vertex class"); | ||
6256 | find directInstanceOf(problem,interpretation,element,type); | ||
6257 | } | ||
6258 | private pattern scopeDisallowsNewVertex_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
6259 | find interpretation(problem,interpretation); | ||
6260 | PartialInterpretation.scopes(interpretation,scope); | ||
6261 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
6262 | Scope.maxNewElements(scope,0); | ||
6263 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
6264 | Type.name(type,"Vertex class"); | ||
6265 | } | ||
6266 | |||
6267 | /** | ||
6268 | * An element may be an instance of type "Vertex class". | ||
6269 | */ | ||
6270 | private pattern mayInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
6271 | { | ||
6272 | find interpretation(problem,interpretation); | ||
6273 | PartialInterpretation.newElements(interpretation,element); | ||
6274 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
6275 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
6276 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6277 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6278 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6279 | neg find scopeDisallowsNewVertex_class(problem, interpretation); | ||
6280 | neg find isPrimitive(element); | ||
6281 | } or { | ||
6282 | find interpretation(problem,interpretation); | ||
6283 | PartialInterpretation.openWorldElements(interpretation,element); | ||
6284 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
6285 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
6286 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6287 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6288 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6289 | neg find scopeDisallowsNewVertex_class(problem, interpretation); | ||
6290 | neg find isPrimitive(element); | ||
6291 | } or | ||
6292 | { find mustInstanceOfVertex_class(problem,interpretation,element); } | ||
6293 | /** | ||
6294 | * An element must be an instance of type "Region class". | ||
6295 | */ | ||
6296 | private pattern mustInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6297 | Type.name(type,"Region class"); | ||
6298 | find directInstanceOf(problem,interpretation,element,type); | ||
6299 | } | ||
6300 | private pattern scopeDisallowsNewRegion_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
6301 | find interpretation(problem,interpretation); | ||
6302 | PartialInterpretation.scopes(interpretation,scope); | ||
6303 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
6304 | Scope.maxNewElements(scope,0); | ||
6305 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
6306 | Type.name(type,"Region class"); | ||
6307 | } | ||
6308 | |||
6309 | /** | ||
6310 | * An element may be an instance of type "Region class". | ||
6311 | */ | ||
6312 | private pattern mayInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
6313 | { | ||
6314 | find interpretation(problem,interpretation); | ||
6315 | PartialInterpretation.newElements(interpretation,element); | ||
6316 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
6317 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6318 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6319 | neg find scopeDisallowsNewRegion_class(problem, interpretation); | ||
6320 | neg find isPrimitive(element); | ||
6321 | } or { | ||
6322 | find interpretation(problem,interpretation); | ||
6323 | PartialInterpretation.openWorldElements(interpretation,element); | ||
6324 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
6325 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6326 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6327 | neg find scopeDisallowsNewRegion_class(problem, interpretation); | ||
6328 | neg find isPrimitive(element); | ||
6329 | } or | ||
6330 | { find mustInstanceOfRegion_class(problem,interpretation,element); } | ||
6331 | /** | ||
6332 | * An element must be an instance of type "Transition class". | ||
6333 | */ | ||
6334 | private pattern mustInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6335 | Type.name(type,"Transition class"); | ||
6336 | find directInstanceOf(problem,interpretation,element,type); | ||
6337 | } | ||
6338 | private pattern scopeDisallowsNewTransition_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
6339 | find interpretation(problem,interpretation); | ||
6340 | PartialInterpretation.scopes(interpretation,scope); | ||
6341 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
6342 | Scope.maxNewElements(scope,0); | ||
6343 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
6344 | Type.name(type,"Transition class"); | ||
6345 | } | ||
6346 | |||
6347 | /** | ||
6348 | * An element may be an instance of type "Transition class". | ||
6349 | */ | ||
6350 | private pattern mayInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
6351 | { | ||
6352 | find interpretation(problem,interpretation); | ||
6353 | PartialInterpretation.newElements(interpretation,element); | ||
6354 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
6355 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6356 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6357 | neg find scopeDisallowsNewTransition_class(problem, interpretation); | ||
6358 | neg find isPrimitive(element); | ||
6359 | } or { | ||
6360 | find interpretation(problem,interpretation); | ||
6361 | PartialInterpretation.openWorldElements(interpretation,element); | ||
6362 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
6363 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6364 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6365 | neg find scopeDisallowsNewTransition_class(problem, interpretation); | ||
6366 | neg find isPrimitive(element); | ||
6367 | } or | ||
6368 | { find mustInstanceOfTransition_class(problem,interpretation,element); } | ||
6369 | /** | ||
6370 | * An element must be an instance of type "Statechart class". | ||
6371 | */ | ||
6372 | private pattern mustInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6373 | Type.name(type,"Statechart class"); | ||
6374 | find directInstanceOf(problem,interpretation,element,type); | ||
6375 | } | ||
6376 | private pattern scopeDisallowsNewStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
6377 | find interpretation(problem,interpretation); | ||
6378 | PartialInterpretation.scopes(interpretation,scope); | ||
6379 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
6380 | Scope.maxNewElements(scope,0); | ||
6381 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
6382 | Type.name(type,"Statechart class"); | ||
6383 | } | ||
6384 | |||
6385 | /** | ||
6386 | * An element may be an instance of type "Statechart class". | ||
6387 | */ | ||
6388 | private pattern mayInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
6389 | { | ||
6390 | find interpretation(problem,interpretation); | ||
6391 | PartialInterpretation.newElements(interpretation,element); | ||
6392 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
6393 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
6394 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6395 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6396 | neg find scopeDisallowsNewStatechart_class(problem, interpretation); | ||
6397 | neg find isPrimitive(element); | ||
6398 | } or { | ||
6399 | find interpretation(problem,interpretation); | ||
6400 | PartialInterpretation.openWorldElements(interpretation,element); | ||
6401 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
6402 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
6403 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6404 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6405 | neg find scopeDisallowsNewStatechart_class(problem, interpretation); | ||
6406 | neg find isPrimitive(element); | ||
6407 | } or | ||
6408 | { find mustInstanceOfStatechart_class(problem,interpretation,element); } | ||
6409 | /** | ||
6410 | * An element must be an instance of type "Entry class". | ||
6411 | */ | ||
6412 | private pattern mustInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6413 | Type.name(type,"Entry class"); | ||
6414 | find directInstanceOf(problem,interpretation,element,type); | ||
6415 | } | ||
6416 | private pattern scopeDisallowsNewEntry_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
6417 | find interpretation(problem,interpretation); | ||
6418 | PartialInterpretation.scopes(interpretation,scope); | ||
6419 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
6420 | Scope.maxNewElements(scope,0); | ||
6421 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
6422 | Type.name(type,"Entry class"); | ||
6423 | } | ||
6424 | |||
6425 | /** | ||
6426 | * An element may be an instance of type "Entry class". | ||
6427 | */ | ||
6428 | private pattern mayInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
6429 | { | ||
6430 | find interpretation(problem,interpretation); | ||
6431 | PartialInterpretation.newElements(interpretation,element); | ||
6432 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
6433 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
6434 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
6435 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6436 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6437 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
6438 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6439 | neg find scopeDisallowsNewEntry_class(problem, interpretation); | ||
6440 | neg find isPrimitive(element); | ||
6441 | } or { | ||
6442 | find interpretation(problem,interpretation); | ||
6443 | PartialInterpretation.openWorldElements(interpretation,element); | ||
6444 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
6445 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
6446 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
6447 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6448 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6449 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
6450 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6451 | neg find scopeDisallowsNewEntry_class(problem, interpretation); | ||
6452 | neg find isPrimitive(element); | ||
6453 | } or | ||
6454 | { find mustInstanceOfEntry_class(problem,interpretation,element); } | ||
6455 | /** | ||
6456 | * An element must be an instance of type "Synchronization class". | ||
6457 | */ | ||
6458 | private pattern mustInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6459 | Type.name(type,"Synchronization class"); | ||
6460 | find directInstanceOf(problem,interpretation,element,type); | ||
6461 | } | ||
6462 | private pattern scopeDisallowsNewSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
6463 | find interpretation(problem,interpretation); | ||
6464 | PartialInterpretation.scopes(interpretation,scope); | ||
6465 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
6466 | Scope.maxNewElements(scope,0); | ||
6467 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
6468 | Type.name(type,"Synchronization class"); | ||
6469 | } | ||
6470 | |||
6471 | /** | ||
6472 | * An element may be an instance of type "Synchronization class". | ||
6473 | */ | ||
6474 | private pattern mayInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
6475 | { | ||
6476 | find interpretation(problem,interpretation); | ||
6477 | PartialInterpretation.newElements(interpretation,element); | ||
6478 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
6479 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
6480 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
6481 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
6482 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6483 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6484 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6485 | neg find scopeDisallowsNewSynchronization_class(problem, interpretation); | ||
6486 | neg find isPrimitive(element); | ||
6487 | } or { | ||
6488 | find interpretation(problem,interpretation); | ||
6489 | PartialInterpretation.openWorldElements(interpretation,element); | ||
6490 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
6491 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
6492 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
6493 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
6494 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6495 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6496 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6497 | neg find scopeDisallowsNewSynchronization_class(problem, interpretation); | ||
6498 | neg find isPrimitive(element); | ||
6499 | } or | ||
6500 | { find mustInstanceOfSynchronization_class(problem,interpretation,element); } | ||
6501 | /** | ||
6502 | * An element must be an instance of type "State class". | ||
6503 | */ | ||
6504 | private pattern mustInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6505 | Type.name(type,"State class"); | ||
6506 | find directInstanceOf(problem,interpretation,element,type); | ||
6507 | } | ||
6508 | private pattern scopeDisallowsNewState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
6509 | find interpretation(problem,interpretation); | ||
6510 | PartialInterpretation.scopes(interpretation,scope); | ||
6511 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
6512 | Scope.maxNewElements(scope,0); | ||
6513 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
6514 | Type.name(type,"State class"); | ||
6515 | } | ||
6516 | |||
6517 | /** | ||
6518 | * An element may be an instance of type "State class". | ||
6519 | */ | ||
6520 | private pattern mayInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
6521 | { | ||
6522 | find interpretation(problem,interpretation); | ||
6523 | PartialInterpretation.newElements(interpretation,element); | ||
6524 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
6525 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
6526 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6527 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
6528 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6529 | neg find scopeDisallowsNewState_class(problem, interpretation); | ||
6530 | neg find isPrimitive(element); | ||
6531 | } or { | ||
6532 | find interpretation(problem,interpretation); | ||
6533 | PartialInterpretation.openWorldElements(interpretation,element); | ||
6534 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
6535 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
6536 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6537 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
6538 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6539 | neg find scopeDisallowsNewState_class(problem, interpretation); | ||
6540 | neg find isPrimitive(element); | ||
6541 | } or | ||
6542 | { find mustInstanceOfState_class(problem,interpretation,element); } | ||
6543 | /** | ||
6544 | * An element must be an instance of type "RegularState class". | ||
6545 | */ | ||
6546 | private pattern mustInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6547 | Type.name(type,"RegularState class"); | ||
6548 | find directInstanceOf(problem,interpretation,element,type); | ||
6549 | } | ||
6550 | private pattern scopeDisallowsNewRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
6551 | find interpretation(problem,interpretation); | ||
6552 | PartialInterpretation.scopes(interpretation,scope); | ||
6553 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
6554 | Scope.maxNewElements(scope,0); | ||
6555 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
6556 | Type.name(type,"RegularState class"); | ||
6557 | } | ||
6558 | |||
6559 | /** | ||
6560 | * An element may be an instance of type "RegularState class". | ||
6561 | */ | ||
6562 | private pattern mayInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
6563 | { | ||
6564 | find interpretation(problem,interpretation); | ||
6565 | PartialInterpretation.newElements(interpretation,element); | ||
6566 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
6567 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
6568 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6569 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6570 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6571 | neg find scopeDisallowsNewRegularState_class(problem, interpretation); | ||
6572 | neg find isPrimitive(element); | ||
6573 | } or { | ||
6574 | find interpretation(problem,interpretation); | ||
6575 | PartialInterpretation.openWorldElements(interpretation,element); | ||
6576 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
6577 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
6578 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6579 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6580 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6581 | neg find scopeDisallowsNewRegularState_class(problem, interpretation); | ||
6582 | neg find isPrimitive(element); | ||
6583 | } or | ||
6584 | { find mustInstanceOfRegularState_class(problem,interpretation,element); } | ||
6585 | /** | ||
6586 | * An element must be an instance of type "CompositeElement class". | ||
6587 | */ | ||
6588 | private pattern mustInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6589 | Type.name(type,"CompositeElement class"); | ||
6590 | find directInstanceOf(problem,interpretation,element,type); | ||
6591 | } | ||
6592 | private pattern scopeDisallowsNewCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
6593 | find interpretation(problem,interpretation); | ||
6594 | PartialInterpretation.scopes(interpretation,scope); | ||
6595 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
6596 | Scope.maxNewElements(scope,0); | ||
6597 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
6598 | Type.name(type,"CompositeElement class"); | ||
6599 | } | ||
6600 | |||
6601 | /** | ||
6602 | * An element may be an instance of type "CompositeElement class". | ||
6603 | */ | ||
6604 | private pattern mayInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
6605 | { | ||
6606 | find interpretation(problem,interpretation); | ||
6607 | PartialInterpretation.newElements(interpretation,element); | ||
6608 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
6609 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
6610 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6611 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
6612 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6613 | neg find scopeDisallowsNewCompositeElement_class(problem, interpretation); | ||
6614 | neg find isPrimitive(element); | ||
6615 | } or { | ||
6616 | find interpretation(problem,interpretation); | ||
6617 | PartialInterpretation.openWorldElements(interpretation,element); | ||
6618 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
6619 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
6620 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6621 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
6622 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6623 | neg find scopeDisallowsNewCompositeElement_class(problem, interpretation); | ||
6624 | neg find isPrimitive(element); | ||
6625 | } or | ||
6626 | { find mustInstanceOfCompositeElement_class(problem,interpretation,element); } | ||
6627 | /** | ||
6628 | * An element must be an instance of type "Choice class". | ||
6629 | */ | ||
6630 | private pattern mustInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6631 | Type.name(type,"Choice class"); | ||
6632 | find directInstanceOf(problem,interpretation,element,type); | ||
6633 | } | ||
6634 | private pattern scopeDisallowsNewChoice_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
6635 | find interpretation(problem,interpretation); | ||
6636 | PartialInterpretation.scopes(interpretation,scope); | ||
6637 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
6638 | Scope.maxNewElements(scope,0); | ||
6639 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
6640 | Type.name(type,"Choice class"); | ||
6641 | } | ||
6642 | |||
6643 | /** | ||
6644 | * An element may be an instance of type "Choice class". | ||
6645 | */ | ||
6646 | private pattern mayInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
6647 | { | ||
6648 | find interpretation(problem,interpretation); | ||
6649 | PartialInterpretation.newElements(interpretation,element); | ||
6650 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
6651 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
6652 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
6653 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6654 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6655 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6656 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
6657 | neg find scopeDisallowsNewChoice_class(problem, interpretation); | ||
6658 | neg find isPrimitive(element); | ||
6659 | } or { | ||
6660 | find interpretation(problem,interpretation); | ||
6661 | PartialInterpretation.openWorldElements(interpretation,element); | ||
6662 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
6663 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
6664 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
6665 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6666 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6667 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6668 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
6669 | neg find scopeDisallowsNewChoice_class(problem, interpretation); | ||
6670 | neg find isPrimitive(element); | ||
6671 | } or | ||
6672 | { find mustInstanceOfChoice_class(problem,interpretation,element); } | ||
6673 | /** | ||
6674 | * An element must be an instance of type "Exit class". | ||
6675 | */ | ||
6676 | private pattern mustInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6677 | Type.name(type,"Exit class"); | ||
6678 | find directInstanceOf(problem,interpretation,element,type); | ||
6679 | } | ||
6680 | private pattern scopeDisallowsNewExit_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
6681 | find interpretation(problem,interpretation); | ||
6682 | PartialInterpretation.scopes(interpretation,scope); | ||
6683 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
6684 | Scope.maxNewElements(scope,0); | ||
6685 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
6686 | Type.name(type,"Exit class"); | ||
6687 | } | ||
6688 | |||
6689 | /** | ||
6690 | * An element may be an instance of type "Exit class". | ||
6691 | */ | ||
6692 | private pattern mayInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
6693 | { | ||
6694 | find interpretation(problem,interpretation); | ||
6695 | PartialInterpretation.newElements(interpretation,element); | ||
6696 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
6697 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
6698 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
6699 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6700 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6701 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
6702 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6703 | neg find scopeDisallowsNewExit_class(problem, interpretation); | ||
6704 | neg find isPrimitive(element); | ||
6705 | } or { | ||
6706 | find interpretation(problem,interpretation); | ||
6707 | PartialInterpretation.openWorldElements(interpretation,element); | ||
6708 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
6709 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
6710 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
6711 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6712 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6713 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
6714 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6715 | neg find scopeDisallowsNewExit_class(problem, interpretation); | ||
6716 | neg find isPrimitive(element); | ||
6717 | } or | ||
6718 | { find mustInstanceOfExit_class(problem,interpretation,element); } | ||
6719 | /** | ||
6720 | * An element must be an instance of type "FinalState class". | ||
6721 | */ | ||
6722 | private pattern mustInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6723 | Type.name(type,"FinalState class"); | ||
6724 | find directInstanceOf(problem,interpretation,element,type); | ||
6725 | } | ||
6726 | private pattern scopeDisallowsNewFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
6727 | find interpretation(problem,interpretation); | ||
6728 | PartialInterpretation.scopes(interpretation,scope); | ||
6729 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
6730 | Scope.maxNewElements(scope,0); | ||
6731 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
6732 | Type.name(type,"FinalState class"); | ||
6733 | } | ||
6734 | |||
6735 | /** | ||
6736 | * An element may be an instance of type "FinalState class". | ||
6737 | */ | ||
6738 | private pattern mayInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
6739 | { | ||
6740 | find interpretation(problem,interpretation); | ||
6741 | PartialInterpretation.newElements(interpretation,element); | ||
6742 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
6743 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6744 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6745 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6746 | neg find scopeDisallowsNewFinalState_class(problem, interpretation); | ||
6747 | neg find isPrimitive(element); | ||
6748 | } or { | ||
6749 | find interpretation(problem,interpretation); | ||
6750 | PartialInterpretation.openWorldElements(interpretation,element); | ||
6751 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
6752 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6753 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
6754 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6755 | neg find scopeDisallowsNewFinalState_class(problem, interpretation); | ||
6756 | neg find isPrimitive(element); | ||
6757 | } or | ||
6758 | { find mustInstanceOfFinalState_class(problem,interpretation,element); } | ||
6759 | /** | ||
6760 | * An element must be an instance of type "Statechart class DefinedPart". | ||
6761 | */ | ||
6762 | private pattern mustInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6763 | Type.name(type,"Statechart class DefinedPart"); | ||
6764 | find directInstanceOf(problem,interpretation,element,type); | ||
6765 | } | ||
6766 | private pattern scopeDisallowsNewStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
6767 | find interpretation(problem,interpretation); | ||
6768 | PartialInterpretation.scopes(interpretation,scope); | ||
6769 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
6770 | Scope.maxNewElements(scope,0); | ||
6771 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
6772 | Type.name(type,"Statechart class DefinedPart"); | ||
6773 | } | ||
6774 | |||
6775 | /** | ||
6776 | * An element may be an instance of type "Statechart class DefinedPart". | ||
6777 | */ | ||
6778 | private pattern mayInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
6779 | { find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,element); } | ||
6780 | /** | ||
6781 | * An element must be an instance of type "Statechart class UndefinedPart". | ||
6782 | */ | ||
6783 | private pattern mustInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6784 | Type.name(type,"Statechart class UndefinedPart"); | ||
6785 | find directInstanceOf(problem,interpretation,element,type); | ||
6786 | } | ||
6787 | private pattern scopeDisallowsNewStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
6788 | find interpretation(problem,interpretation); | ||
6789 | PartialInterpretation.scopes(interpretation,scope); | ||
6790 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
6791 | Scope.maxNewElements(scope,0); | ||
6792 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
6793 | Type.name(type,"Statechart class UndefinedPart"); | ||
6794 | } | ||
6795 | |||
6796 | /** | ||
6797 | * An element may be an instance of type "Statechart class UndefinedPart". | ||
6798 | */ | ||
6799 | private pattern mayInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
6800 | { | ||
6801 | find interpretation(problem,interpretation); | ||
6802 | PartialInterpretation.newElements(interpretation,element); | ||
6803 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
6804 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6805 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6806 | neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation); | ||
6807 | neg find isPrimitive(element); | ||
6808 | } or { | ||
6809 | find interpretation(problem,interpretation); | ||
6810 | PartialInterpretation.openWorldElements(interpretation,element); | ||
6811 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
6812 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6813 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6814 | neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation); | ||
6815 | neg find isPrimitive(element); | ||
6816 | } or | ||
6817 | { find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); } | ||
6818 | /** | ||
6819 | * An element must be an instance of type "CompositeElement class DefinedPart". | ||
6820 | */ | ||
6821 | private pattern mustInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6822 | Type.name(type,"CompositeElement class DefinedPart"); | ||
6823 | find directInstanceOf(problem,interpretation,element,type); | ||
6824 | } | ||
6825 | private pattern scopeDisallowsNewCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
6826 | find interpretation(problem,interpretation); | ||
6827 | PartialInterpretation.scopes(interpretation,scope); | ||
6828 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
6829 | Scope.maxNewElements(scope,0); | ||
6830 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
6831 | Type.name(type,"CompositeElement class DefinedPart"); | ||
6832 | } | ||
6833 | |||
6834 | /** | ||
6835 | * An element may be an instance of type "CompositeElement class DefinedPart". | ||
6836 | */ | ||
6837 | private pattern mayInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
6838 | { find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,element); } | ||
6839 | /** | ||
6840 | * An element must be an instance of type "CompositeElement class UndefinedPart". | ||
6841 | */ | ||
6842 | private pattern mustInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
6843 | Type.name(type,"CompositeElement class UndefinedPart"); | ||
6844 | find directInstanceOf(problem,interpretation,element,type); | ||
6845 | } | ||
6846 | private pattern scopeDisallowsNewCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
6847 | find interpretation(problem,interpretation); | ||
6848 | PartialInterpretation.scopes(interpretation,scope); | ||
6849 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
6850 | Scope.maxNewElements(scope,0); | ||
6851 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
6852 | Type.name(type,"CompositeElement class UndefinedPart"); | ||
6853 | } | ||
6854 | |||
6855 | /** | ||
6856 | * An element may be an instance of type "CompositeElement class UndefinedPart". | ||
6857 | */ | ||
6858 | private pattern mayInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
6859 | { | ||
6860 | find interpretation(problem,interpretation); | ||
6861 | PartialInterpretation.newElements(interpretation,element); | ||
6862 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
6863 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6864 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
6865 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6866 | neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation); | ||
6867 | neg find isPrimitive(element); | ||
6868 | } or { | ||
6869 | find interpretation(problem,interpretation); | ||
6870 | PartialInterpretation.openWorldElements(interpretation,element); | ||
6871 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
6872 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
6873 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
6874 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
6875 | neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation); | ||
6876 | neg find isPrimitive(element); | ||
6877 | } or | ||
6878 | { find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); } | ||
6879 | |||
6880 | ////////// | ||
6881 | // 1.2 Relation Declaration Indexers | ||
6882 | ////////// | ||
6883 | /** | ||
6884 | * Matcher for detecting tuples t where []incomingTransitions reference Vertex(source,target) | ||
6885 | */ | ||
6886 | private pattern mustInRelationincomingTransitions_reference_Vertex( | ||
6887 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6888 | source: DefinedElement, target:DefinedElement) | ||
6889 | { | ||
6890 | find interpretation(problem,interpretation); | ||
6891 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
6892 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex"); | ||
6893 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
6894 | BinaryElementRelationLink.param1(link,source); | ||
6895 | BinaryElementRelationLink.param2(link,target); | ||
6896 | } | ||
6897 | /** | ||
6898 | * Matcher for detecting tuples t where <>incomingTransitions reference Vertex(source,target) | ||
6899 | */ | ||
6900 | private pattern mayInRelationincomingTransitions_reference_Vertex( | ||
6901 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6902 | source: DefinedElement, target:DefinedElement) | ||
6903 | { | ||
6904 | find interpretation(problem,interpretation); | ||
6905 | // The two endpoint of the link have to exist | ||
6906 | find mayExist(problem, interpretation, source); | ||
6907 | find mayExist(problem, interpretation, target); | ||
6908 | // Type consistency | ||
6909 | find mayInstanceOfVertex_class(problem,interpretation,source); | ||
6910 | find mayInstanceOfTransition_class(problem,interpretation,target); | ||
6911 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
6912 | // the upper bound of the opposite reference multiplicity should be considered. | ||
6913 | numberOfExistingOppositeReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,target,_); | ||
6914 | check(numberOfExistingOppositeReferences < 1); | ||
6915 | } or { | ||
6916 | find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,source,target); | ||
6917 | } | ||
6918 | /** | ||
6919 | * Matcher for detecting tuples t where []outgoingTransitions reference Vertex(source,target) | ||
6920 | */ | ||
6921 | private pattern mustInRelationoutgoingTransitions_reference_Vertex( | ||
6922 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6923 | source: DefinedElement, target:DefinedElement) | ||
6924 | { | ||
6925 | find interpretation(problem,interpretation); | ||
6926 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
6927 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingTransitions reference Vertex"); | ||
6928 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
6929 | BinaryElementRelationLink.param1(link,source); | ||
6930 | BinaryElementRelationLink.param2(link,target); | ||
6931 | } | ||
6932 | /** | ||
6933 | * Matcher for detecting tuples t where <>outgoingTransitions reference Vertex(source,target) | ||
6934 | */ | ||
6935 | private pattern mayInRelationoutgoingTransitions_reference_Vertex( | ||
6936 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6937 | source: DefinedElement, target:DefinedElement) | ||
6938 | { | ||
6939 | find interpretation(problem,interpretation); | ||
6940 | // The two endpoint of the link have to exist | ||
6941 | find mayExist(problem, interpretation, source); | ||
6942 | find mayExist(problem, interpretation, target); | ||
6943 | // Type consistency | ||
6944 | find mayInstanceOfVertex_class(problem,interpretation,source); | ||
6945 | find mayInstanceOfTransition_class(problem,interpretation,target); | ||
6946 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
6947 | // the upper bound of the opposite reference multiplicity should be considered. | ||
6948 | numberOfExistingOppositeReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,target,_); | ||
6949 | check(numberOfExistingOppositeReferences < 1); | ||
6950 | // The reference is containment, then a new reference cannot be create if: | ||
6951 | // 1. Multiple parents | ||
6952 | neg find mustContains4(problem,interpretation,_,target); | ||
6953 | // 2. Circle in the containment hierarchy | ||
6954 | neg find mustTransitiveContains(source,target); | ||
6955 | } or { | ||
6956 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target); | ||
6957 | } | ||
6958 | /** | ||
6959 | * Matcher for detecting tuples t where []vertices reference Region(source,target) | ||
6960 | */ | ||
6961 | private pattern mustInRelationvertices_reference_Region( | ||
6962 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6963 | source: DefinedElement, target:DefinedElement) | ||
6964 | { | ||
6965 | find interpretation(problem,interpretation); | ||
6966 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
6967 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"vertices reference Region"); | ||
6968 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
6969 | BinaryElementRelationLink.param1(link,source); | ||
6970 | BinaryElementRelationLink.param2(link,target); | ||
6971 | } | ||
6972 | /** | ||
6973 | * Matcher for detecting tuples t where <>vertices reference Region(source,target) | ||
6974 | */ | ||
6975 | private pattern mayInRelationvertices_reference_Region( | ||
6976 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6977 | source: DefinedElement, target:DefinedElement) | ||
6978 | { | ||
6979 | find interpretation(problem,interpretation); | ||
6980 | // The two endpoint of the link have to exist | ||
6981 | find mayExist(problem, interpretation, source); | ||
6982 | find mayExist(problem, interpretation, target); | ||
6983 | // Type consistency | ||
6984 | find mayInstanceOfRegion_class(problem,interpretation,source); | ||
6985 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
6986 | // The reference is containment, then a new reference cannot be create if: | ||
6987 | // 1. Multiple parents | ||
6988 | neg find mustContains4(problem,interpretation,_,target); | ||
6989 | // 2. Circle in the containment hierarchy | ||
6990 | neg find mustTransitiveContains(source,target); | ||
6991 | } or { | ||
6992 | find mustInRelationvertices_reference_Region(problem,interpretation,source,target); | ||
6993 | } | ||
6994 | /** | ||
6995 | * Matcher for detecting tuples t where []target reference Transition(source,target) | ||
6996 | */ | ||
6997 | private pattern mustInRelationtarget_reference_Transition( | ||
6998 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
6999 | source: DefinedElement, target:DefinedElement) | ||
7000 | { | ||
7001 | find interpretation(problem,interpretation); | ||
7002 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
7003 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition"); | ||
7004 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
7005 | BinaryElementRelationLink.param1(link,source); | ||
7006 | BinaryElementRelationLink.param2(link,target); | ||
7007 | } | ||
7008 | /** | ||
7009 | * Matcher for detecting tuples t where <>target reference Transition(source,target) | ||
7010 | */ | ||
7011 | private pattern mayInRelationtarget_reference_Transition( | ||
7012 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7013 | source: DefinedElement, target:DefinedElement) | ||
7014 | { | ||
7015 | find interpretation(problem,interpretation); | ||
7016 | // The two endpoint of the link have to exist | ||
7017 | find mayExist(problem, interpretation, source); | ||
7018 | find mayExist(problem, interpretation, target); | ||
7019 | // Type consistency | ||
7020 | find mayInstanceOfTransition_class(problem,interpretation,source); | ||
7021 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
7022 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
7023 | // the upper bound of the multiplicity should be considered. | ||
7024 | numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,source,_); | ||
7025 | check(numberOfExistingReferences < 1); | ||
7026 | } or { | ||
7027 | find mustInRelationtarget_reference_Transition(problem,interpretation,source,target); | ||
7028 | } | ||
7029 | /** | ||
7030 | * Matcher for detecting tuples t where []source reference Transition(source,target) | ||
7031 | */ | ||
7032 | private pattern mustInRelationsource_reference_Transition( | ||
7033 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7034 | source: DefinedElement, target:DefinedElement) | ||
7035 | { | ||
7036 | find interpretation(problem,interpretation); | ||
7037 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
7038 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"source reference Transition"); | ||
7039 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
7040 | BinaryElementRelationLink.param1(link,source); | ||
7041 | BinaryElementRelationLink.param2(link,target); | ||
7042 | } | ||
7043 | /** | ||
7044 | * Matcher for detecting tuples t where <>source reference Transition(source,target) | ||
7045 | */ | ||
7046 | private pattern mayInRelationsource_reference_Transition( | ||
7047 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7048 | source: DefinedElement, target:DefinedElement) | ||
7049 | { | ||
7050 | find interpretation(problem,interpretation); | ||
7051 | // The two endpoint of the link have to exist | ||
7052 | find mayExist(problem, interpretation, source); | ||
7053 | find mayExist(problem, interpretation, target); | ||
7054 | // Type consistency | ||
7055 | find mayInstanceOfTransition_class(problem,interpretation,source); | ||
7056 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
7057 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
7058 | // the upper bound of the multiplicity should be considered. | ||
7059 | numberOfExistingReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,source,_); | ||
7060 | check(numberOfExistingReferences < 1); | ||
7061 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
7062 | // 1. Multiple parents | ||
7063 | neg find mustContains4(problem,interpretation,source,_); | ||
7064 | // 2. Circle in the containment hierarchy | ||
7065 | neg find mustTransitiveContains(source,target); | ||
7066 | } or { | ||
7067 | find mustInRelationsource_reference_Transition(problem,interpretation,source,target); | ||
7068 | } | ||
7069 | /** | ||
7070 | * Matcher for detecting tuples t where []regions reference CompositeElement(source,target) | ||
7071 | */ | ||
7072 | private pattern mustInRelationregions_reference_CompositeElement( | ||
7073 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7074 | source: DefinedElement, target:DefinedElement) | ||
7075 | { | ||
7076 | find interpretation(problem,interpretation); | ||
7077 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
7078 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"regions reference CompositeElement"); | ||
7079 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
7080 | BinaryElementRelationLink.param1(link,source); | ||
7081 | BinaryElementRelationLink.param2(link,target); | ||
7082 | } | ||
7083 | /** | ||
7084 | * Matcher for detecting tuples t where <>regions reference CompositeElement(source,target) | ||
7085 | */ | ||
7086 | private pattern mayInRelationregions_reference_CompositeElement( | ||
7087 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7088 | source: DefinedElement, target:DefinedElement) | ||
7089 | { | ||
7090 | find interpretation(problem,interpretation); | ||
7091 | // The two endpoint of the link have to exist | ||
7092 | find mayExist(problem, interpretation, source); | ||
7093 | find mayExist(problem, interpretation, target); | ||
7094 | // Type consistency | ||
7095 | find mayInstanceOfCompositeElement_class(problem,interpretation,source); | ||
7096 | find mayInstanceOfRegion_class(problem,interpretation,target); | ||
7097 | // The reference is containment, then a new reference cannot be create if: | ||
7098 | // 1. Multiple parents | ||
7099 | neg find mustContains4(problem,interpretation,_,target); | ||
7100 | // 2. Circle in the containment hierarchy | ||
7101 | neg find mustTransitiveContains(source,target); | ||
7102 | } or { | ||
7103 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target); | ||
7104 | } | ||
7105 | |||
7106 | ////////// | ||
7107 | // 1.3 Relation Definition Indexers | ||
7108 | ////////// | ||
7109 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries entryInRegion | ||
7110 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
7111 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7112 | var_r1, var_e1) | ||
7113 | { | ||
7114 | find interpretation(problem,interpretation); | ||
7115 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
7116 | find mustInstanceOfEntry_class(problem,interpretation,var_e1); | ||
7117 | // r1 is exported | ||
7118 | // e1 is exported | ||
7119 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
7120 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
7121 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
7122 | var_virtual0 == var_e1; | ||
7123 | } | ||
7124 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
7125 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7126 | var_r1, var_e1) | ||
7127 | { | ||
7128 | find interpretation(problem,interpretation); | ||
7129 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
7130 | find mayInstanceOfEntry_class(problem,interpretation,var_e1); | ||
7131 | // r1 is exported | ||
7132 | // e1 is exported | ||
7133 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
7134 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
7135 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
7136 | find mayEquivalent(problem, interpretation, var_virtual0, var_e1); | ||
7137 | } | ||
7138 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
7139 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7140 | var_r1, var_e1) | ||
7141 | { | ||
7142 | find interpretation(problem,interpretation); | ||
7143 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
7144 | find mustInstanceOfEntry_class(problem,interpretation,var_e1); | ||
7145 | // r1 is exported | ||
7146 | // e1 is exported | ||
7147 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
7148 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
7149 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
7150 | var_virtual0 == var_e1; | ||
7151 | } | ||
7152 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noEntryInRegion | ||
7153 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
7154 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7155 | var_r1) | ||
7156 | { | ||
7157 | find interpretation(problem,interpretation); | ||
7158 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
7159 | // r1 is exported | ||
7160 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
7161 | } | ||
7162 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
7163 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7164 | var_r1) | ||
7165 | { | ||
7166 | find interpretation(problem,interpretation); | ||
7167 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
7168 | // r1 is exported | ||
7169 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
7170 | } | ||
7171 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
7172 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7173 | var_r1) | ||
7174 | { | ||
7175 | find interpretation(problem,interpretation); | ||
7176 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
7177 | // r1 is exported | ||
7178 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
7179 | } | ||
7180 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleEntryInRegion | ||
7181 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
7182 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7183 | var_r) | ||
7184 | { | ||
7185 | find interpretation(problem,interpretation); | ||
7186 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
7187 | // r is exported | ||
7188 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
7189 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
7190 | neg find mayEquivalent(problem, interpretation, var_e1, var_e2); | ||
7191 | } | ||
7192 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
7193 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7194 | var_r) | ||
7195 | { | ||
7196 | find interpretation(problem,interpretation); | ||
7197 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
7198 | // r is exported | ||
7199 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
7200 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
7201 | var_e1 != var_e2; | ||
7202 | } | ||
7203 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
7204 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7205 | var_r) | ||
7206 | { | ||
7207 | find interpretation(problem,interpretation); | ||
7208 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
7209 | // r is exported | ||
7210 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
7211 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
7212 | var_e1 != var_e2; | ||
7213 | } | ||
7214 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries transition | ||
7215 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
7216 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7217 | var_t, var_src, var_trg) | ||
7218 | { | ||
7219 | find interpretation(problem,interpretation); | ||
7220 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
7221 | find mustInstanceOfVertex_class(problem,interpretation,var_src); | ||
7222 | find mustInstanceOfVertex_class(problem,interpretation,var_trg); | ||
7223 | // t is exported | ||
7224 | // src is exported | ||
7225 | // trg is exported | ||
7226 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
7227 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
7228 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
7229 | var_virtual0 == var_src; | ||
7230 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
7231 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
7232 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
7233 | var_virtual1 == var_trg; | ||
7234 | } | ||
7235 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
7236 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7237 | var_t, var_src, var_trg) | ||
7238 | { | ||
7239 | find interpretation(problem,interpretation); | ||
7240 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
7241 | find mayInstanceOfVertex_class(problem,interpretation,var_src); | ||
7242 | find mayInstanceOfVertex_class(problem,interpretation,var_trg); | ||
7243 | // t is exported | ||
7244 | // src is exported | ||
7245 | // trg is exported | ||
7246 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
7247 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
7248 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
7249 | find mayEquivalent(problem, interpretation, var_virtual0, var_src); | ||
7250 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
7251 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
7252 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
7253 | find mayEquivalent(problem, interpretation, var_virtual1, var_trg); | ||
7254 | } | ||
7255 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
7256 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7257 | var_t, var_src, var_trg) | ||
7258 | { | ||
7259 | find interpretation(problem,interpretation); | ||
7260 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
7261 | find mustInstanceOfVertex_class(problem,interpretation,var_src); | ||
7262 | find mustInstanceOfVertex_class(problem,interpretation,var_trg); | ||
7263 | // t is exported | ||
7264 | // src is exported | ||
7265 | // trg is exported | ||
7266 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
7267 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
7268 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
7269 | var_virtual0 == var_src; | ||
7270 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
7271 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
7272 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
7273 | var_virtual1 == var_trg; | ||
7274 | } | ||
7275 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries incomingToEntry | ||
7276 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
7277 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7278 | var_t, var_e) | ||
7279 | { | ||
7280 | find interpretation(problem,interpretation); | ||
7281 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
7282 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
7283 | // t is exported | ||
7284 | // e is exported | ||
7285 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
7286 | } | ||
7287 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
7288 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7289 | var_t, var_e) | ||
7290 | { | ||
7291 | find interpretation(problem,interpretation); | ||
7292 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
7293 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
7294 | // t is exported | ||
7295 | // e is exported | ||
7296 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
7297 | } | ||
7298 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
7299 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7300 | var_t, var_e) | ||
7301 | { | ||
7302 | find interpretation(problem,interpretation); | ||
7303 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
7304 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
7305 | // t is exported | ||
7306 | // e is exported | ||
7307 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
7308 | } | ||
7309 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noOutgoingTransitionFromEntry | ||
7310 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
7311 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7312 | var_e) | ||
7313 | { | ||
7314 | find interpretation(problem,interpretation); | ||
7315 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
7316 | // e is exported | ||
7317 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
7318 | } | ||
7319 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
7320 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7321 | var_e) | ||
7322 | { | ||
7323 | find interpretation(problem,interpretation); | ||
7324 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
7325 | // e is exported | ||
7326 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
7327 | } | ||
7328 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
7329 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7330 | var_e) | ||
7331 | { | ||
7332 | find interpretation(problem,interpretation); | ||
7333 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
7334 | // e is exported | ||
7335 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
7336 | } | ||
7337 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleTransitionFromEntry | ||
7338 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
7339 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7340 | var_e, var_t1, var_t2) | ||
7341 | { | ||
7342 | find interpretation(problem,interpretation); | ||
7343 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
7344 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
7345 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
7346 | // e is exported | ||
7347 | // t1 is exported | ||
7348 | // t2 is exported | ||
7349 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
7350 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
7351 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
7352 | var_virtual0 == var_t1; | ||
7353 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
7354 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
7355 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
7356 | var_virtual1 == var_t2; | ||
7357 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
7358 | } | ||
7359 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
7360 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7361 | var_e, var_t1, var_t2) | ||
7362 | { | ||
7363 | find interpretation(problem,interpretation); | ||
7364 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
7365 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
7366 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
7367 | // e is exported | ||
7368 | // t1 is exported | ||
7369 | // t2 is exported | ||
7370 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
7371 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
7372 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
7373 | find mayEquivalent(problem, interpretation, var_virtual0, var_t1); | ||
7374 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
7375 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
7376 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
7377 | find mayEquivalent(problem, interpretation, var_virtual1, var_t2); | ||
7378 | var_t1 != var_t2; | ||
7379 | } | ||
7380 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
7381 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7382 | var_e, var_t1, var_t2) | ||
7383 | { | ||
7384 | find interpretation(problem,interpretation); | ||
7385 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
7386 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
7387 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
7388 | // e is exported | ||
7389 | // t1 is exported | ||
7390 | // t2 is exported | ||
7391 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
7392 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
7393 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
7394 | var_virtual0 == var_t1; | ||
7395 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
7396 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
7397 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
7398 | var_virtual1 == var_t2; | ||
7399 | var_t1 != var_t2; | ||
7400 | } | ||
7401 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromExit | ||
7402 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
7403 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7404 | var_t, var_e) | ||
7405 | { | ||
7406 | find interpretation(problem,interpretation); | ||
7407 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
7408 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
7409 | // t is exported | ||
7410 | // e is exported | ||
7411 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
7412 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
7413 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
7414 | var_virtual0 == var_t; | ||
7415 | } | ||
7416 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
7417 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7418 | var_t, var_e) | ||
7419 | { | ||
7420 | find interpretation(problem,interpretation); | ||
7421 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
7422 | find mayInstanceOfExit_class(problem,interpretation,var_e); | ||
7423 | // t is exported | ||
7424 | // e is exported | ||
7425 | find mayInstanceOfExit_class(problem,interpretation,var_e); | ||
7426 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
7427 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
7428 | find mayEquivalent(problem, interpretation, var_virtual0, var_t); | ||
7429 | } | ||
7430 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
7431 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7432 | var_t, var_e) | ||
7433 | { | ||
7434 | find interpretation(problem,interpretation); | ||
7435 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
7436 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
7437 | // t is exported | ||
7438 | // e is exported | ||
7439 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
7440 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
7441 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
7442 | var_virtual0 == var_t; | ||
7443 | } | ||
7444 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromFinal | ||
7445 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
7446 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7447 | var_t, var_f) | ||
7448 | { | ||
7449 | find interpretation(problem,interpretation); | ||
7450 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
7451 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
7452 | // t is exported | ||
7453 | // f is exported | ||
7454 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
7455 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
7456 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
7457 | var_virtual0 == var_t; | ||
7458 | } | ||
7459 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
7460 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7461 | var_t, var_f) | ||
7462 | { | ||
7463 | find interpretation(problem,interpretation); | ||
7464 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
7465 | find mayInstanceOfFinalState_class(problem,interpretation,var_f); | ||
7466 | // t is exported | ||
7467 | // f is exported | ||
7468 | find mayInstanceOfFinalState_class(problem,interpretation,var_f); | ||
7469 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
7470 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
7471 | find mayEquivalent(problem, interpretation, var_virtual0, var_t); | ||
7472 | } | ||
7473 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
7474 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7475 | var_t, var_f) | ||
7476 | { | ||
7477 | find interpretation(problem,interpretation); | ||
7478 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
7479 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
7480 | // t is exported | ||
7481 | // f is exported | ||
7482 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
7483 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
7484 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
7485 | var_virtual0 == var_t; | ||
7486 | } | ||
7487 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noStateInRegion | ||
7488 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
7489 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7490 | var_region) | ||
7491 | { | ||
7492 | find interpretation(problem,interpretation); | ||
7493 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
7494 | // region is exported | ||
7495 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
7496 | } | ||
7497 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
7498 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7499 | var_region) | ||
7500 | { | ||
7501 | find interpretation(problem,interpretation); | ||
7502 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
7503 | // region is exported | ||
7504 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
7505 | } | ||
7506 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
7507 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7508 | var_region) | ||
7509 | { | ||
7510 | find interpretation(problem,interpretation); | ||
7511 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
7512 | // region is exported | ||
7513 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
7514 | } | ||
7515 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries StateInRegion | ||
7516 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
7517 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7518 | var_region, var_state) | ||
7519 | { | ||
7520 | find interpretation(problem,interpretation); | ||
7521 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
7522 | find mustInstanceOfState_class(problem,interpretation,var_state); | ||
7523 | // region is exported | ||
7524 | // state is exported | ||
7525 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
7526 | find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
7527 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
7528 | var_virtual0 == var_state; | ||
7529 | } | ||
7530 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
7531 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7532 | var_region, var_state) | ||
7533 | { | ||
7534 | find interpretation(problem,interpretation); | ||
7535 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
7536 | find mayInstanceOfState_class(problem,interpretation,var_state); | ||
7537 | // region is exported | ||
7538 | // state is exported | ||
7539 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
7540 | find mayInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
7541 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
7542 | find mayEquivalent(problem, interpretation, var_virtual0, var_state); | ||
7543 | } | ||
7544 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
7545 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7546 | var_region, var_state) | ||
7547 | { | ||
7548 | find interpretation(problem,interpretation); | ||
7549 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
7550 | find mustInstanceOfState_class(problem,interpretation,var_state); | ||
7551 | // region is exported | ||
7552 | // state is exported | ||
7553 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
7554 | find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
7555 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
7556 | var_virtual0 == var_state; | ||
7557 | } | ||
7558 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoOutgoing | ||
7559 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
7560 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7561 | var_c) | ||
7562 | { | ||
7563 | find interpretation(problem,interpretation); | ||
7564 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
7565 | // c is exported | ||
7566 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
7567 | } | ||
7568 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
7569 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7570 | var_c) | ||
7571 | { | ||
7572 | find interpretation(problem,interpretation); | ||
7573 | find mayInstanceOfChoice_class(problem,interpretation,var_c); | ||
7574 | // c is exported | ||
7575 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
7576 | } | ||
7577 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
7578 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7579 | var_c) | ||
7580 | { | ||
7581 | find interpretation(problem,interpretation); | ||
7582 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
7583 | // c is exported | ||
7584 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
7585 | } | ||
7586 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoIncoming | ||
7587 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
7588 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7589 | var_c) | ||
7590 | { | ||
7591 | find interpretation(problem,interpretation); | ||
7592 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
7593 | // c is exported | ||
7594 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
7595 | } | ||
7596 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
7597 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7598 | var_c) | ||
7599 | { | ||
7600 | find interpretation(problem,interpretation); | ||
7601 | find mayInstanceOfChoice_class(problem,interpretation,var_c); | ||
7602 | // c is exported | ||
7603 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
7604 | } | ||
7605 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
7606 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7607 | var_c) | ||
7608 | { | ||
7609 | find interpretation(problem,interpretation); | ||
7610 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
7611 | // c is exported | ||
7612 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
7613 | } | ||
7614 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoOutgoing | ||
7615 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
7616 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7617 | var_s) | ||
7618 | { | ||
7619 | find interpretation(problem,interpretation); | ||
7620 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7621 | // s is exported | ||
7622 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
7623 | } | ||
7624 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
7625 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7626 | var_s) | ||
7627 | { | ||
7628 | find interpretation(problem,interpretation); | ||
7629 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7630 | // s is exported | ||
7631 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
7632 | } | ||
7633 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
7634 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7635 | var_s) | ||
7636 | { | ||
7637 | find interpretation(problem,interpretation); | ||
7638 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7639 | // s is exported | ||
7640 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
7641 | } | ||
7642 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoIncoming | ||
7643 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
7644 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7645 | var_s) | ||
7646 | { | ||
7647 | find interpretation(problem,interpretation); | ||
7648 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7649 | // s is exported | ||
7650 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
7651 | } | ||
7652 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
7653 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7654 | var_s) | ||
7655 | { | ||
7656 | find interpretation(problem,interpretation); | ||
7657 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7658 | // s is exported | ||
7659 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
7660 | } | ||
7661 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
7662 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7663 | var_s) | ||
7664 | { | ||
7665 | find interpretation(problem,interpretation); | ||
7666 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7667 | // s is exported | ||
7668 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
7669 | } | ||
7670 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedIncomingInSameRegion | ||
7671 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
7672 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7673 | var_s, var_v1, var_v2) | ||
7674 | { | ||
7675 | find interpretation(problem,interpretation); | ||
7676 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7677 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
7678 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
7679 | // s is exported | ||
7680 | // v1 is exported | ||
7681 | // v2 is exported | ||
7682 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
7683 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
7684 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
7685 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
7686 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
7687 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
7688 | var_virtual0 == var_v1; | ||
7689 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
7690 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
7691 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
7692 | var_virtual1 == var_v2; | ||
7693 | }or{ | ||
7694 | find interpretation(problem,interpretation); | ||
7695 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7696 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
7697 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
7698 | // s is exported | ||
7699 | // v1 is exported | ||
7700 | // v2 is exported | ||
7701 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
7702 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
7703 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
7704 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
7705 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
7706 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
7707 | var_virtual0 == var_v1; | ||
7708 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
7709 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
7710 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
7711 | var_virtual1 == var_v2; | ||
7712 | } | ||
7713 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
7714 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7715 | var_s, var_v1, var_v2) | ||
7716 | { | ||
7717 | find interpretation(problem,interpretation); | ||
7718 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7719 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
7720 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
7721 | // s is exported | ||
7722 | // v1 is exported | ||
7723 | // v2 is exported | ||
7724 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
7725 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
7726 | var_t1 != var_t2; | ||
7727 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
7728 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
7729 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
7730 | find mayEquivalent(problem, interpretation, var_virtual0, var_v1); | ||
7731 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
7732 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
7733 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
7734 | find mayEquivalent(problem, interpretation, var_virtual1, var_v2); | ||
7735 | }or{ | ||
7736 | find interpretation(problem,interpretation); | ||
7737 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7738 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
7739 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
7740 | // s is exported | ||
7741 | // v1 is exported | ||
7742 | // v2 is exported | ||
7743 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
7744 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
7745 | var_t1 != var_t2; | ||
7746 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
7747 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
7748 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
7749 | find mayEquivalent(problem, interpretation, var_virtual0, var_v1); | ||
7750 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
7751 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
7752 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
7753 | find mayEquivalent(problem, interpretation, var_virtual1, var_v2); | ||
7754 | } | ||
7755 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
7756 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7757 | var_s, var_v1, var_v2) | ||
7758 | { | ||
7759 | find interpretation(problem,interpretation); | ||
7760 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7761 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
7762 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
7763 | // s is exported | ||
7764 | // v1 is exported | ||
7765 | // v2 is exported | ||
7766 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
7767 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
7768 | var_t1 != var_t2; | ||
7769 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
7770 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
7771 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
7772 | var_virtual0 == var_v1; | ||
7773 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
7774 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
7775 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
7776 | var_virtual1 == var_v2; | ||
7777 | }or{ | ||
7778 | find interpretation(problem,interpretation); | ||
7779 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7780 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
7781 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
7782 | // s is exported | ||
7783 | // v1 is exported | ||
7784 | // v2 is exported | ||
7785 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
7786 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
7787 | var_t1 != var_t2; | ||
7788 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
7789 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
7790 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
7791 | var_virtual0 == var_v1; | ||
7792 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
7793 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
7794 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
7795 | var_virtual1 == var_v2; | ||
7796 | } | ||
7797 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries notSynchronizingStates | ||
7798 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
7799 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7800 | var_s) | ||
7801 | { | ||
7802 | find interpretation(problem,interpretation); | ||
7803 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7804 | // s is exported | ||
7805 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
7806 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
7807 | } | ||
7808 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
7809 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7810 | var_s) | ||
7811 | { | ||
7812 | find interpretation(problem,interpretation); | ||
7813 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7814 | // s is exported | ||
7815 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
7816 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
7817 | } | ||
7818 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
7819 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7820 | var_s) | ||
7821 | { | ||
7822 | find interpretation(problem,interpretation); | ||
7823 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7824 | // s is exported | ||
7825 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
7826 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
7827 | } | ||
7828 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleOutgoingTrainsition | ||
7829 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
7830 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7831 | var_v) | ||
7832 | { | ||
7833 | find interpretation(problem,interpretation); | ||
7834 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
7835 | // v is exported | ||
7836 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
7837 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
7838 | neg find mayEquivalent(problem, interpretation, var_trg1, var_trg2); | ||
7839 | } | ||
7840 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
7841 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7842 | var_v) | ||
7843 | { | ||
7844 | find interpretation(problem,interpretation); | ||
7845 | find mayInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
7846 | // v is exported | ||
7847 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
7848 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
7849 | var_trg1 != var_trg2; | ||
7850 | } | ||
7851 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
7852 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7853 | var_v) | ||
7854 | { | ||
7855 | find interpretation(problem,interpretation); | ||
7856 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
7857 | // v is exported | ||
7858 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
7859 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
7860 | var_trg1 != var_trg2; | ||
7861 | } | ||
7862 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleIncomingTrainsition | ||
7863 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
7864 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7865 | var_v) | ||
7866 | { | ||
7867 | find interpretation(problem,interpretation); | ||
7868 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
7869 | // v is exported | ||
7870 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
7871 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
7872 | neg find mayEquivalent(problem, interpretation, var_src1, var_src2); | ||
7873 | } | ||
7874 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
7875 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7876 | var_v) | ||
7877 | { | ||
7878 | find interpretation(problem,interpretation); | ||
7879 | find mayInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
7880 | // v is exported | ||
7881 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
7882 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
7883 | var_src1 != var_src2; | ||
7884 | } | ||
7885 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
7886 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7887 | var_v) | ||
7888 | { | ||
7889 | find interpretation(problem,interpretation); | ||
7890 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
7891 | // v is exported | ||
7892 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
7893 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
7894 | var_src1 != var_src2; | ||
7895 | } | ||
7896 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionsAreNotSiblings | ||
7897 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
7898 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7899 | var_s, var_v1, var_v2) | ||
7900 | { | ||
7901 | find interpretation(problem,interpretation); | ||
7902 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7903 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
7904 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
7905 | // s is exported | ||
7906 | // v1 is exported | ||
7907 | // v2 is exported | ||
7908 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
7909 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
7910 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
7911 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
7912 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
7913 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
7914 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
7915 | var_virtual1 == var_v1; | ||
7916 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
7917 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
7918 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
7919 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
7920 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
7921 | var_virtual3 == var_v2; | ||
7922 | neg find mayEquivalent(problem, interpretation, var_r1, var_r2); | ||
7923 | }or{ | ||
7924 | find interpretation(problem,interpretation); | ||
7925 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7926 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
7927 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
7928 | // s is exported | ||
7929 | // v1 is exported | ||
7930 | // v2 is exported | ||
7931 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
7932 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
7933 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
7934 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
7935 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
7936 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
7937 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
7938 | var_virtual1 == var_v1; | ||
7939 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
7940 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
7941 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
7942 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
7943 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
7944 | var_virtual3 == var_v2; | ||
7945 | neg find mayEquivalent(problem, interpretation, var_r1, var_r2); | ||
7946 | } | ||
7947 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
7948 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7949 | var_s, var_v1, var_v2) | ||
7950 | { | ||
7951 | find interpretation(problem,interpretation); | ||
7952 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7953 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
7954 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
7955 | // s is exported | ||
7956 | // v1 is exported | ||
7957 | // v2 is exported | ||
7958 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
7959 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
7960 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
7961 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
7962 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
7963 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
7964 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
7965 | find mayEquivalent(problem, interpretation, var_virtual1, var_v1); | ||
7966 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
7967 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
7968 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
7969 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
7970 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
7971 | find mayEquivalent(problem, interpretation, var_virtual3, var_v2); | ||
7972 | var_r1 != var_r2; | ||
7973 | }or{ | ||
7974 | find interpretation(problem,interpretation); | ||
7975 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
7976 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
7977 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
7978 | // s is exported | ||
7979 | // v1 is exported | ||
7980 | // v2 is exported | ||
7981 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
7982 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
7983 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
7984 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
7985 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
7986 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
7987 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
7988 | find mayEquivalent(problem, interpretation, var_virtual1, var_v1); | ||
7989 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
7990 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
7991 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
7992 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
7993 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
7994 | find mayEquivalent(problem, interpretation, var_virtual3, var_v2); | ||
7995 | var_r1 != var_r2; | ||
7996 | } | ||
7997 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
7998 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
7999 | var_s, var_v1, var_v2) | ||
8000 | { | ||
8001 | find interpretation(problem,interpretation); | ||
8002 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
8003 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
8004 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
8005 | // s is exported | ||
8006 | // v1 is exported | ||
8007 | // v2 is exported | ||
8008 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
8009 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
8010 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
8011 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
8012 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
8013 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
8014 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
8015 | var_virtual1 == var_v1; | ||
8016 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
8017 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
8018 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
8019 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
8020 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
8021 | var_virtual3 == var_v2; | ||
8022 | var_r1 != var_r2; | ||
8023 | }or{ | ||
8024 | find interpretation(problem,interpretation); | ||
8025 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
8026 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
8027 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
8028 | // s is exported | ||
8029 | // v1 is exported | ||
8030 | // v2 is exported | ||
8031 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
8032 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
8033 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
8034 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
8035 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
8036 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
8037 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
8038 | var_virtual1 == var_v1; | ||
8039 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
8040 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
8041 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
8042 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
8043 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
8044 | var_virtual3 == var_v2; | ||
8045 | var_r1 != var_r2; | ||
8046 | } | ||
8047 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries child | ||
8048 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
8049 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8050 | var_parent, var_child) | ||
8051 | { | ||
8052 | find interpretation(problem,interpretation); | ||
8053 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
8054 | find mustInstanceOfVertex_class(problem,interpretation,var_child); | ||
8055 | // parent is exported | ||
8056 | // child is exported | ||
8057 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
8058 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
8059 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
8060 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
8061 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
8062 | var_virtual1 == var_child; | ||
8063 | } | ||
8064 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
8065 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8066 | var_parent, var_child) | ||
8067 | { | ||
8068 | find interpretation(problem,interpretation); | ||
8069 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
8070 | find mayInstanceOfVertex_class(problem,interpretation,var_child); | ||
8071 | // parent is exported | ||
8072 | // child is exported | ||
8073 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
8074 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
8075 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
8076 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
8077 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
8078 | find mayEquivalent(problem, interpretation, var_virtual1, var_child); | ||
8079 | } | ||
8080 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
8081 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8082 | var_parent, var_child) | ||
8083 | { | ||
8084 | find interpretation(problem,interpretation); | ||
8085 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
8086 | find mustInstanceOfVertex_class(problem,interpretation,var_child); | ||
8087 | // parent is exported | ||
8088 | // child is exported | ||
8089 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
8090 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
8091 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
8092 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
8093 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
8094 | var_virtual1 == var_child; | ||
8095 | } | ||
8096 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionDoesNotHaveMultipleRegions | ||
8097 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
8098 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8099 | var_s, var_v) | ||
8100 | { | ||
8101 | find interpretation(problem,interpretation); | ||
8102 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
8103 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
8104 | // s is exported | ||
8105 | // v is exported | ||
8106 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
8107 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
8108 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
8109 | }or{ | ||
8110 | find interpretation(problem,interpretation); | ||
8111 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
8112 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
8113 | // s is exported | ||
8114 | // v is exported | ||
8115 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
8116 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
8117 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
8118 | } | ||
8119 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
8120 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8121 | var_s, var_v) | ||
8122 | { | ||
8123 | find interpretation(problem,interpretation); | ||
8124 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
8125 | find mayInstanceOfVertex_class(problem,interpretation,var_v); | ||
8126 | // s is exported | ||
8127 | // v is exported | ||
8128 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
8129 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
8130 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
8131 | }or{ | ||
8132 | find interpretation(problem,interpretation); | ||
8133 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
8134 | find mayInstanceOfVertex_class(problem,interpretation,var_v); | ||
8135 | // s is exported | ||
8136 | // v is exported | ||
8137 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
8138 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
8139 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
8140 | } | ||
8141 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
8142 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8143 | var_s, var_v) | ||
8144 | { | ||
8145 | find interpretation(problem,interpretation); | ||
8146 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
8147 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
8148 | // s is exported | ||
8149 | // v is exported | ||
8150 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
8151 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
8152 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
8153 | }or{ | ||
8154 | find interpretation(problem,interpretation); | ||
8155 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
8156 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
8157 | // s is exported | ||
8158 | // v is exported | ||
8159 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
8160 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
8161 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
8162 | } | ||
8163 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleRegions | ||
8164 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
8165 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8166 | var_composite) | ||
8167 | { | ||
8168 | find interpretation(problem,interpretation); | ||
8169 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
8170 | // composite is exported | ||
8171 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
8172 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
8173 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
8174 | var_virtual0 == var_region1; | ||
8175 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
8176 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
8177 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
8178 | var_virtual1 == var_region2; | ||
8179 | neg find mayEquivalent(problem, interpretation, var_region1, var_region2); | ||
8180 | } | ||
8181 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
8182 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8183 | var_composite) | ||
8184 | { | ||
8185 | find interpretation(problem,interpretation); | ||
8186 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
8187 | // composite is exported | ||
8188 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
8189 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
8190 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
8191 | find mayEquivalent(problem, interpretation, var_virtual0, var_region1); | ||
8192 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
8193 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
8194 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
8195 | find mayEquivalent(problem, interpretation, var_virtual1, var_region2); | ||
8196 | var_region1 != var_region2; | ||
8197 | } | ||
8198 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
8199 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8200 | var_composite) | ||
8201 | { | ||
8202 | find interpretation(problem,interpretation); | ||
8203 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
8204 | // composite is exported | ||
8205 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
8206 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
8207 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
8208 | var_virtual0 == var_region1; | ||
8209 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
8210 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
8211 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
8212 | var_virtual1 == var_region2; | ||
8213 | var_region1 != var_region2; | ||
8214 | } | ||
8215 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchThree | ||
8216 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
8217 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8218 | var_s) | ||
8219 | { | ||
8220 | find interpretation(problem,interpretation); | ||
8221 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
8222 | // s is exported | ||
8223 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
8224 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
8225 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
8226 | var_virtual0 == var_s; | ||
8227 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
8228 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
8229 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
8230 | var_virtual1 == var_s; | ||
8231 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
8232 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
8233 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
8234 | var_virtual2 == var_s; | ||
8235 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
8236 | neg find mayEquivalent(problem, interpretation, var_t2, var_t3); | ||
8237 | neg find mayEquivalent(problem, interpretation, var_t1, var_t3); | ||
8238 | }or{ | ||
8239 | find interpretation(problem,interpretation); | ||
8240 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
8241 | // s is exported | ||
8242 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
8243 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
8244 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
8245 | var_virtual0 == var_s; | ||
8246 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
8247 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
8248 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
8249 | var_virtual1 == var_s; | ||
8250 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
8251 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
8252 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
8253 | var_virtual2 == var_s; | ||
8254 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
8255 | neg find mayEquivalent(problem, interpretation, var_t2, var_t3); | ||
8256 | neg find mayEquivalent(problem, interpretation, var_t1, var_t3); | ||
8257 | } | ||
8258 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
8259 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8260 | var_s) | ||
8261 | { | ||
8262 | find interpretation(problem,interpretation); | ||
8263 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
8264 | // s is exported | ||
8265 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
8266 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
8267 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
8268 | find mayEquivalent(problem, interpretation, var_virtual0, var_s); | ||
8269 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
8270 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
8271 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
8272 | find mayEquivalent(problem, interpretation, var_virtual1, var_s); | ||
8273 | find mayInstanceOfTransition_class(problem,interpretation,var_t3); | ||
8274 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
8275 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
8276 | find mayEquivalent(problem, interpretation, var_virtual2, var_s); | ||
8277 | var_t1 != var_t2; | ||
8278 | var_t2 != var_t3; | ||
8279 | var_t1 != var_t3; | ||
8280 | }or{ | ||
8281 | find interpretation(problem,interpretation); | ||
8282 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
8283 | // s is exported | ||
8284 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
8285 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
8286 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
8287 | find mayEquivalent(problem, interpretation, var_virtual0, var_s); | ||
8288 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
8289 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
8290 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
8291 | find mayEquivalent(problem, interpretation, var_virtual1, var_s); | ||
8292 | find mayInstanceOfTransition_class(problem,interpretation,var_t3); | ||
8293 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
8294 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
8295 | find mayEquivalent(problem, interpretation, var_virtual2, var_s); | ||
8296 | var_t1 != var_t2; | ||
8297 | var_t2 != var_t3; | ||
8298 | var_t1 != var_t3; | ||
8299 | } | ||
8300 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
8301 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8302 | var_s) | ||
8303 | { | ||
8304 | find interpretation(problem,interpretation); | ||
8305 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
8306 | // s is exported | ||
8307 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
8308 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
8309 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
8310 | var_virtual0 == var_s; | ||
8311 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
8312 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
8313 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
8314 | var_virtual1 == var_s; | ||
8315 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
8316 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
8317 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
8318 | var_virtual2 == var_s; | ||
8319 | var_t1 != var_t2; | ||
8320 | var_t2 != var_t3; | ||
8321 | var_t1 != var_t3; | ||
8322 | }or{ | ||
8323 | find interpretation(problem,interpretation); | ||
8324 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
8325 | // s is exported | ||
8326 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
8327 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
8328 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
8329 | var_virtual0 == var_s; | ||
8330 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
8331 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
8332 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
8333 | var_virtual1 == var_s; | ||
8334 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
8335 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
8336 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
8337 | var_virtual2 == var_s; | ||
8338 | var_t1 != var_t2; | ||
8339 | var_t2 != var_t3; | ||
8340 | var_t1 != var_t3; | ||
8341 | } | ||
8342 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries twoSynch | ||
8343 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
8344 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8345 | var_s1, var_s2) | ||
8346 | { | ||
8347 | find interpretation(problem,interpretation); | ||
8348 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
8349 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
8350 | // s1 is exported | ||
8351 | // s2 is exported | ||
8352 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
8353 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
8354 | neg find mayEquivalent(problem, interpretation, var_s1, var_s2); | ||
8355 | } | ||
8356 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
8357 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8358 | var_s1, var_s2) | ||
8359 | { | ||
8360 | find interpretation(problem,interpretation); | ||
8361 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
8362 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
8363 | // s1 is exported | ||
8364 | // s2 is exported | ||
8365 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
8366 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
8367 | var_s1 != var_s2; | ||
8368 | } | ||
8369 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
8370 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8371 | var_s1, var_s2) | ||
8372 | { | ||
8373 | find interpretation(problem,interpretation); | ||
8374 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
8375 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
8376 | // s1 is exported | ||
8377 | // s2 is exported | ||
8378 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
8379 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
8380 | var_s1 != var_s2; | ||
8381 | } | ||
8382 | |||
8383 | ////////// | ||
8384 | // 1.4 Containment Indexer | ||
8385 | ////////// | ||
8386 | private pattern mustContains2(source: DefinedElement, target: DefinedElement) { | ||
8387 | find mustContains4(_,_,source,target); | ||
8388 | } | ||
8389 | |||
8390 | private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8391 | source: DefinedElement, target: DefinedElement) | ||
8392 | { find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target); }or | ||
8393 | |||
8394 | { find mustInRelationvertices_reference_Region(problem,interpretation,source,target); }or | ||
8395 | |||
8396 | { find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target); } | ||
8397 | |||
8398 | private pattern mustTransitiveContains(source,target) { | ||
8399 | find mustContains2+(source,target); | ||
8400 | } | ||
8401 | |||
8402 | ////////// | ||
8403 | // 2. Invalidation Indexers | ||
8404 | ////////// | ||
8405 | // 2.1 Invalidated by WF Queries | ||
8406 | ////////// | ||
8407 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8408 | var_r1) | ||
8409 | { | ||
8410 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1); | ||
8411 | } | ||
8412 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8413 | var_r) | ||
8414 | { | ||
8415 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r); | ||
8416 | } | ||
8417 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8418 | var_t, var_e) | ||
8419 | { | ||
8420 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e); | ||
8421 | } | ||
8422 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8423 | var_e) | ||
8424 | { | ||
8425 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e); | ||
8426 | } | ||
8427 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8428 | var_e, var_t1, var_t2) | ||
8429 | { | ||
8430 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2); | ||
8431 | } | ||
8432 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8433 | var_t, var_e) | ||
8434 | { | ||
8435 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e); | ||
8436 | } | ||
8437 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8438 | var_t, var_f) | ||
8439 | { | ||
8440 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f); | ||
8441 | } | ||
8442 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8443 | var_region) | ||
8444 | { | ||
8445 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region); | ||
8446 | } | ||
8447 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8448 | var_c) | ||
8449 | { | ||
8450 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c); | ||
8451 | } | ||
8452 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8453 | var_c) | ||
8454 | { | ||
8455 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c); | ||
8456 | } | ||
8457 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8458 | var_s) | ||
8459 | { | ||
8460 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s); | ||
8461 | } | ||
8462 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8463 | var_s) | ||
8464 | { | ||
8465 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s); | ||
8466 | } | ||
8467 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8468 | var_s, var_v1, var_v2) | ||
8469 | { | ||
8470 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2); | ||
8471 | } | ||
8472 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8473 | var_s) | ||
8474 | { | ||
8475 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s); | ||
8476 | } | ||
8477 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8478 | var_s, var_v1, var_v2) | ||
8479 | { | ||
8480 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2); | ||
8481 | } | ||
8482 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8483 | var_s, var_v) | ||
8484 | { | ||
8485 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v); | ||
8486 | } | ||
8487 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8488 | var_s) | ||
8489 | { | ||
8490 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s); | ||
8491 | } | ||
8492 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8493 | var_s1, var_s2) | ||
8494 | { | ||
8495 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2); | ||
8496 | } | ||
8497 | |||
8498 | ////////// | ||
8499 | // 3. Unfinishedness Indexers | ||
8500 | ////////// | ||
8501 | // 3.1 Unfinishedness Measured by Multiplicity | ||
8502 | ////////// | ||
8503 | pattern unfinishedLowerMultiplicity_target_reference_Transition(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
8504 | find interpretation(problem,interpretation); | ||
8505 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
8506 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition"); | ||
8507 | find mustInstanceOfTransition_class(problem,interpretation,object); | ||
8508 | numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,object,_); | ||
8509 | check(numberOfExistingReferences < 1); | ||
8510 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
8511 | } | ||
8512 | |||
8513 | ////////// | ||
8514 | // 3.2 Unfinishedness Measured by WF Queries | ||
8515 | ////////// | ||
8516 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8517 | var_r1) | ||
8518 | { | ||
8519 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1); | ||
8520 | } | ||
8521 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8522 | var_r) | ||
8523 | { | ||
8524 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r); | ||
8525 | } | ||
8526 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8527 | var_t, var_e) | ||
8528 | { | ||
8529 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e); | ||
8530 | } | ||
8531 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8532 | var_e) | ||
8533 | { | ||
8534 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e); | ||
8535 | } | ||
8536 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8537 | var_e, var_t1, var_t2) | ||
8538 | { | ||
8539 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2); | ||
8540 | } | ||
8541 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8542 | var_t, var_e) | ||
8543 | { | ||
8544 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e); | ||
8545 | } | ||
8546 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8547 | var_t, var_f) | ||
8548 | { | ||
8549 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f); | ||
8550 | } | ||
8551 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8552 | var_region) | ||
8553 | { | ||
8554 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region); | ||
8555 | } | ||
8556 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8557 | var_c) | ||
8558 | { | ||
8559 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c); | ||
8560 | } | ||
8561 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8562 | var_c) | ||
8563 | { | ||
8564 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c); | ||
8565 | } | ||
8566 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8567 | var_s) | ||
8568 | { | ||
8569 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s); | ||
8570 | } | ||
8571 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8572 | var_s) | ||
8573 | { | ||
8574 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s); | ||
8575 | } | ||
8576 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8577 | var_s, var_v1, var_v2) | ||
8578 | { | ||
8579 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2); | ||
8580 | } | ||
8581 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8582 | var_s) | ||
8583 | { | ||
8584 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s); | ||
8585 | } | ||
8586 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8587 | var_s, var_v1, var_v2) | ||
8588 | { | ||
8589 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2); | ||
8590 | } | ||
8591 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8592 | var_s, var_v) | ||
8593 | { | ||
8594 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v); | ||
8595 | } | ||
8596 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8597 | var_s) | ||
8598 | { | ||
8599 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s); | ||
8600 | } | ||
8601 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation, | ||
8602 | var_s1, var_s2) | ||
8603 | { | ||
8604 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2); | ||
8605 | } | ||
8606 | |||
8607 | ////////// | ||
8608 | // 4. Refinement Indexers | ||
8609 | ////////// | ||
8610 | // 4.1 Object constructors | ||
8611 | ////////// | ||
8612 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) | ||
8613 | { | ||
8614 | find interpretation(problem,interpretation); | ||
8615 | find mustInstanceOfPseudostate_class(problem,interpretation,root); | ||
8616 | find mustExist(problem, interpretation, root); | ||
8617 | }or{ | ||
8618 | find interpretation(problem,interpretation); | ||
8619 | find mustInstanceOfVertex_class(problem,interpretation,root); | ||
8620 | find mustExist(problem, interpretation, root); | ||
8621 | }or{ | ||
8622 | find interpretation(problem,interpretation); | ||
8623 | find mustInstanceOfCompositeElement_class(problem,interpretation,root); | ||
8624 | find mustExist(problem, interpretation, root); | ||
8625 | }or{ | ||
8626 | find interpretation(problem,interpretation); | ||
8627 | find mustInstanceOfFinalState_class(problem,interpretation,root); | ||
8628 | find mustExist(problem, interpretation, root); | ||
8629 | }or{ | ||
8630 | find interpretation(problem,interpretation); | ||
8631 | find mustInstanceOfTransition_class(problem,interpretation,root); | ||
8632 | find mustExist(problem, interpretation, root); | ||
8633 | }or{ | ||
8634 | find interpretation(problem,interpretation); | ||
8635 | find mustInstanceOfRegion_class(problem,interpretation,root); | ||
8636 | find mustExist(problem, interpretation, root); | ||
8637 | }or{ | ||
8638 | find interpretation(problem,interpretation); | ||
8639 | find mustInstanceOfStatechart_class(problem,interpretation,root); | ||
8640 | find mustExist(problem, interpretation, root); | ||
8641 | }or{ | ||
8642 | find interpretation(problem,interpretation); | ||
8643 | find mustInstanceOfExit_class(problem,interpretation,root); | ||
8644 | find mustExist(problem, interpretation, root); | ||
8645 | }or{ | ||
8646 | find interpretation(problem,interpretation); | ||
8647 | find mustInstanceOfChoice_class(problem,interpretation,root); | ||
8648 | find mustExist(problem, interpretation, root); | ||
8649 | }or{ | ||
8650 | find interpretation(problem,interpretation); | ||
8651 | find mustInstanceOfRegularState_class(problem,interpretation,root); | ||
8652 | find mustExist(problem, interpretation, root); | ||
8653 | }or{ | ||
8654 | find interpretation(problem,interpretation); | ||
8655 | find mustInstanceOfSynchronization_class(problem,interpretation,root); | ||
8656 | find mustExist(problem, interpretation, root); | ||
8657 | }or{ | ||
8658 | find interpretation(problem,interpretation); | ||
8659 | find mustInstanceOfEntry_class(problem,interpretation,root); | ||
8660 | find mustExist(problem, interpretation, root); | ||
8661 | }or{ | ||
8662 | find interpretation(problem,interpretation); | ||
8663 | find mustInstanceOfState_class(problem,interpretation,root); | ||
8664 | find mustExist(problem, interpretation, root); | ||
8665 | }or{ | ||
8666 | find interpretation(problem,interpretation); | ||
8667 | find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,root); | ||
8668 | find mustExist(problem, interpretation, root); | ||
8669 | }or{ | ||
8670 | find interpretation(problem,interpretation); | ||
8671 | find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,root); | ||
8672 | find mustExist(problem, interpretation, root); | ||
8673 | }or{ | ||
8674 | find interpretation(problem,interpretation); | ||
8675 | find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,root); | ||
8676 | find mustExist(problem, interpretation, root); | ||
8677 | }or{ | ||
8678 | find interpretation(problem,interpretation); | ||
8679 | find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,root); | ||
8680 | find mustExist(problem, interpretation, root); | ||
8681 | } | ||
8682 | pattern createObject_State_class_by_vertices_reference_Region( | ||
8683 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8684 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
8685 | container:DefinedElement) | ||
8686 | { | ||
8687 | find interpretation(problem,interpretation); | ||
8688 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8689 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class"); | ||
8690 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
8691 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
8692 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
8693 | find mayInstanceOfState_class(problem,interpretation,newObject); | ||
8694 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
8695 | find mustExist(problem, interpretation, container); | ||
8696 | neg find mustExist(problem, interpretation, newObject); | ||
8697 | } | ||
8698 | pattern createObject_State_class( | ||
8699 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8700 | typeInterpretation:PartialComplexTypeInterpretation) | ||
8701 | { | ||
8702 | find interpretation(problem,interpretation); | ||
8703 | neg find hasElementInContainment(problem,interpretation); | ||
8704 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8705 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class"); | ||
8706 | find mayInstanceOfState_class(problem,interpretation,newObject); | ||
8707 | find mayExist(problem, interpretation, newObject); | ||
8708 | neg find mustExist(problem, interpretation, newObject); | ||
8709 | } | ||
8710 | pattern createObject_FinalState_class_by_vertices_reference_Region( | ||
8711 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8712 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
8713 | container:DefinedElement) | ||
8714 | { | ||
8715 | find interpretation(problem,interpretation); | ||
8716 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8717 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class"); | ||
8718 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
8719 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
8720 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
8721 | find mayInstanceOfFinalState_class(problem,interpretation,newObject); | ||
8722 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
8723 | find mustExist(problem, interpretation, container); | ||
8724 | neg find mustExist(problem, interpretation, newObject); | ||
8725 | } | ||
8726 | pattern createObject_FinalState_class( | ||
8727 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8728 | typeInterpretation:PartialComplexTypeInterpretation) | ||
8729 | { | ||
8730 | find interpretation(problem,interpretation); | ||
8731 | neg find hasElementInContainment(problem,interpretation); | ||
8732 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8733 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class"); | ||
8734 | find mayInstanceOfFinalState_class(problem,interpretation,newObject); | ||
8735 | find mayExist(problem, interpretation, newObject); | ||
8736 | neg find mustExist(problem, interpretation, newObject); | ||
8737 | } | ||
8738 | pattern createObject_Choice_class_by_vertices_reference_Region( | ||
8739 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8740 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
8741 | container:DefinedElement) | ||
8742 | { | ||
8743 | find interpretation(problem,interpretation); | ||
8744 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8745 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class"); | ||
8746 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
8747 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
8748 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
8749 | find mayInstanceOfChoice_class(problem,interpretation,newObject); | ||
8750 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
8751 | find mustExist(problem, interpretation, container); | ||
8752 | neg find mustExist(problem, interpretation, newObject); | ||
8753 | } | ||
8754 | pattern createObject_Choice_class( | ||
8755 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8756 | typeInterpretation:PartialComplexTypeInterpretation) | ||
8757 | { | ||
8758 | find interpretation(problem,interpretation); | ||
8759 | neg find hasElementInContainment(problem,interpretation); | ||
8760 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8761 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class"); | ||
8762 | find mayInstanceOfChoice_class(problem,interpretation,newObject); | ||
8763 | find mayExist(problem, interpretation, newObject); | ||
8764 | neg find mustExist(problem, interpretation, newObject); | ||
8765 | } | ||
8766 | pattern createObject_Entry_class_by_vertices_reference_Region( | ||
8767 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8768 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
8769 | container:DefinedElement) | ||
8770 | { | ||
8771 | find interpretation(problem,interpretation); | ||
8772 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8773 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class"); | ||
8774 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
8775 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
8776 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
8777 | find mayInstanceOfEntry_class(problem,interpretation,newObject); | ||
8778 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
8779 | find mustExist(problem, interpretation, container); | ||
8780 | neg find mustExist(problem, interpretation, newObject); | ||
8781 | } | ||
8782 | pattern createObject_Entry_class( | ||
8783 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8784 | typeInterpretation:PartialComplexTypeInterpretation) | ||
8785 | { | ||
8786 | find interpretation(problem,interpretation); | ||
8787 | neg find hasElementInContainment(problem,interpretation); | ||
8788 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8789 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class"); | ||
8790 | find mayInstanceOfEntry_class(problem,interpretation,newObject); | ||
8791 | find mayExist(problem, interpretation, newObject); | ||
8792 | neg find mustExist(problem, interpretation, newObject); | ||
8793 | } | ||
8794 | pattern createObject_Statechart_class_UndefinedPart( | ||
8795 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8796 | typeInterpretation:PartialComplexTypeInterpretation) | ||
8797 | { | ||
8798 | find interpretation(problem,interpretation); | ||
8799 | neg find hasElementInContainment(problem,interpretation); | ||
8800 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8801 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Statechart class UndefinedPart"); | ||
8802 | find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,newObject); | ||
8803 | find mayExist(problem, interpretation, newObject); | ||
8804 | neg find mustExist(problem, interpretation, newObject); | ||
8805 | } | ||
8806 | pattern createObject_Exit_class_by_vertices_reference_Region( | ||
8807 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8808 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
8809 | container:DefinedElement) | ||
8810 | { | ||
8811 | find interpretation(problem,interpretation); | ||
8812 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8813 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class"); | ||
8814 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
8815 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
8816 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
8817 | find mayInstanceOfExit_class(problem,interpretation,newObject); | ||
8818 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
8819 | find mustExist(problem, interpretation, container); | ||
8820 | neg find mustExist(problem, interpretation, newObject); | ||
8821 | } | ||
8822 | pattern createObject_Exit_class( | ||
8823 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8824 | typeInterpretation:PartialComplexTypeInterpretation) | ||
8825 | { | ||
8826 | find interpretation(problem,interpretation); | ||
8827 | neg find hasElementInContainment(problem,interpretation); | ||
8828 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8829 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class"); | ||
8830 | find mayInstanceOfExit_class(problem,interpretation,newObject); | ||
8831 | find mayExist(problem, interpretation, newObject); | ||
8832 | neg find mustExist(problem, interpretation, newObject); | ||
8833 | } | ||
8834 | pattern createObject_Transition_class_by_outgoingTransitions_reference_Vertex_with_source_reference_Transition( | ||
8835 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8836 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
8837 | container:DefinedElement) | ||
8838 | { | ||
8839 | find interpretation(problem,interpretation); | ||
8840 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8841 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class"); | ||
8842 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
8843 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingTransitions reference Vertex"); | ||
8844 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
8845 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"source reference Transition"); | ||
8846 | find mustInstanceOfVertex_class(problem,interpretation,container); | ||
8847 | find mayInstanceOfTransition_class(problem,interpretation,newObject); | ||
8848 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,container,newObject); | ||
8849 | find mustExist(problem, interpretation, container); | ||
8850 | neg find mustExist(problem, interpretation, newObject); | ||
8851 | } | ||
8852 | pattern createObject_Transition_class( | ||
8853 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8854 | typeInterpretation:PartialComplexTypeInterpretation) | ||
8855 | { | ||
8856 | find interpretation(problem,interpretation); | ||
8857 | neg find hasElementInContainment(problem,interpretation); | ||
8858 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8859 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class"); | ||
8860 | find mayInstanceOfTransition_class(problem,interpretation,newObject); | ||
8861 | find mayExist(problem, interpretation, newObject); | ||
8862 | neg find mustExist(problem, interpretation, newObject); | ||
8863 | } | ||
8864 | pattern createObject_Region_class_by_regions_reference_CompositeElement( | ||
8865 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8866 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
8867 | container:DefinedElement) | ||
8868 | { | ||
8869 | find interpretation(problem,interpretation); | ||
8870 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8871 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class"); | ||
8872 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
8873 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"regions reference CompositeElement"); | ||
8874 | find mustInstanceOfCompositeElement_class(problem,interpretation,container); | ||
8875 | find mayInstanceOfRegion_class(problem,interpretation,newObject); | ||
8876 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,container,newObject); | ||
8877 | find mustExist(problem, interpretation, container); | ||
8878 | neg find mustExist(problem, interpretation, newObject); | ||
8879 | } | ||
8880 | pattern createObject_Region_class( | ||
8881 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8882 | typeInterpretation:PartialComplexTypeInterpretation) | ||
8883 | { | ||
8884 | find interpretation(problem,interpretation); | ||
8885 | neg find hasElementInContainment(problem,interpretation); | ||
8886 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8887 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class"); | ||
8888 | find mayInstanceOfRegion_class(problem,interpretation,newObject); | ||
8889 | find mayExist(problem, interpretation, newObject); | ||
8890 | neg find mustExist(problem, interpretation, newObject); | ||
8891 | } | ||
8892 | pattern createObject_Synchronization_class_by_vertices_reference_Region( | ||
8893 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8894 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
8895 | container:DefinedElement) | ||
8896 | { | ||
8897 | find interpretation(problem,interpretation); | ||
8898 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8899 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class"); | ||
8900 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
8901 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
8902 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
8903 | find mayInstanceOfSynchronization_class(problem,interpretation,newObject); | ||
8904 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
8905 | find mustExist(problem, interpretation, container); | ||
8906 | neg find mustExist(problem, interpretation, newObject); | ||
8907 | } | ||
8908 | pattern createObject_Synchronization_class( | ||
8909 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
8910 | typeInterpretation:PartialComplexTypeInterpretation) | ||
8911 | { | ||
8912 | find interpretation(problem,interpretation); | ||
8913 | neg find hasElementInContainment(problem,interpretation); | ||
8914 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
8915 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class"); | ||
8916 | find mayInstanceOfSynchronization_class(problem,interpretation,newObject); | ||
8917 | find mayExist(problem, interpretation, newObject); | ||
8918 | neg find mustExist(problem, interpretation, newObject); | ||
8919 | } | ||
8920 | |||
8921 | ////////// | ||
8922 | // 4.2 Type refinement | ||
8923 | ////////// | ||
8924 | pattern refineTypeTo_State_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
8925 | find interpretation(problem,interpretation); | ||
8926 | PartialInterpretation.newElements(interpretation,element); | ||
8927 | find mayInstanceOfState_class(problem,interpretation,element); | ||
8928 | neg find mustInstanceOfState_class(problem,interpretation,element); | ||
8929 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
8930 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
8931 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
8932 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
8933 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
8934 | } | ||
8935 | pattern refineTypeTo_FinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
8936 | find interpretation(problem,interpretation); | ||
8937 | PartialInterpretation.newElements(interpretation,element); | ||
8938 | find mayInstanceOfFinalState_class(problem,interpretation,element); | ||
8939 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
8940 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
8941 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
8942 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
8943 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
8944 | } | ||
8945 | pattern refineTypeTo_Choice_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
8946 | find interpretation(problem,interpretation); | ||
8947 | PartialInterpretation.newElements(interpretation,element); | ||
8948 | find mayInstanceOfChoice_class(problem,interpretation,element); | ||
8949 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
8950 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
8951 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
8952 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
8953 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
8954 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
8955 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
8956 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
8957 | } | ||
8958 | pattern refineTypeTo_Entry_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
8959 | find interpretation(problem,interpretation); | ||
8960 | PartialInterpretation.newElements(interpretation,element); | ||
8961 | find mayInstanceOfEntry_class(problem,interpretation,element); | ||
8962 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
8963 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
8964 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
8965 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
8966 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
8967 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
8968 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
8969 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
8970 | } | ||
8971 | pattern refineTypeTo_Statechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
8972 | find interpretation(problem,interpretation); | ||
8973 | PartialInterpretation.newElements(interpretation,element); | ||
8974 | find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); | ||
8975 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
8976 | neg find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); | ||
8977 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
8978 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
8979 | } | ||
8980 | pattern refineTypeTo_Exit_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
8981 | find interpretation(problem,interpretation); | ||
8982 | PartialInterpretation.newElements(interpretation,element); | ||
8983 | find mayInstanceOfExit_class(problem,interpretation,element); | ||
8984 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
8985 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
8986 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
8987 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
8988 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
8989 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
8990 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
8991 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
8992 | } | ||
8993 | pattern refineTypeTo_Transition_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
8994 | find interpretation(problem,interpretation); | ||
8995 | PartialInterpretation.newElements(interpretation,element); | ||
8996 | find mayInstanceOfTransition_class(problem,interpretation,element); | ||
8997 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
8998 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
8999 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
9000 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9001 | } | ||
9002 | pattern refineTypeTo_Region_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
9003 | find interpretation(problem,interpretation); | ||
9004 | PartialInterpretation.newElements(interpretation,element); | ||
9005 | find mayInstanceOfRegion_class(problem,interpretation,element); | ||
9006 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
9007 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9008 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
9009 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9010 | } | ||
9011 | pattern refineTypeTo_Synchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
9012 | find interpretation(problem,interpretation); | ||
9013 | PartialInterpretation.newElements(interpretation,element); | ||
9014 | find mayInstanceOfSynchronization_class(problem,interpretation,element); | ||
9015 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
9016 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
9017 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
9018 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
9019 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9020 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
9021 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
9022 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9023 | } | ||
9024 | |||
9025 | ////////// | ||
9026 | // 4.3 Relation refinement | ||
9027 | ////////// | ||
9028 | pattern refineRelation_incomingTransitions_reference_Vertex_and_target_reference_Transition( | ||
9029 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9030 | relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, | ||
9031 | from: DefinedElement, to: DefinedElement) | ||
9032 | { | ||
9033 | find interpretation(problem,interpretation); | ||
9034 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
9035 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex"); | ||
9036 | PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); | ||
9037 | PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"target reference Transition"); | ||
9038 | find mustExist(problem, interpretation, from); | ||
9039 | find mustExist(problem, interpretation, to); | ||
9040 | find mustInstanceOfVertex_class(problem,interpretation,from); | ||
9041 | find mustInstanceOfTransition_class(problem,interpretation,to); | ||
9042 | find mayInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to); | ||
9043 | neg find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to); | ||
9044 | } | ||
9045 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
9046 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" | ||
9047 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
9048 | |||
9049 | ////////// | ||
9050 | // 0. Util | ||
9051 | ////////// | ||
9052 | private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9053 | PartialInterpretation.problem(interpretation,problem); | ||
9054 | } | ||
9055 | |||
9056 | ///////////////////////// | ||
9057 | // 0.1 Existence | ||
9058 | ///////////////////////// | ||
9059 | private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9060 | find interpretation(problem,interpretation); | ||
9061 | LogicProblem.elements(problem,element); | ||
9062 | } or { | ||
9063 | find interpretation(problem,interpretation); | ||
9064 | PartialInterpretation.newElements(interpretation,element); | ||
9065 | } | ||
9066 | |||
9067 | private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9068 | find mustExist(problem,interpretation,element); | ||
9069 | } or { | ||
9070 | find interpretation(problem,interpretation); | ||
9071 | neg find elementCloseWorld(element); | ||
9072 | PartialInterpretation.openWorldElements(interpretation,element); | ||
9073 | } | ||
9074 | |||
9075 | private pattern elementCloseWorld(element:DefinedElement) { | ||
9076 | PartialInterpretation.openWorldElements(i,element); | ||
9077 | PartialInterpretation.maxNewElements(i,0); | ||
9078 | } or { | ||
9079 | Scope.targetTypeInterpretation(scope,interpretation); | ||
9080 | PartialTypeInterpratation.elements(interpretation,element); | ||
9081 | Scope.maxNewElements(scope,0); | ||
9082 | } | ||
9083 | |||
9084 | //////////////////////// | ||
9085 | // 0.2 Equivalence | ||
9086 | //////////////////////// | ||
9087 | pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { | ||
9088 | find mayExist(problem,interpretation,a); | ||
9089 | find mayExist(problem,interpretation,b); | ||
9090 | a == b; | ||
9091 | } | ||
9092 | |||
9093 | //////////////////////// | ||
9094 | // 0.3 Required Patterns by TypeIndexer | ||
9095 | //////////////////////// | ||
9096 | private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { | ||
9097 | find interpretation(problem,interpretation); | ||
9098 | LogicProblem.types(problem,type); | ||
9099 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
9100 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9101 | } | ||
9102 | |||
9103 | private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
9104 | find interpretation(problem,interpretation); | ||
9105 | LogicProblem.types(problem,type); | ||
9106 | TypeDefinition.elements(type,element); | ||
9107 | } or { | ||
9108 | find interpretation(problem,interpretation); | ||
9109 | find typeInterpretation(problem,interpretation,type,typeInterpretation); | ||
9110 | PartialComplexTypeInterpretation.elements(typeInterpretation,element); | ||
9111 | } | ||
9112 | |||
9113 | private pattern isPrimitive(element: PrimitiveElement) { | ||
9114 | PrimitiveElement(element); | ||
9115 | } | ||
9116 | |||
9117 | ////////// | ||
9118 | // 1. Problem-Specific Base Indexers | ||
9119 | ////////// | ||
9120 | // 1.1 Type Indexers | ||
9121 | ////////// | ||
9122 | // 1.1.1 primitive Type Indexers | ||
9123 | ////////// | ||
9124 | |||
9125 | ////////// | ||
9126 | // 1.1.2 domain-specific Type Indexers | ||
9127 | ////////// | ||
9128 | /** | ||
9129 | * An element must be an instance of type "Pseudostate class". | ||
9130 | */ | ||
9131 | private pattern mustInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9132 | Type.name(type,"Pseudostate class"); | ||
9133 | find directInstanceOf(problem,interpretation,element,type); | ||
9134 | } | ||
9135 | private pattern scopeDisallowsNewPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9136 | find interpretation(problem,interpretation); | ||
9137 | PartialInterpretation.scopes(interpretation,scope); | ||
9138 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9139 | Scope.maxNewElements(scope,0); | ||
9140 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9141 | Type.name(type,"Pseudostate class"); | ||
9142 | } | ||
9143 | |||
9144 | /** | ||
9145 | * An element may be an instance of type "Pseudostate class". | ||
9146 | */ | ||
9147 | private pattern mayInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9148 | { | ||
9149 | find interpretation(problem,interpretation); | ||
9150 | PartialInterpretation.newElements(interpretation,element); | ||
9151 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
9152 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
9153 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
9154 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9155 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
9156 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9157 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
9158 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
9159 | neg find scopeDisallowsNewPseudostate_class(problem, interpretation); | ||
9160 | neg find isPrimitive(element); | ||
9161 | } or { | ||
9162 | find interpretation(problem,interpretation); | ||
9163 | PartialInterpretation.openWorldElements(interpretation,element); | ||
9164 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
9165 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
9166 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
9167 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9168 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
9169 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9170 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
9171 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
9172 | neg find scopeDisallowsNewPseudostate_class(problem, interpretation); | ||
9173 | neg find isPrimitive(element); | ||
9174 | } or | ||
9175 | { find mustInstanceOfPseudostate_class(problem,interpretation,element); } | ||
9176 | /** | ||
9177 | * An element must be an instance of type "Vertex class". | ||
9178 | */ | ||
9179 | private pattern mustInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9180 | Type.name(type,"Vertex class"); | ||
9181 | find directInstanceOf(problem,interpretation,element,type); | ||
9182 | } | ||
9183 | private pattern scopeDisallowsNewVertex_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9184 | find interpretation(problem,interpretation); | ||
9185 | PartialInterpretation.scopes(interpretation,scope); | ||
9186 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9187 | Scope.maxNewElements(scope,0); | ||
9188 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9189 | Type.name(type,"Vertex class"); | ||
9190 | } | ||
9191 | |||
9192 | /** | ||
9193 | * An element may be an instance of type "Vertex class". | ||
9194 | */ | ||
9195 | private pattern mayInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9196 | { | ||
9197 | find interpretation(problem,interpretation); | ||
9198 | PartialInterpretation.newElements(interpretation,element); | ||
9199 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
9200 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9201 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9202 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
9203 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
9204 | neg find scopeDisallowsNewVertex_class(problem, interpretation); | ||
9205 | neg find isPrimitive(element); | ||
9206 | } or { | ||
9207 | find interpretation(problem,interpretation); | ||
9208 | PartialInterpretation.openWorldElements(interpretation,element); | ||
9209 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
9210 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9211 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9212 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
9213 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
9214 | neg find scopeDisallowsNewVertex_class(problem, interpretation); | ||
9215 | neg find isPrimitive(element); | ||
9216 | } or | ||
9217 | { find mustInstanceOfVertex_class(problem,interpretation,element); } | ||
9218 | /** | ||
9219 | * An element must be an instance of type "Region class". | ||
9220 | */ | ||
9221 | private pattern mustInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9222 | Type.name(type,"Region class"); | ||
9223 | find directInstanceOf(problem,interpretation,element,type); | ||
9224 | } | ||
9225 | private pattern scopeDisallowsNewRegion_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9226 | find interpretation(problem,interpretation); | ||
9227 | PartialInterpretation.scopes(interpretation,scope); | ||
9228 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9229 | Scope.maxNewElements(scope,0); | ||
9230 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9231 | Type.name(type,"Region class"); | ||
9232 | } | ||
9233 | |||
9234 | /** | ||
9235 | * An element may be an instance of type "Region class". | ||
9236 | */ | ||
9237 | private pattern mayInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9238 | { | ||
9239 | find interpretation(problem,interpretation); | ||
9240 | PartialInterpretation.newElements(interpretation,element); | ||
9241 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
9242 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
9243 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9244 | neg find scopeDisallowsNewRegion_class(problem, interpretation); | ||
9245 | neg find isPrimitive(element); | ||
9246 | } or { | ||
9247 | find interpretation(problem,interpretation); | ||
9248 | PartialInterpretation.openWorldElements(interpretation,element); | ||
9249 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
9250 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
9251 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9252 | neg find scopeDisallowsNewRegion_class(problem, interpretation); | ||
9253 | neg find isPrimitive(element); | ||
9254 | } or | ||
9255 | { find mustInstanceOfRegion_class(problem,interpretation,element); } | ||
9256 | /** | ||
9257 | * An element must be an instance of type "Transition class". | ||
9258 | */ | ||
9259 | private pattern mustInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9260 | Type.name(type,"Transition class"); | ||
9261 | find directInstanceOf(problem,interpretation,element,type); | ||
9262 | } | ||
9263 | private pattern scopeDisallowsNewTransition_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9264 | find interpretation(problem,interpretation); | ||
9265 | PartialInterpretation.scopes(interpretation,scope); | ||
9266 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9267 | Scope.maxNewElements(scope,0); | ||
9268 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9269 | Type.name(type,"Transition class"); | ||
9270 | } | ||
9271 | |||
9272 | /** | ||
9273 | * An element may be an instance of type "Transition class". | ||
9274 | */ | ||
9275 | private pattern mayInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9276 | { | ||
9277 | find interpretation(problem,interpretation); | ||
9278 | PartialInterpretation.newElements(interpretation,element); | ||
9279 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
9280 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
9281 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9282 | neg find scopeDisallowsNewTransition_class(problem, interpretation); | ||
9283 | neg find isPrimitive(element); | ||
9284 | } or { | ||
9285 | find interpretation(problem,interpretation); | ||
9286 | PartialInterpretation.openWorldElements(interpretation,element); | ||
9287 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
9288 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
9289 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9290 | neg find scopeDisallowsNewTransition_class(problem, interpretation); | ||
9291 | neg find isPrimitive(element); | ||
9292 | } or | ||
9293 | { find mustInstanceOfTransition_class(problem,interpretation,element); } | ||
9294 | /** | ||
9295 | * An element must be an instance of type "Statechart class". | ||
9296 | */ | ||
9297 | private pattern mustInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9298 | Type.name(type,"Statechart class"); | ||
9299 | find directInstanceOf(problem,interpretation,element,type); | ||
9300 | } | ||
9301 | private pattern scopeDisallowsNewStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9302 | find interpretation(problem,interpretation); | ||
9303 | PartialInterpretation.scopes(interpretation,scope); | ||
9304 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9305 | Scope.maxNewElements(scope,0); | ||
9306 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9307 | Type.name(type,"Statechart class"); | ||
9308 | } | ||
9309 | |||
9310 | /** | ||
9311 | * An element may be an instance of type "Statechart class". | ||
9312 | */ | ||
9313 | private pattern mayInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9314 | { | ||
9315 | find interpretation(problem,interpretation); | ||
9316 | PartialInterpretation.newElements(interpretation,element); | ||
9317 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
9318 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
9319 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9320 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9321 | neg find scopeDisallowsNewStatechart_class(problem, interpretation); | ||
9322 | neg find isPrimitive(element); | ||
9323 | } or { | ||
9324 | find interpretation(problem,interpretation); | ||
9325 | PartialInterpretation.openWorldElements(interpretation,element); | ||
9326 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
9327 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
9328 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9329 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9330 | neg find scopeDisallowsNewStatechart_class(problem, interpretation); | ||
9331 | neg find isPrimitive(element); | ||
9332 | } or | ||
9333 | { find mustInstanceOfStatechart_class(problem,interpretation,element); } | ||
9334 | /** | ||
9335 | * An element must be an instance of type "Entry class". | ||
9336 | */ | ||
9337 | private pattern mustInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9338 | Type.name(type,"Entry class"); | ||
9339 | find directInstanceOf(problem,interpretation,element,type); | ||
9340 | } | ||
9341 | private pattern scopeDisallowsNewEntry_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9342 | find interpretation(problem,interpretation); | ||
9343 | PartialInterpretation.scopes(interpretation,scope); | ||
9344 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9345 | Scope.maxNewElements(scope,0); | ||
9346 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9347 | Type.name(type,"Entry class"); | ||
9348 | } | ||
9349 | |||
9350 | /** | ||
9351 | * An element may be an instance of type "Entry class". | ||
9352 | */ | ||
9353 | private pattern mayInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9354 | { | ||
9355 | find interpretation(problem,interpretation); | ||
9356 | PartialInterpretation.newElements(interpretation,element); | ||
9357 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
9358 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
9359 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
9360 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9361 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9362 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
9363 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
9364 | neg find scopeDisallowsNewEntry_class(problem, interpretation); | ||
9365 | neg find isPrimitive(element); | ||
9366 | } or { | ||
9367 | find interpretation(problem,interpretation); | ||
9368 | PartialInterpretation.openWorldElements(interpretation,element); | ||
9369 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
9370 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
9371 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
9372 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9373 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9374 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
9375 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
9376 | neg find scopeDisallowsNewEntry_class(problem, interpretation); | ||
9377 | neg find isPrimitive(element); | ||
9378 | } or | ||
9379 | { find mustInstanceOfEntry_class(problem,interpretation,element); } | ||
9380 | /** | ||
9381 | * An element must be an instance of type "Synchronization class". | ||
9382 | */ | ||
9383 | private pattern mustInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9384 | Type.name(type,"Synchronization class"); | ||
9385 | find directInstanceOf(problem,interpretation,element,type); | ||
9386 | } | ||
9387 | private pattern scopeDisallowsNewSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9388 | find interpretation(problem,interpretation); | ||
9389 | PartialInterpretation.scopes(interpretation,scope); | ||
9390 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9391 | Scope.maxNewElements(scope,0); | ||
9392 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9393 | Type.name(type,"Synchronization class"); | ||
9394 | } | ||
9395 | |||
9396 | /** | ||
9397 | * An element may be an instance of type "Synchronization class". | ||
9398 | */ | ||
9399 | private pattern mayInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9400 | { | ||
9401 | find interpretation(problem,interpretation); | ||
9402 | PartialInterpretation.newElements(interpretation,element); | ||
9403 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
9404 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
9405 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
9406 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9407 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9408 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
9409 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
9410 | neg find scopeDisallowsNewSynchronization_class(problem, interpretation); | ||
9411 | neg find isPrimitive(element); | ||
9412 | } or { | ||
9413 | find interpretation(problem,interpretation); | ||
9414 | PartialInterpretation.openWorldElements(interpretation,element); | ||
9415 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
9416 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
9417 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
9418 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9419 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9420 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
9421 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
9422 | neg find scopeDisallowsNewSynchronization_class(problem, interpretation); | ||
9423 | neg find isPrimitive(element); | ||
9424 | } or | ||
9425 | { find mustInstanceOfSynchronization_class(problem,interpretation,element); } | ||
9426 | /** | ||
9427 | * An element must be an instance of type "State class". | ||
9428 | */ | ||
9429 | private pattern mustInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9430 | Type.name(type,"State class"); | ||
9431 | find directInstanceOf(problem,interpretation,element,type); | ||
9432 | } | ||
9433 | private pattern scopeDisallowsNewState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9434 | find interpretation(problem,interpretation); | ||
9435 | PartialInterpretation.scopes(interpretation,scope); | ||
9436 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9437 | Scope.maxNewElements(scope,0); | ||
9438 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9439 | Type.name(type,"State class"); | ||
9440 | } | ||
9441 | |||
9442 | /** | ||
9443 | * An element may be an instance of type "State class". | ||
9444 | */ | ||
9445 | private pattern mayInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9446 | { | ||
9447 | find interpretation(problem,interpretation); | ||
9448 | PartialInterpretation.newElements(interpretation,element); | ||
9449 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
9450 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
9451 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9452 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9453 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
9454 | neg find scopeDisallowsNewState_class(problem, interpretation); | ||
9455 | neg find isPrimitive(element); | ||
9456 | } or { | ||
9457 | find interpretation(problem,interpretation); | ||
9458 | PartialInterpretation.openWorldElements(interpretation,element); | ||
9459 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
9460 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
9461 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9462 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9463 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
9464 | neg find scopeDisallowsNewState_class(problem, interpretation); | ||
9465 | neg find isPrimitive(element); | ||
9466 | } or | ||
9467 | { find mustInstanceOfState_class(problem,interpretation,element); } | ||
9468 | /** | ||
9469 | * An element must be an instance of type "RegularState class". | ||
9470 | */ | ||
9471 | private pattern mustInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9472 | Type.name(type,"RegularState class"); | ||
9473 | find directInstanceOf(problem,interpretation,element,type); | ||
9474 | } | ||
9475 | private pattern scopeDisallowsNewRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9476 | find interpretation(problem,interpretation); | ||
9477 | PartialInterpretation.scopes(interpretation,scope); | ||
9478 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9479 | Scope.maxNewElements(scope,0); | ||
9480 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9481 | Type.name(type,"RegularState class"); | ||
9482 | } | ||
9483 | |||
9484 | /** | ||
9485 | * An element may be an instance of type "RegularState class". | ||
9486 | */ | ||
9487 | private pattern mayInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9488 | { | ||
9489 | find interpretation(problem,interpretation); | ||
9490 | PartialInterpretation.newElements(interpretation,element); | ||
9491 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
9492 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
9493 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9494 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9495 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
9496 | neg find scopeDisallowsNewRegularState_class(problem, interpretation); | ||
9497 | neg find isPrimitive(element); | ||
9498 | } or { | ||
9499 | find interpretation(problem,interpretation); | ||
9500 | PartialInterpretation.openWorldElements(interpretation,element); | ||
9501 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
9502 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
9503 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9504 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9505 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
9506 | neg find scopeDisallowsNewRegularState_class(problem, interpretation); | ||
9507 | neg find isPrimitive(element); | ||
9508 | } or | ||
9509 | { find mustInstanceOfRegularState_class(problem,interpretation,element); } | ||
9510 | /** | ||
9511 | * An element must be an instance of type "CompositeElement class". | ||
9512 | */ | ||
9513 | private pattern mustInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9514 | Type.name(type,"CompositeElement class"); | ||
9515 | find directInstanceOf(problem,interpretation,element,type); | ||
9516 | } | ||
9517 | private pattern scopeDisallowsNewCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9518 | find interpretation(problem,interpretation); | ||
9519 | PartialInterpretation.scopes(interpretation,scope); | ||
9520 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9521 | Scope.maxNewElements(scope,0); | ||
9522 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9523 | Type.name(type,"CompositeElement class"); | ||
9524 | } | ||
9525 | |||
9526 | /** | ||
9527 | * An element may be an instance of type "CompositeElement class". | ||
9528 | */ | ||
9529 | private pattern mayInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9530 | { | ||
9531 | find interpretation(problem,interpretation); | ||
9532 | PartialInterpretation.newElements(interpretation,element); | ||
9533 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
9534 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
9535 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
9536 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9537 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9538 | neg find scopeDisallowsNewCompositeElement_class(problem, interpretation); | ||
9539 | neg find isPrimitive(element); | ||
9540 | } or { | ||
9541 | find interpretation(problem,interpretation); | ||
9542 | PartialInterpretation.openWorldElements(interpretation,element); | ||
9543 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
9544 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
9545 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
9546 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9547 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9548 | neg find scopeDisallowsNewCompositeElement_class(problem, interpretation); | ||
9549 | neg find isPrimitive(element); | ||
9550 | } or | ||
9551 | { find mustInstanceOfCompositeElement_class(problem,interpretation,element); } | ||
9552 | /** | ||
9553 | * An element must be an instance of type "Choice class". | ||
9554 | */ | ||
9555 | private pattern mustInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9556 | Type.name(type,"Choice class"); | ||
9557 | find directInstanceOf(problem,interpretation,element,type); | ||
9558 | } | ||
9559 | private pattern scopeDisallowsNewChoice_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9560 | find interpretation(problem,interpretation); | ||
9561 | PartialInterpretation.scopes(interpretation,scope); | ||
9562 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9563 | Scope.maxNewElements(scope,0); | ||
9564 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9565 | Type.name(type,"Choice class"); | ||
9566 | } | ||
9567 | |||
9568 | /** | ||
9569 | * An element may be an instance of type "Choice class". | ||
9570 | */ | ||
9571 | private pattern mayInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9572 | { | ||
9573 | find interpretation(problem,interpretation); | ||
9574 | PartialInterpretation.newElements(interpretation,element); | ||
9575 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
9576 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
9577 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
9578 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9579 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9580 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
9581 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
9582 | neg find scopeDisallowsNewChoice_class(problem, interpretation); | ||
9583 | neg find isPrimitive(element); | ||
9584 | } or { | ||
9585 | find interpretation(problem,interpretation); | ||
9586 | PartialInterpretation.openWorldElements(interpretation,element); | ||
9587 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
9588 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
9589 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
9590 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9591 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9592 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
9593 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
9594 | neg find scopeDisallowsNewChoice_class(problem, interpretation); | ||
9595 | neg find isPrimitive(element); | ||
9596 | } or | ||
9597 | { find mustInstanceOfChoice_class(problem,interpretation,element); } | ||
9598 | /** | ||
9599 | * An element must be an instance of type "Exit class". | ||
9600 | */ | ||
9601 | private pattern mustInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9602 | Type.name(type,"Exit class"); | ||
9603 | find directInstanceOf(problem,interpretation,element,type); | ||
9604 | } | ||
9605 | private pattern scopeDisallowsNewExit_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9606 | find interpretation(problem,interpretation); | ||
9607 | PartialInterpretation.scopes(interpretation,scope); | ||
9608 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9609 | Scope.maxNewElements(scope,0); | ||
9610 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9611 | Type.name(type,"Exit class"); | ||
9612 | } | ||
9613 | |||
9614 | /** | ||
9615 | * An element may be an instance of type "Exit class". | ||
9616 | */ | ||
9617 | private pattern mayInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9618 | { | ||
9619 | find interpretation(problem,interpretation); | ||
9620 | PartialInterpretation.newElements(interpretation,element); | ||
9621 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
9622 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
9623 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
9624 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9625 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
9626 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9627 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
9628 | neg find scopeDisallowsNewExit_class(problem, interpretation); | ||
9629 | neg find isPrimitive(element); | ||
9630 | } or { | ||
9631 | find interpretation(problem,interpretation); | ||
9632 | PartialInterpretation.openWorldElements(interpretation,element); | ||
9633 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
9634 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
9635 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
9636 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9637 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
9638 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9639 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
9640 | neg find scopeDisallowsNewExit_class(problem, interpretation); | ||
9641 | neg find isPrimitive(element); | ||
9642 | } or | ||
9643 | { find mustInstanceOfExit_class(problem,interpretation,element); } | ||
9644 | /** | ||
9645 | * An element must be an instance of type "FinalState class". | ||
9646 | */ | ||
9647 | private pattern mustInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9648 | Type.name(type,"FinalState class"); | ||
9649 | find directInstanceOf(problem,interpretation,element,type); | ||
9650 | } | ||
9651 | private pattern scopeDisallowsNewFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9652 | find interpretation(problem,interpretation); | ||
9653 | PartialInterpretation.scopes(interpretation,scope); | ||
9654 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9655 | Scope.maxNewElements(scope,0); | ||
9656 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9657 | Type.name(type,"FinalState class"); | ||
9658 | } | ||
9659 | |||
9660 | /** | ||
9661 | * An element may be an instance of type "FinalState class". | ||
9662 | */ | ||
9663 | private pattern mayInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9664 | { | ||
9665 | find interpretation(problem,interpretation); | ||
9666 | PartialInterpretation.newElements(interpretation,element); | ||
9667 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
9668 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9669 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9670 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
9671 | neg find scopeDisallowsNewFinalState_class(problem, interpretation); | ||
9672 | neg find isPrimitive(element); | ||
9673 | } or { | ||
9674 | find interpretation(problem,interpretation); | ||
9675 | PartialInterpretation.openWorldElements(interpretation,element); | ||
9676 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
9677 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9678 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9679 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
9680 | neg find scopeDisallowsNewFinalState_class(problem, interpretation); | ||
9681 | neg find isPrimitive(element); | ||
9682 | } or | ||
9683 | { find mustInstanceOfFinalState_class(problem,interpretation,element); } | ||
9684 | /** | ||
9685 | * An element must be an instance of type "Statechart class DefinedPart". | ||
9686 | */ | ||
9687 | private pattern mustInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9688 | Type.name(type,"Statechart class DefinedPart"); | ||
9689 | find directInstanceOf(problem,interpretation,element,type); | ||
9690 | } | ||
9691 | private pattern scopeDisallowsNewStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9692 | find interpretation(problem,interpretation); | ||
9693 | PartialInterpretation.scopes(interpretation,scope); | ||
9694 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9695 | Scope.maxNewElements(scope,0); | ||
9696 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9697 | Type.name(type,"Statechart class DefinedPart"); | ||
9698 | } | ||
9699 | |||
9700 | /** | ||
9701 | * An element may be an instance of type "Statechart class DefinedPart". | ||
9702 | */ | ||
9703 | private pattern mayInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9704 | { find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,element); } | ||
9705 | /** | ||
9706 | * An element must be an instance of type "Statechart class UndefinedPart". | ||
9707 | */ | ||
9708 | private pattern mustInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9709 | Type.name(type,"Statechart class UndefinedPart"); | ||
9710 | find directInstanceOf(problem,interpretation,element,type); | ||
9711 | } | ||
9712 | private pattern scopeDisallowsNewStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9713 | find interpretation(problem,interpretation); | ||
9714 | PartialInterpretation.scopes(interpretation,scope); | ||
9715 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9716 | Scope.maxNewElements(scope,0); | ||
9717 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9718 | Type.name(type,"Statechart class UndefinedPart"); | ||
9719 | } | ||
9720 | |||
9721 | /** | ||
9722 | * An element may be an instance of type "Statechart class UndefinedPart". | ||
9723 | */ | ||
9724 | private pattern mayInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9725 | { | ||
9726 | find interpretation(problem,interpretation); | ||
9727 | PartialInterpretation.newElements(interpretation,element); | ||
9728 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
9729 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9730 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9731 | neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation); | ||
9732 | neg find isPrimitive(element); | ||
9733 | } or { | ||
9734 | find interpretation(problem,interpretation); | ||
9735 | PartialInterpretation.openWorldElements(interpretation,element); | ||
9736 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
9737 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9738 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9739 | neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation); | ||
9740 | neg find isPrimitive(element); | ||
9741 | } or | ||
9742 | { find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); } | ||
9743 | /** | ||
9744 | * An element must be an instance of type "CompositeElement class DefinedPart". | ||
9745 | */ | ||
9746 | private pattern mustInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9747 | Type.name(type,"CompositeElement class DefinedPart"); | ||
9748 | find directInstanceOf(problem,interpretation,element,type); | ||
9749 | } | ||
9750 | private pattern scopeDisallowsNewCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9751 | find interpretation(problem,interpretation); | ||
9752 | PartialInterpretation.scopes(interpretation,scope); | ||
9753 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9754 | Scope.maxNewElements(scope,0); | ||
9755 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9756 | Type.name(type,"CompositeElement class DefinedPart"); | ||
9757 | } | ||
9758 | |||
9759 | /** | ||
9760 | * An element may be an instance of type "CompositeElement class DefinedPart". | ||
9761 | */ | ||
9762 | private pattern mayInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9763 | { find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,element); } | ||
9764 | /** | ||
9765 | * An element must be an instance of type "CompositeElement class UndefinedPart". | ||
9766 | */ | ||
9767 | private pattern mustInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
9768 | Type.name(type,"CompositeElement class UndefinedPart"); | ||
9769 | find directInstanceOf(problem,interpretation,element,type); | ||
9770 | } | ||
9771 | private pattern scopeDisallowsNewCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
9772 | find interpretation(problem,interpretation); | ||
9773 | PartialInterpretation.scopes(interpretation,scope); | ||
9774 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
9775 | Scope.maxNewElements(scope,0); | ||
9776 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
9777 | Type.name(type,"CompositeElement class UndefinedPart"); | ||
9778 | } | ||
9779 | |||
9780 | /** | ||
9781 | * An element may be an instance of type "CompositeElement class UndefinedPart". | ||
9782 | */ | ||
9783 | private pattern mayInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
9784 | { | ||
9785 | find interpretation(problem,interpretation); | ||
9786 | PartialInterpretation.newElements(interpretation,element); | ||
9787 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
9788 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
9789 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9790 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9791 | neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation); | ||
9792 | neg find isPrimitive(element); | ||
9793 | } or { | ||
9794 | find interpretation(problem,interpretation); | ||
9795 | PartialInterpretation.openWorldElements(interpretation,element); | ||
9796 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
9797 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
9798 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
9799 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
9800 | neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation); | ||
9801 | neg find isPrimitive(element); | ||
9802 | } or | ||
9803 | { find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); } | ||
9804 | |||
9805 | ////////// | ||
9806 | // 1.2 Relation Declaration Indexers | ||
9807 | ////////// | ||
9808 | /** | ||
9809 | * Matcher for detecting tuples t where []incomingTransitions reference Vertex(source,target) | ||
9810 | */ | ||
9811 | private pattern mustInRelationincomingTransitions_reference_Vertex( | ||
9812 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9813 | source: DefinedElement, target:DefinedElement) | ||
9814 | { | ||
9815 | find interpretation(problem,interpretation); | ||
9816 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
9817 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex"); | ||
9818 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
9819 | BinaryElementRelationLink.param1(link,source); | ||
9820 | BinaryElementRelationLink.param2(link,target); | ||
9821 | } | ||
9822 | /** | ||
9823 | * Matcher for detecting tuples t where <>incomingTransitions reference Vertex(source,target) | ||
9824 | */ | ||
9825 | private pattern mayInRelationincomingTransitions_reference_Vertex( | ||
9826 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9827 | source: DefinedElement, target:DefinedElement) | ||
9828 | { | ||
9829 | find interpretation(problem,interpretation); | ||
9830 | // The two endpoint of the link have to exist | ||
9831 | find mayExist(problem, interpretation, source); | ||
9832 | find mayExist(problem, interpretation, target); | ||
9833 | // Type consistency | ||
9834 | find mayInstanceOfVertex_class(problem,interpretation,source); | ||
9835 | find mayInstanceOfTransition_class(problem,interpretation,target); | ||
9836 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
9837 | // the upper bound of the opposite reference multiplicity should be considered. | ||
9838 | numberOfExistingOppositeReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,target,_); | ||
9839 | check(numberOfExistingOppositeReferences < 1); | ||
9840 | } or { | ||
9841 | find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,source,target); | ||
9842 | } | ||
9843 | /** | ||
9844 | * Matcher for detecting tuples t where []outgoingTransitions reference Vertex(source,target) | ||
9845 | */ | ||
9846 | private pattern mustInRelationoutgoingTransitions_reference_Vertex( | ||
9847 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9848 | source: DefinedElement, target:DefinedElement) | ||
9849 | { | ||
9850 | find interpretation(problem,interpretation); | ||
9851 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
9852 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingTransitions reference Vertex"); | ||
9853 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
9854 | BinaryElementRelationLink.param1(link,source); | ||
9855 | BinaryElementRelationLink.param2(link,target); | ||
9856 | } | ||
9857 | /** | ||
9858 | * Matcher for detecting tuples t where <>outgoingTransitions reference Vertex(source,target) | ||
9859 | */ | ||
9860 | private pattern mayInRelationoutgoingTransitions_reference_Vertex( | ||
9861 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9862 | source: DefinedElement, target:DefinedElement) | ||
9863 | { | ||
9864 | find interpretation(problem,interpretation); | ||
9865 | // The two endpoint of the link have to exist | ||
9866 | find mayExist(problem, interpretation, source); | ||
9867 | find mayExist(problem, interpretation, target); | ||
9868 | // Type consistency | ||
9869 | find mayInstanceOfVertex_class(problem,interpretation,source); | ||
9870 | find mayInstanceOfTransition_class(problem,interpretation,target); | ||
9871 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
9872 | // the upper bound of the opposite reference multiplicity should be considered. | ||
9873 | numberOfExistingOppositeReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,target,_); | ||
9874 | check(numberOfExistingOppositeReferences < 1); | ||
9875 | // The reference is containment, then a new reference cannot be create if: | ||
9876 | // 1. Multiple parents | ||
9877 | neg find mustContains4(problem,interpretation,_,target); | ||
9878 | // 2. Circle in the containment hierarchy | ||
9879 | neg find mustTransitiveContains(source,target); | ||
9880 | } or { | ||
9881 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target); | ||
9882 | } | ||
9883 | /** | ||
9884 | * Matcher for detecting tuples t where []vertices reference Region(source,target) | ||
9885 | */ | ||
9886 | private pattern mustInRelationvertices_reference_Region( | ||
9887 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9888 | source: DefinedElement, target:DefinedElement) | ||
9889 | { | ||
9890 | find interpretation(problem,interpretation); | ||
9891 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
9892 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"vertices reference Region"); | ||
9893 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
9894 | BinaryElementRelationLink.param1(link,source); | ||
9895 | BinaryElementRelationLink.param2(link,target); | ||
9896 | } | ||
9897 | /** | ||
9898 | * Matcher for detecting tuples t where <>vertices reference Region(source,target) | ||
9899 | */ | ||
9900 | private pattern mayInRelationvertices_reference_Region( | ||
9901 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9902 | source: DefinedElement, target:DefinedElement) | ||
9903 | { | ||
9904 | find interpretation(problem,interpretation); | ||
9905 | // The two endpoint of the link have to exist | ||
9906 | find mayExist(problem, interpretation, source); | ||
9907 | find mayExist(problem, interpretation, target); | ||
9908 | // Type consistency | ||
9909 | find mayInstanceOfRegion_class(problem,interpretation,source); | ||
9910 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
9911 | // The reference is containment, then a new reference cannot be create if: | ||
9912 | // 1. Multiple parents | ||
9913 | neg find mustContains4(problem,interpretation,_,target); | ||
9914 | // 2. Circle in the containment hierarchy | ||
9915 | neg find mustTransitiveContains(source,target); | ||
9916 | } or { | ||
9917 | find mustInRelationvertices_reference_Region(problem,interpretation,source,target); | ||
9918 | } | ||
9919 | /** | ||
9920 | * Matcher for detecting tuples t where []target reference Transition(source,target) | ||
9921 | */ | ||
9922 | private pattern mustInRelationtarget_reference_Transition( | ||
9923 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9924 | source: DefinedElement, target:DefinedElement) | ||
9925 | { | ||
9926 | find interpretation(problem,interpretation); | ||
9927 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
9928 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition"); | ||
9929 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
9930 | BinaryElementRelationLink.param1(link,source); | ||
9931 | BinaryElementRelationLink.param2(link,target); | ||
9932 | } | ||
9933 | /** | ||
9934 | * Matcher for detecting tuples t where <>target reference Transition(source,target) | ||
9935 | */ | ||
9936 | private pattern mayInRelationtarget_reference_Transition( | ||
9937 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9938 | source: DefinedElement, target:DefinedElement) | ||
9939 | { | ||
9940 | find interpretation(problem,interpretation); | ||
9941 | // The two endpoint of the link have to exist | ||
9942 | find mayExist(problem, interpretation, source); | ||
9943 | find mayExist(problem, interpretation, target); | ||
9944 | // Type consistency | ||
9945 | find mayInstanceOfTransition_class(problem,interpretation,source); | ||
9946 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
9947 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
9948 | // the upper bound of the multiplicity should be considered. | ||
9949 | numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,source,_); | ||
9950 | check(numberOfExistingReferences < 1); | ||
9951 | } or { | ||
9952 | find mustInRelationtarget_reference_Transition(problem,interpretation,source,target); | ||
9953 | } | ||
9954 | /** | ||
9955 | * Matcher for detecting tuples t where []source reference Transition(source,target) | ||
9956 | */ | ||
9957 | private pattern mustInRelationsource_reference_Transition( | ||
9958 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9959 | source: DefinedElement, target:DefinedElement) | ||
9960 | { | ||
9961 | find interpretation(problem,interpretation); | ||
9962 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
9963 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"source reference Transition"); | ||
9964 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
9965 | BinaryElementRelationLink.param1(link,source); | ||
9966 | BinaryElementRelationLink.param2(link,target); | ||
9967 | } | ||
9968 | /** | ||
9969 | * Matcher for detecting tuples t where <>source reference Transition(source,target) | ||
9970 | */ | ||
9971 | private pattern mayInRelationsource_reference_Transition( | ||
9972 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9973 | source: DefinedElement, target:DefinedElement) | ||
9974 | { | ||
9975 | find interpretation(problem,interpretation); | ||
9976 | // The two endpoint of the link have to exist | ||
9977 | find mayExist(problem, interpretation, source); | ||
9978 | find mayExist(problem, interpretation, target); | ||
9979 | // Type consistency | ||
9980 | find mayInstanceOfTransition_class(problem,interpretation,source); | ||
9981 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
9982 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
9983 | // the upper bound of the multiplicity should be considered. | ||
9984 | numberOfExistingReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,source,_); | ||
9985 | check(numberOfExistingReferences < 1); | ||
9986 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
9987 | // 1. Multiple parents | ||
9988 | neg find mustContains4(problem,interpretation,source,_); | ||
9989 | // 2. Circle in the containment hierarchy | ||
9990 | neg find mustTransitiveContains(source,target); | ||
9991 | } or { | ||
9992 | find mustInRelationsource_reference_Transition(problem,interpretation,source,target); | ||
9993 | } | ||
9994 | /** | ||
9995 | * Matcher for detecting tuples t where []regions reference CompositeElement(source,target) | ||
9996 | */ | ||
9997 | private pattern mustInRelationregions_reference_CompositeElement( | ||
9998 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
9999 | source: DefinedElement, target:DefinedElement) | ||
10000 | { | ||
10001 | find interpretation(problem,interpretation); | ||
10002 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
10003 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"regions reference CompositeElement"); | ||
10004 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
10005 | BinaryElementRelationLink.param1(link,source); | ||
10006 | BinaryElementRelationLink.param2(link,target); | ||
10007 | } | ||
10008 | /** | ||
10009 | * Matcher for detecting tuples t where <>regions reference CompositeElement(source,target) | ||
10010 | */ | ||
10011 | private pattern mayInRelationregions_reference_CompositeElement( | ||
10012 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10013 | source: DefinedElement, target:DefinedElement) | ||
10014 | { | ||
10015 | find interpretation(problem,interpretation); | ||
10016 | // The two endpoint of the link have to exist | ||
10017 | find mayExist(problem, interpretation, source); | ||
10018 | find mayExist(problem, interpretation, target); | ||
10019 | // Type consistency | ||
10020 | find mayInstanceOfCompositeElement_class(problem,interpretation,source); | ||
10021 | find mayInstanceOfRegion_class(problem,interpretation,target); | ||
10022 | // The reference is containment, then a new reference cannot be create if: | ||
10023 | // 1. Multiple parents | ||
10024 | neg find mustContains4(problem,interpretation,_,target); | ||
10025 | // 2. Circle in the containment hierarchy | ||
10026 | neg find mustTransitiveContains(source,target); | ||
10027 | } or { | ||
10028 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target); | ||
10029 | } | ||
10030 | |||
10031 | ////////// | ||
10032 | // 1.3 Relation Definition Indexers | ||
10033 | ////////// | ||
10034 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries entryInRegion | ||
10035 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
10036 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10037 | var_r1, var_e1) | ||
10038 | { | ||
10039 | find interpretation(problem,interpretation); | ||
10040 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
10041 | find mustInstanceOfEntry_class(problem,interpretation,var_e1); | ||
10042 | // r1 is exported | ||
10043 | // e1 is exported | ||
10044 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
10045 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
10046 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
10047 | var_virtual0 == var_e1; | ||
10048 | } | ||
10049 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
10050 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10051 | var_r1, var_e1) | ||
10052 | { | ||
10053 | find interpretation(problem,interpretation); | ||
10054 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
10055 | find mayInstanceOfEntry_class(problem,interpretation,var_e1); | ||
10056 | // r1 is exported | ||
10057 | // e1 is exported | ||
10058 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
10059 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
10060 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
10061 | find mayEquivalent(problem, interpretation, var_virtual0, var_e1); | ||
10062 | } | ||
10063 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
10064 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10065 | var_r1, var_e1) | ||
10066 | { | ||
10067 | find interpretation(problem,interpretation); | ||
10068 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
10069 | find mustInstanceOfEntry_class(problem,interpretation,var_e1); | ||
10070 | // r1 is exported | ||
10071 | // e1 is exported | ||
10072 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
10073 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
10074 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
10075 | var_virtual0 == var_e1; | ||
10076 | } | ||
10077 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noEntryInRegion | ||
10078 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
10079 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10080 | var_r1) | ||
10081 | { | ||
10082 | find interpretation(problem,interpretation); | ||
10083 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
10084 | // r1 is exported | ||
10085 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
10086 | } | ||
10087 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
10088 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10089 | var_r1) | ||
10090 | { | ||
10091 | find interpretation(problem,interpretation); | ||
10092 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
10093 | // r1 is exported | ||
10094 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
10095 | } | ||
10096 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
10097 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10098 | var_r1) | ||
10099 | { | ||
10100 | find interpretation(problem,interpretation); | ||
10101 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
10102 | // r1 is exported | ||
10103 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
10104 | } | ||
10105 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleEntryInRegion | ||
10106 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
10107 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10108 | var_r) | ||
10109 | { | ||
10110 | find interpretation(problem,interpretation); | ||
10111 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
10112 | // r is exported | ||
10113 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
10114 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
10115 | neg find mayEquivalent(problem, interpretation, var_e1, var_e2); | ||
10116 | } | ||
10117 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
10118 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10119 | var_r) | ||
10120 | { | ||
10121 | find interpretation(problem,interpretation); | ||
10122 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
10123 | // r is exported | ||
10124 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
10125 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
10126 | var_e1 != var_e2; | ||
10127 | } | ||
10128 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
10129 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10130 | var_r) | ||
10131 | { | ||
10132 | find interpretation(problem,interpretation); | ||
10133 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
10134 | // r is exported | ||
10135 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
10136 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
10137 | var_e1 != var_e2; | ||
10138 | } | ||
10139 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries transition | ||
10140 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
10141 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10142 | var_t, var_src, var_trg) | ||
10143 | { | ||
10144 | find interpretation(problem,interpretation); | ||
10145 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
10146 | find mustInstanceOfVertex_class(problem,interpretation,var_src); | ||
10147 | find mustInstanceOfVertex_class(problem,interpretation,var_trg); | ||
10148 | // t is exported | ||
10149 | // src is exported | ||
10150 | // trg is exported | ||
10151 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
10152 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
10153 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
10154 | var_virtual0 == var_src; | ||
10155 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
10156 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
10157 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
10158 | var_virtual1 == var_trg; | ||
10159 | } | ||
10160 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
10161 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10162 | var_t, var_src, var_trg) | ||
10163 | { | ||
10164 | find interpretation(problem,interpretation); | ||
10165 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
10166 | find mayInstanceOfVertex_class(problem,interpretation,var_src); | ||
10167 | find mayInstanceOfVertex_class(problem,interpretation,var_trg); | ||
10168 | // t is exported | ||
10169 | // src is exported | ||
10170 | // trg is exported | ||
10171 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
10172 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
10173 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
10174 | find mayEquivalent(problem, interpretation, var_virtual0, var_src); | ||
10175 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
10176 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
10177 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
10178 | find mayEquivalent(problem, interpretation, var_virtual1, var_trg); | ||
10179 | } | ||
10180 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
10181 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10182 | var_t, var_src, var_trg) | ||
10183 | { | ||
10184 | find interpretation(problem,interpretation); | ||
10185 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
10186 | find mustInstanceOfVertex_class(problem,interpretation,var_src); | ||
10187 | find mustInstanceOfVertex_class(problem,interpretation,var_trg); | ||
10188 | // t is exported | ||
10189 | // src is exported | ||
10190 | // trg is exported | ||
10191 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
10192 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
10193 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
10194 | var_virtual0 == var_src; | ||
10195 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
10196 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
10197 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
10198 | var_virtual1 == var_trg; | ||
10199 | } | ||
10200 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries incomingToEntry | ||
10201 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
10202 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10203 | var_t, var_e) | ||
10204 | { | ||
10205 | find interpretation(problem,interpretation); | ||
10206 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
10207 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
10208 | // t is exported | ||
10209 | // e is exported | ||
10210 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
10211 | } | ||
10212 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
10213 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10214 | var_t, var_e) | ||
10215 | { | ||
10216 | find interpretation(problem,interpretation); | ||
10217 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
10218 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
10219 | // t is exported | ||
10220 | // e is exported | ||
10221 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
10222 | } | ||
10223 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
10224 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10225 | var_t, var_e) | ||
10226 | { | ||
10227 | find interpretation(problem,interpretation); | ||
10228 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
10229 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
10230 | // t is exported | ||
10231 | // e is exported | ||
10232 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
10233 | } | ||
10234 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noOutgoingTransitionFromEntry | ||
10235 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
10236 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10237 | var_e) | ||
10238 | { | ||
10239 | find interpretation(problem,interpretation); | ||
10240 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
10241 | // e is exported | ||
10242 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
10243 | } | ||
10244 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
10245 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10246 | var_e) | ||
10247 | { | ||
10248 | find interpretation(problem,interpretation); | ||
10249 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
10250 | // e is exported | ||
10251 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
10252 | } | ||
10253 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
10254 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10255 | var_e) | ||
10256 | { | ||
10257 | find interpretation(problem,interpretation); | ||
10258 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
10259 | // e is exported | ||
10260 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
10261 | } | ||
10262 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleTransitionFromEntry | ||
10263 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
10264 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10265 | var_e, var_t1, var_t2) | ||
10266 | { | ||
10267 | find interpretation(problem,interpretation); | ||
10268 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
10269 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
10270 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
10271 | // e is exported | ||
10272 | // t1 is exported | ||
10273 | // t2 is exported | ||
10274 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
10275 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
10276 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
10277 | var_virtual0 == var_t1; | ||
10278 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
10279 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
10280 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
10281 | var_virtual1 == var_t2; | ||
10282 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
10283 | } | ||
10284 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
10285 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10286 | var_e, var_t1, var_t2) | ||
10287 | { | ||
10288 | find interpretation(problem,interpretation); | ||
10289 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
10290 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
10291 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
10292 | // e is exported | ||
10293 | // t1 is exported | ||
10294 | // t2 is exported | ||
10295 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
10296 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
10297 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
10298 | find mayEquivalent(problem, interpretation, var_virtual0, var_t1); | ||
10299 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
10300 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
10301 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
10302 | find mayEquivalent(problem, interpretation, var_virtual1, var_t2); | ||
10303 | var_t1 != var_t2; | ||
10304 | } | ||
10305 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
10306 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10307 | var_e, var_t1, var_t2) | ||
10308 | { | ||
10309 | find interpretation(problem,interpretation); | ||
10310 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
10311 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
10312 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
10313 | // e is exported | ||
10314 | // t1 is exported | ||
10315 | // t2 is exported | ||
10316 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
10317 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
10318 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
10319 | var_virtual0 == var_t1; | ||
10320 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
10321 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
10322 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
10323 | var_virtual1 == var_t2; | ||
10324 | var_t1 != var_t2; | ||
10325 | } | ||
10326 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromExit | ||
10327 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
10328 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10329 | var_t, var_e) | ||
10330 | { | ||
10331 | find interpretation(problem,interpretation); | ||
10332 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
10333 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
10334 | // t is exported | ||
10335 | // e is exported | ||
10336 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
10337 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
10338 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
10339 | var_virtual0 == var_t; | ||
10340 | } | ||
10341 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
10342 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10343 | var_t, var_e) | ||
10344 | { | ||
10345 | find interpretation(problem,interpretation); | ||
10346 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
10347 | find mayInstanceOfExit_class(problem,interpretation,var_e); | ||
10348 | // t is exported | ||
10349 | // e is exported | ||
10350 | find mayInstanceOfExit_class(problem,interpretation,var_e); | ||
10351 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
10352 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
10353 | find mayEquivalent(problem, interpretation, var_virtual0, var_t); | ||
10354 | } | ||
10355 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
10356 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10357 | var_t, var_e) | ||
10358 | { | ||
10359 | find interpretation(problem,interpretation); | ||
10360 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
10361 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
10362 | // t is exported | ||
10363 | // e is exported | ||
10364 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
10365 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
10366 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
10367 | var_virtual0 == var_t; | ||
10368 | } | ||
10369 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromFinal | ||
10370 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
10371 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10372 | var_t, var_f) | ||
10373 | { | ||
10374 | find interpretation(problem,interpretation); | ||
10375 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
10376 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
10377 | // t is exported | ||
10378 | // f is exported | ||
10379 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
10380 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
10381 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
10382 | var_virtual0 == var_t; | ||
10383 | } | ||
10384 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
10385 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10386 | var_t, var_f) | ||
10387 | { | ||
10388 | find interpretation(problem,interpretation); | ||
10389 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
10390 | find mayInstanceOfFinalState_class(problem,interpretation,var_f); | ||
10391 | // t is exported | ||
10392 | // f is exported | ||
10393 | find mayInstanceOfFinalState_class(problem,interpretation,var_f); | ||
10394 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
10395 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
10396 | find mayEquivalent(problem, interpretation, var_virtual0, var_t); | ||
10397 | } | ||
10398 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
10399 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10400 | var_t, var_f) | ||
10401 | { | ||
10402 | find interpretation(problem,interpretation); | ||
10403 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
10404 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
10405 | // t is exported | ||
10406 | // f is exported | ||
10407 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
10408 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
10409 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
10410 | var_virtual0 == var_t; | ||
10411 | } | ||
10412 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noStateInRegion | ||
10413 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
10414 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10415 | var_region) | ||
10416 | { | ||
10417 | find interpretation(problem,interpretation); | ||
10418 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
10419 | // region is exported | ||
10420 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
10421 | } | ||
10422 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
10423 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10424 | var_region) | ||
10425 | { | ||
10426 | find interpretation(problem,interpretation); | ||
10427 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
10428 | // region is exported | ||
10429 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
10430 | } | ||
10431 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
10432 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10433 | var_region) | ||
10434 | { | ||
10435 | find interpretation(problem,interpretation); | ||
10436 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
10437 | // region is exported | ||
10438 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
10439 | } | ||
10440 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries StateInRegion | ||
10441 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
10442 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10443 | var_region, var_state) | ||
10444 | { | ||
10445 | find interpretation(problem,interpretation); | ||
10446 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
10447 | find mustInstanceOfState_class(problem,interpretation,var_state); | ||
10448 | // region is exported | ||
10449 | // state is exported | ||
10450 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
10451 | find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
10452 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
10453 | var_virtual0 == var_state; | ||
10454 | } | ||
10455 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
10456 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10457 | var_region, var_state) | ||
10458 | { | ||
10459 | find interpretation(problem,interpretation); | ||
10460 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
10461 | find mayInstanceOfState_class(problem,interpretation,var_state); | ||
10462 | // region is exported | ||
10463 | // state is exported | ||
10464 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
10465 | find mayInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
10466 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
10467 | find mayEquivalent(problem, interpretation, var_virtual0, var_state); | ||
10468 | } | ||
10469 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
10470 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10471 | var_region, var_state) | ||
10472 | { | ||
10473 | find interpretation(problem,interpretation); | ||
10474 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
10475 | find mustInstanceOfState_class(problem,interpretation,var_state); | ||
10476 | // region is exported | ||
10477 | // state is exported | ||
10478 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
10479 | find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
10480 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
10481 | var_virtual0 == var_state; | ||
10482 | } | ||
10483 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoOutgoing | ||
10484 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
10485 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10486 | var_c) | ||
10487 | { | ||
10488 | find interpretation(problem,interpretation); | ||
10489 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
10490 | // c is exported | ||
10491 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
10492 | } | ||
10493 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
10494 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10495 | var_c) | ||
10496 | { | ||
10497 | find interpretation(problem,interpretation); | ||
10498 | find mayInstanceOfChoice_class(problem,interpretation,var_c); | ||
10499 | // c is exported | ||
10500 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
10501 | } | ||
10502 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
10503 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10504 | var_c) | ||
10505 | { | ||
10506 | find interpretation(problem,interpretation); | ||
10507 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
10508 | // c is exported | ||
10509 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
10510 | } | ||
10511 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoIncoming | ||
10512 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
10513 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10514 | var_c) | ||
10515 | { | ||
10516 | find interpretation(problem,interpretation); | ||
10517 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
10518 | // c is exported | ||
10519 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
10520 | } | ||
10521 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
10522 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10523 | var_c) | ||
10524 | { | ||
10525 | find interpretation(problem,interpretation); | ||
10526 | find mayInstanceOfChoice_class(problem,interpretation,var_c); | ||
10527 | // c is exported | ||
10528 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
10529 | } | ||
10530 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
10531 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10532 | var_c) | ||
10533 | { | ||
10534 | find interpretation(problem,interpretation); | ||
10535 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
10536 | // c is exported | ||
10537 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
10538 | } | ||
10539 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoOutgoing | ||
10540 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
10541 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10542 | var_s) | ||
10543 | { | ||
10544 | find interpretation(problem,interpretation); | ||
10545 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10546 | // s is exported | ||
10547 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
10548 | } | ||
10549 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
10550 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10551 | var_s) | ||
10552 | { | ||
10553 | find interpretation(problem,interpretation); | ||
10554 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10555 | // s is exported | ||
10556 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
10557 | } | ||
10558 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
10559 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10560 | var_s) | ||
10561 | { | ||
10562 | find interpretation(problem,interpretation); | ||
10563 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10564 | // s is exported | ||
10565 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
10566 | } | ||
10567 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoIncoming | ||
10568 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
10569 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10570 | var_s) | ||
10571 | { | ||
10572 | find interpretation(problem,interpretation); | ||
10573 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10574 | // s is exported | ||
10575 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
10576 | } | ||
10577 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
10578 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10579 | var_s) | ||
10580 | { | ||
10581 | find interpretation(problem,interpretation); | ||
10582 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10583 | // s is exported | ||
10584 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
10585 | } | ||
10586 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
10587 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10588 | var_s) | ||
10589 | { | ||
10590 | find interpretation(problem,interpretation); | ||
10591 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10592 | // s is exported | ||
10593 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
10594 | } | ||
10595 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedIncomingInSameRegion | ||
10596 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
10597 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10598 | var_s, var_v1, var_v2) | ||
10599 | { | ||
10600 | find interpretation(problem,interpretation); | ||
10601 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10602 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
10603 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
10604 | // s is exported | ||
10605 | // v1 is exported | ||
10606 | // v2 is exported | ||
10607 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
10608 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
10609 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
10610 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
10611 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
10612 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
10613 | var_virtual0 == var_v1; | ||
10614 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
10615 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
10616 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
10617 | var_virtual1 == var_v2; | ||
10618 | }or{ | ||
10619 | find interpretation(problem,interpretation); | ||
10620 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10621 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
10622 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
10623 | // s is exported | ||
10624 | // v1 is exported | ||
10625 | // v2 is exported | ||
10626 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
10627 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
10628 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
10629 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
10630 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
10631 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
10632 | var_virtual0 == var_v1; | ||
10633 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
10634 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
10635 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
10636 | var_virtual1 == var_v2; | ||
10637 | } | ||
10638 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
10639 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10640 | var_s, var_v1, var_v2) | ||
10641 | { | ||
10642 | find interpretation(problem,interpretation); | ||
10643 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10644 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
10645 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
10646 | // s is exported | ||
10647 | // v1 is exported | ||
10648 | // v2 is exported | ||
10649 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
10650 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
10651 | var_t1 != var_t2; | ||
10652 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
10653 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
10654 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
10655 | find mayEquivalent(problem, interpretation, var_virtual0, var_v1); | ||
10656 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
10657 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
10658 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
10659 | find mayEquivalent(problem, interpretation, var_virtual1, var_v2); | ||
10660 | }or{ | ||
10661 | find interpretation(problem,interpretation); | ||
10662 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10663 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
10664 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
10665 | // s is exported | ||
10666 | // v1 is exported | ||
10667 | // v2 is exported | ||
10668 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
10669 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
10670 | var_t1 != var_t2; | ||
10671 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
10672 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
10673 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
10674 | find mayEquivalent(problem, interpretation, var_virtual0, var_v1); | ||
10675 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
10676 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
10677 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
10678 | find mayEquivalent(problem, interpretation, var_virtual1, var_v2); | ||
10679 | } | ||
10680 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
10681 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10682 | var_s, var_v1, var_v2) | ||
10683 | { | ||
10684 | find interpretation(problem,interpretation); | ||
10685 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10686 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
10687 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
10688 | // s is exported | ||
10689 | // v1 is exported | ||
10690 | // v2 is exported | ||
10691 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
10692 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
10693 | var_t1 != var_t2; | ||
10694 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
10695 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
10696 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
10697 | var_virtual0 == var_v1; | ||
10698 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
10699 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
10700 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
10701 | var_virtual1 == var_v2; | ||
10702 | }or{ | ||
10703 | find interpretation(problem,interpretation); | ||
10704 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10705 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
10706 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
10707 | // s is exported | ||
10708 | // v1 is exported | ||
10709 | // v2 is exported | ||
10710 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
10711 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
10712 | var_t1 != var_t2; | ||
10713 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
10714 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
10715 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
10716 | var_virtual0 == var_v1; | ||
10717 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
10718 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
10719 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
10720 | var_virtual1 == var_v2; | ||
10721 | } | ||
10722 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries notSynchronizingStates | ||
10723 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
10724 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10725 | var_s) | ||
10726 | { | ||
10727 | find interpretation(problem,interpretation); | ||
10728 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10729 | // s is exported | ||
10730 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
10731 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
10732 | } | ||
10733 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
10734 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10735 | var_s) | ||
10736 | { | ||
10737 | find interpretation(problem,interpretation); | ||
10738 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10739 | // s is exported | ||
10740 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
10741 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
10742 | } | ||
10743 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
10744 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10745 | var_s) | ||
10746 | { | ||
10747 | find interpretation(problem,interpretation); | ||
10748 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10749 | // s is exported | ||
10750 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
10751 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
10752 | } | ||
10753 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleOutgoingTrainsition | ||
10754 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
10755 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10756 | var_v) | ||
10757 | { | ||
10758 | find interpretation(problem,interpretation); | ||
10759 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
10760 | // v is exported | ||
10761 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
10762 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
10763 | neg find mayEquivalent(problem, interpretation, var_trg1, var_trg2); | ||
10764 | } | ||
10765 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
10766 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10767 | var_v) | ||
10768 | { | ||
10769 | find interpretation(problem,interpretation); | ||
10770 | find mayInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
10771 | // v is exported | ||
10772 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
10773 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
10774 | var_trg1 != var_trg2; | ||
10775 | } | ||
10776 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
10777 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10778 | var_v) | ||
10779 | { | ||
10780 | find interpretation(problem,interpretation); | ||
10781 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
10782 | // v is exported | ||
10783 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
10784 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
10785 | var_trg1 != var_trg2; | ||
10786 | } | ||
10787 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleIncomingTrainsition | ||
10788 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
10789 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10790 | var_v) | ||
10791 | { | ||
10792 | find interpretation(problem,interpretation); | ||
10793 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
10794 | // v is exported | ||
10795 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
10796 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
10797 | neg find mayEquivalent(problem, interpretation, var_src1, var_src2); | ||
10798 | } | ||
10799 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
10800 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10801 | var_v) | ||
10802 | { | ||
10803 | find interpretation(problem,interpretation); | ||
10804 | find mayInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
10805 | // v is exported | ||
10806 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
10807 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
10808 | var_src1 != var_src2; | ||
10809 | } | ||
10810 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
10811 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10812 | var_v) | ||
10813 | { | ||
10814 | find interpretation(problem,interpretation); | ||
10815 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
10816 | // v is exported | ||
10817 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
10818 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
10819 | var_src1 != var_src2; | ||
10820 | } | ||
10821 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionsAreNotSiblings | ||
10822 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
10823 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10824 | var_s, var_v1, var_v2) | ||
10825 | { | ||
10826 | find interpretation(problem,interpretation); | ||
10827 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10828 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
10829 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
10830 | // s is exported | ||
10831 | // v1 is exported | ||
10832 | // v2 is exported | ||
10833 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
10834 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
10835 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
10836 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
10837 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
10838 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
10839 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
10840 | var_virtual1 == var_v1; | ||
10841 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
10842 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
10843 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
10844 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
10845 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
10846 | var_virtual3 == var_v2; | ||
10847 | neg find mayEquivalent(problem, interpretation, var_r1, var_r2); | ||
10848 | }or{ | ||
10849 | find interpretation(problem,interpretation); | ||
10850 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10851 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
10852 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
10853 | // s is exported | ||
10854 | // v1 is exported | ||
10855 | // v2 is exported | ||
10856 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
10857 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
10858 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
10859 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
10860 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
10861 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
10862 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
10863 | var_virtual1 == var_v1; | ||
10864 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
10865 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
10866 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
10867 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
10868 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
10869 | var_virtual3 == var_v2; | ||
10870 | neg find mayEquivalent(problem, interpretation, var_r1, var_r2); | ||
10871 | } | ||
10872 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
10873 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10874 | var_s, var_v1, var_v2) | ||
10875 | { | ||
10876 | find interpretation(problem,interpretation); | ||
10877 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10878 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
10879 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
10880 | // s is exported | ||
10881 | // v1 is exported | ||
10882 | // v2 is exported | ||
10883 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
10884 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
10885 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
10886 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
10887 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
10888 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
10889 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
10890 | find mayEquivalent(problem, interpretation, var_virtual1, var_v1); | ||
10891 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
10892 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
10893 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
10894 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
10895 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
10896 | find mayEquivalent(problem, interpretation, var_virtual3, var_v2); | ||
10897 | var_r1 != var_r2; | ||
10898 | }or{ | ||
10899 | find interpretation(problem,interpretation); | ||
10900 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10901 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
10902 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
10903 | // s is exported | ||
10904 | // v1 is exported | ||
10905 | // v2 is exported | ||
10906 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
10907 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
10908 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
10909 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
10910 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
10911 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
10912 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
10913 | find mayEquivalent(problem, interpretation, var_virtual1, var_v1); | ||
10914 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
10915 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
10916 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
10917 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
10918 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
10919 | find mayEquivalent(problem, interpretation, var_virtual3, var_v2); | ||
10920 | var_r1 != var_r2; | ||
10921 | } | ||
10922 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
10923 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10924 | var_s, var_v1, var_v2) | ||
10925 | { | ||
10926 | find interpretation(problem,interpretation); | ||
10927 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10928 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
10929 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
10930 | // s is exported | ||
10931 | // v1 is exported | ||
10932 | // v2 is exported | ||
10933 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
10934 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
10935 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
10936 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
10937 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
10938 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
10939 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
10940 | var_virtual1 == var_v1; | ||
10941 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
10942 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
10943 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
10944 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
10945 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
10946 | var_virtual3 == var_v2; | ||
10947 | var_r1 != var_r2; | ||
10948 | }or{ | ||
10949 | find interpretation(problem,interpretation); | ||
10950 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
10951 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
10952 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
10953 | // s is exported | ||
10954 | // v1 is exported | ||
10955 | // v2 is exported | ||
10956 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
10957 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
10958 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
10959 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
10960 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
10961 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
10962 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
10963 | var_virtual1 == var_v1; | ||
10964 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
10965 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
10966 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
10967 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
10968 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
10969 | var_virtual3 == var_v2; | ||
10970 | var_r1 != var_r2; | ||
10971 | } | ||
10972 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries child | ||
10973 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
10974 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10975 | var_parent, var_child) | ||
10976 | { | ||
10977 | find interpretation(problem,interpretation); | ||
10978 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
10979 | find mustInstanceOfVertex_class(problem,interpretation,var_child); | ||
10980 | // parent is exported | ||
10981 | // child is exported | ||
10982 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
10983 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
10984 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
10985 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
10986 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
10987 | var_virtual1 == var_child; | ||
10988 | } | ||
10989 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
10990 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
10991 | var_parent, var_child) | ||
10992 | { | ||
10993 | find interpretation(problem,interpretation); | ||
10994 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
10995 | find mayInstanceOfVertex_class(problem,interpretation,var_child); | ||
10996 | // parent is exported | ||
10997 | // child is exported | ||
10998 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
10999 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
11000 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
11001 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
11002 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
11003 | find mayEquivalent(problem, interpretation, var_virtual1, var_child); | ||
11004 | } | ||
11005 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
11006 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11007 | var_parent, var_child) | ||
11008 | { | ||
11009 | find interpretation(problem,interpretation); | ||
11010 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
11011 | find mustInstanceOfVertex_class(problem,interpretation,var_child); | ||
11012 | // parent is exported | ||
11013 | // child is exported | ||
11014 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
11015 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
11016 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
11017 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
11018 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
11019 | var_virtual1 == var_child; | ||
11020 | } | ||
11021 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionDoesNotHaveMultipleRegions | ||
11022 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
11023 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11024 | var_s, var_v) | ||
11025 | { | ||
11026 | find interpretation(problem,interpretation); | ||
11027 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
11028 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
11029 | // s is exported | ||
11030 | // v is exported | ||
11031 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
11032 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
11033 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
11034 | }or{ | ||
11035 | find interpretation(problem,interpretation); | ||
11036 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
11037 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
11038 | // s is exported | ||
11039 | // v is exported | ||
11040 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
11041 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
11042 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
11043 | } | ||
11044 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
11045 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11046 | var_s, var_v) | ||
11047 | { | ||
11048 | find interpretation(problem,interpretation); | ||
11049 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
11050 | find mayInstanceOfVertex_class(problem,interpretation,var_v); | ||
11051 | // s is exported | ||
11052 | // v is exported | ||
11053 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
11054 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
11055 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
11056 | }or{ | ||
11057 | find interpretation(problem,interpretation); | ||
11058 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
11059 | find mayInstanceOfVertex_class(problem,interpretation,var_v); | ||
11060 | // s is exported | ||
11061 | // v is exported | ||
11062 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
11063 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
11064 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
11065 | } | ||
11066 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
11067 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11068 | var_s, var_v) | ||
11069 | { | ||
11070 | find interpretation(problem,interpretation); | ||
11071 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
11072 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
11073 | // s is exported | ||
11074 | // v is exported | ||
11075 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
11076 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
11077 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
11078 | }or{ | ||
11079 | find interpretation(problem,interpretation); | ||
11080 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
11081 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
11082 | // s is exported | ||
11083 | // v is exported | ||
11084 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
11085 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
11086 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
11087 | } | ||
11088 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleRegions | ||
11089 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
11090 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11091 | var_composite) | ||
11092 | { | ||
11093 | find interpretation(problem,interpretation); | ||
11094 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
11095 | // composite is exported | ||
11096 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
11097 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
11098 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
11099 | var_virtual0 == var_region1; | ||
11100 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
11101 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
11102 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
11103 | var_virtual1 == var_region2; | ||
11104 | neg find mayEquivalent(problem, interpretation, var_region1, var_region2); | ||
11105 | } | ||
11106 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
11107 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11108 | var_composite) | ||
11109 | { | ||
11110 | find interpretation(problem,interpretation); | ||
11111 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
11112 | // composite is exported | ||
11113 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
11114 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
11115 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
11116 | find mayEquivalent(problem, interpretation, var_virtual0, var_region1); | ||
11117 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
11118 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
11119 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
11120 | find mayEquivalent(problem, interpretation, var_virtual1, var_region2); | ||
11121 | var_region1 != var_region2; | ||
11122 | } | ||
11123 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
11124 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11125 | var_composite) | ||
11126 | { | ||
11127 | find interpretation(problem,interpretation); | ||
11128 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
11129 | // composite is exported | ||
11130 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
11131 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
11132 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
11133 | var_virtual0 == var_region1; | ||
11134 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
11135 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
11136 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
11137 | var_virtual1 == var_region2; | ||
11138 | var_region1 != var_region2; | ||
11139 | } | ||
11140 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchThree | ||
11141 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
11142 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11143 | var_s) | ||
11144 | { | ||
11145 | find interpretation(problem,interpretation); | ||
11146 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
11147 | // s is exported | ||
11148 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
11149 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
11150 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
11151 | var_virtual0 == var_s; | ||
11152 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
11153 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
11154 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
11155 | var_virtual1 == var_s; | ||
11156 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
11157 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
11158 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
11159 | var_virtual2 == var_s; | ||
11160 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
11161 | neg find mayEquivalent(problem, interpretation, var_t2, var_t3); | ||
11162 | neg find mayEquivalent(problem, interpretation, var_t1, var_t3); | ||
11163 | }or{ | ||
11164 | find interpretation(problem,interpretation); | ||
11165 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
11166 | // s is exported | ||
11167 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
11168 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
11169 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
11170 | var_virtual0 == var_s; | ||
11171 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
11172 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
11173 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
11174 | var_virtual1 == var_s; | ||
11175 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
11176 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
11177 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
11178 | var_virtual2 == var_s; | ||
11179 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
11180 | neg find mayEquivalent(problem, interpretation, var_t2, var_t3); | ||
11181 | neg find mayEquivalent(problem, interpretation, var_t1, var_t3); | ||
11182 | } | ||
11183 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
11184 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11185 | var_s) | ||
11186 | { | ||
11187 | find interpretation(problem,interpretation); | ||
11188 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
11189 | // s is exported | ||
11190 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
11191 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
11192 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
11193 | find mayEquivalent(problem, interpretation, var_virtual0, var_s); | ||
11194 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
11195 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
11196 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
11197 | find mayEquivalent(problem, interpretation, var_virtual1, var_s); | ||
11198 | find mayInstanceOfTransition_class(problem,interpretation,var_t3); | ||
11199 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
11200 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
11201 | find mayEquivalent(problem, interpretation, var_virtual2, var_s); | ||
11202 | var_t1 != var_t2; | ||
11203 | var_t2 != var_t3; | ||
11204 | var_t1 != var_t3; | ||
11205 | }or{ | ||
11206 | find interpretation(problem,interpretation); | ||
11207 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
11208 | // s is exported | ||
11209 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
11210 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
11211 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
11212 | find mayEquivalent(problem, interpretation, var_virtual0, var_s); | ||
11213 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
11214 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
11215 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
11216 | find mayEquivalent(problem, interpretation, var_virtual1, var_s); | ||
11217 | find mayInstanceOfTransition_class(problem,interpretation,var_t3); | ||
11218 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
11219 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
11220 | find mayEquivalent(problem, interpretation, var_virtual2, var_s); | ||
11221 | var_t1 != var_t2; | ||
11222 | var_t2 != var_t3; | ||
11223 | var_t1 != var_t3; | ||
11224 | } | ||
11225 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
11226 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11227 | var_s) | ||
11228 | { | ||
11229 | find interpretation(problem,interpretation); | ||
11230 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
11231 | // s is exported | ||
11232 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
11233 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
11234 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
11235 | var_virtual0 == var_s; | ||
11236 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
11237 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
11238 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
11239 | var_virtual1 == var_s; | ||
11240 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
11241 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
11242 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
11243 | var_virtual2 == var_s; | ||
11244 | var_t1 != var_t2; | ||
11245 | var_t2 != var_t3; | ||
11246 | var_t1 != var_t3; | ||
11247 | }or{ | ||
11248 | find interpretation(problem,interpretation); | ||
11249 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
11250 | // s is exported | ||
11251 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
11252 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
11253 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
11254 | var_virtual0 == var_s; | ||
11255 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
11256 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
11257 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
11258 | var_virtual1 == var_s; | ||
11259 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
11260 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
11261 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
11262 | var_virtual2 == var_s; | ||
11263 | var_t1 != var_t2; | ||
11264 | var_t2 != var_t3; | ||
11265 | var_t1 != var_t3; | ||
11266 | } | ||
11267 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries twoSynch | ||
11268 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
11269 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11270 | var_s1, var_s2) | ||
11271 | { | ||
11272 | find interpretation(problem,interpretation); | ||
11273 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
11274 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
11275 | // s1 is exported | ||
11276 | // s2 is exported | ||
11277 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
11278 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
11279 | neg find mayEquivalent(problem, interpretation, var_s1, var_s2); | ||
11280 | } | ||
11281 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
11282 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11283 | var_s1, var_s2) | ||
11284 | { | ||
11285 | find interpretation(problem,interpretation); | ||
11286 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
11287 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
11288 | // s1 is exported | ||
11289 | // s2 is exported | ||
11290 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
11291 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
11292 | var_s1 != var_s2; | ||
11293 | } | ||
11294 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
11295 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11296 | var_s1, var_s2) | ||
11297 | { | ||
11298 | find interpretation(problem,interpretation); | ||
11299 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
11300 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
11301 | // s1 is exported | ||
11302 | // s2 is exported | ||
11303 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
11304 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
11305 | var_s1 != var_s2; | ||
11306 | } | ||
11307 | |||
11308 | ////////// | ||
11309 | // 1.4 Containment Indexer | ||
11310 | ////////// | ||
11311 | private pattern mustContains2(source: DefinedElement, target: DefinedElement) { | ||
11312 | find mustContains4(_,_,source,target); | ||
11313 | } | ||
11314 | |||
11315 | private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11316 | source: DefinedElement, target: DefinedElement) | ||
11317 | { find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target); }or | ||
11318 | |||
11319 | { find mustInRelationvertices_reference_Region(problem,interpretation,source,target); }or | ||
11320 | |||
11321 | { find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target); } | ||
11322 | |||
11323 | private pattern mustTransitiveContains(source,target) { | ||
11324 | find mustContains2+(source,target); | ||
11325 | } | ||
11326 | |||
11327 | ////////// | ||
11328 | // 2. Invalidation Indexers | ||
11329 | ////////// | ||
11330 | // 2.1 Invalidated by WF Queries | ||
11331 | ////////// | ||
11332 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11333 | var_r1) | ||
11334 | { | ||
11335 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1); | ||
11336 | } | ||
11337 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11338 | var_r) | ||
11339 | { | ||
11340 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r); | ||
11341 | } | ||
11342 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11343 | var_t, var_e) | ||
11344 | { | ||
11345 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e); | ||
11346 | } | ||
11347 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11348 | var_e) | ||
11349 | { | ||
11350 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e); | ||
11351 | } | ||
11352 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11353 | var_e, var_t1, var_t2) | ||
11354 | { | ||
11355 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2); | ||
11356 | } | ||
11357 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11358 | var_t, var_e) | ||
11359 | { | ||
11360 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e); | ||
11361 | } | ||
11362 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11363 | var_t, var_f) | ||
11364 | { | ||
11365 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f); | ||
11366 | } | ||
11367 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11368 | var_region) | ||
11369 | { | ||
11370 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region); | ||
11371 | } | ||
11372 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11373 | var_c) | ||
11374 | { | ||
11375 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c); | ||
11376 | } | ||
11377 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11378 | var_c) | ||
11379 | { | ||
11380 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c); | ||
11381 | } | ||
11382 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11383 | var_s) | ||
11384 | { | ||
11385 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s); | ||
11386 | } | ||
11387 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11388 | var_s) | ||
11389 | { | ||
11390 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s); | ||
11391 | } | ||
11392 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11393 | var_s, var_v1, var_v2) | ||
11394 | { | ||
11395 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2); | ||
11396 | } | ||
11397 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11398 | var_s) | ||
11399 | { | ||
11400 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s); | ||
11401 | } | ||
11402 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11403 | var_s, var_v1, var_v2) | ||
11404 | { | ||
11405 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2); | ||
11406 | } | ||
11407 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11408 | var_s, var_v) | ||
11409 | { | ||
11410 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v); | ||
11411 | } | ||
11412 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11413 | var_s) | ||
11414 | { | ||
11415 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s); | ||
11416 | } | ||
11417 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11418 | var_s1, var_s2) | ||
11419 | { | ||
11420 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2); | ||
11421 | } | ||
11422 | |||
11423 | ////////// | ||
11424 | // 3. Unfinishedness Indexers | ||
11425 | ////////// | ||
11426 | // 3.1 Unfinishedness Measured by Multiplicity | ||
11427 | ////////// | ||
11428 | pattern unfinishedLowerMultiplicity_target_reference_Transition(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
11429 | find interpretation(problem,interpretation); | ||
11430 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
11431 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition"); | ||
11432 | find mustInstanceOfTransition_class(problem,interpretation,object); | ||
11433 | numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,object,_); | ||
11434 | check(numberOfExistingReferences < 1); | ||
11435 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
11436 | } | ||
11437 | |||
11438 | ////////// | ||
11439 | // 3.2 Unfinishedness Measured by WF Queries | ||
11440 | ////////// | ||
11441 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11442 | var_r1) | ||
11443 | { | ||
11444 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1); | ||
11445 | } | ||
11446 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11447 | var_r) | ||
11448 | { | ||
11449 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r); | ||
11450 | } | ||
11451 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11452 | var_t, var_e) | ||
11453 | { | ||
11454 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e); | ||
11455 | } | ||
11456 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11457 | var_e) | ||
11458 | { | ||
11459 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e); | ||
11460 | } | ||
11461 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11462 | var_e, var_t1, var_t2) | ||
11463 | { | ||
11464 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2); | ||
11465 | } | ||
11466 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11467 | var_t, var_e) | ||
11468 | { | ||
11469 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e); | ||
11470 | } | ||
11471 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11472 | var_t, var_f) | ||
11473 | { | ||
11474 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f); | ||
11475 | } | ||
11476 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11477 | var_region) | ||
11478 | { | ||
11479 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region); | ||
11480 | } | ||
11481 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11482 | var_c) | ||
11483 | { | ||
11484 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c); | ||
11485 | } | ||
11486 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11487 | var_c) | ||
11488 | { | ||
11489 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c); | ||
11490 | } | ||
11491 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11492 | var_s) | ||
11493 | { | ||
11494 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s); | ||
11495 | } | ||
11496 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11497 | var_s) | ||
11498 | { | ||
11499 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s); | ||
11500 | } | ||
11501 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11502 | var_s, var_v1, var_v2) | ||
11503 | { | ||
11504 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2); | ||
11505 | } | ||
11506 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11507 | var_s) | ||
11508 | { | ||
11509 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s); | ||
11510 | } | ||
11511 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11512 | var_s, var_v1, var_v2) | ||
11513 | { | ||
11514 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2); | ||
11515 | } | ||
11516 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11517 | var_s, var_v) | ||
11518 | { | ||
11519 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v); | ||
11520 | } | ||
11521 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11522 | var_s) | ||
11523 | { | ||
11524 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s); | ||
11525 | } | ||
11526 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation, | ||
11527 | var_s1, var_s2) | ||
11528 | { | ||
11529 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2); | ||
11530 | } | ||
11531 | |||
11532 | ////////// | ||
11533 | // 4. Refinement Indexers | ||
11534 | ////////// | ||
11535 | // 4.1 Object constructors | ||
11536 | ////////// | ||
11537 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) | ||
11538 | { | ||
11539 | find interpretation(problem,interpretation); | ||
11540 | find mustInstanceOfPseudostate_class(problem,interpretation,root); | ||
11541 | find mustExist(problem, interpretation, root); | ||
11542 | }or{ | ||
11543 | find interpretation(problem,interpretation); | ||
11544 | find mustInstanceOfVertex_class(problem,interpretation,root); | ||
11545 | find mustExist(problem, interpretation, root); | ||
11546 | }or{ | ||
11547 | find interpretation(problem,interpretation); | ||
11548 | find mustInstanceOfCompositeElement_class(problem,interpretation,root); | ||
11549 | find mustExist(problem, interpretation, root); | ||
11550 | }or{ | ||
11551 | find interpretation(problem,interpretation); | ||
11552 | find mustInstanceOfFinalState_class(problem,interpretation,root); | ||
11553 | find mustExist(problem, interpretation, root); | ||
11554 | }or{ | ||
11555 | find interpretation(problem,interpretation); | ||
11556 | find mustInstanceOfTransition_class(problem,interpretation,root); | ||
11557 | find mustExist(problem, interpretation, root); | ||
11558 | }or{ | ||
11559 | find interpretation(problem,interpretation); | ||
11560 | find mustInstanceOfRegion_class(problem,interpretation,root); | ||
11561 | find mustExist(problem, interpretation, root); | ||
11562 | }or{ | ||
11563 | find interpretation(problem,interpretation); | ||
11564 | find mustInstanceOfStatechart_class(problem,interpretation,root); | ||
11565 | find mustExist(problem, interpretation, root); | ||
11566 | }or{ | ||
11567 | find interpretation(problem,interpretation); | ||
11568 | find mustInstanceOfExit_class(problem,interpretation,root); | ||
11569 | find mustExist(problem, interpretation, root); | ||
11570 | }or{ | ||
11571 | find interpretation(problem,interpretation); | ||
11572 | find mustInstanceOfChoice_class(problem,interpretation,root); | ||
11573 | find mustExist(problem, interpretation, root); | ||
11574 | }or{ | ||
11575 | find interpretation(problem,interpretation); | ||
11576 | find mustInstanceOfRegularState_class(problem,interpretation,root); | ||
11577 | find mustExist(problem, interpretation, root); | ||
11578 | }or{ | ||
11579 | find interpretation(problem,interpretation); | ||
11580 | find mustInstanceOfSynchronization_class(problem,interpretation,root); | ||
11581 | find mustExist(problem, interpretation, root); | ||
11582 | }or{ | ||
11583 | find interpretation(problem,interpretation); | ||
11584 | find mustInstanceOfEntry_class(problem,interpretation,root); | ||
11585 | find mustExist(problem, interpretation, root); | ||
11586 | }or{ | ||
11587 | find interpretation(problem,interpretation); | ||
11588 | find mustInstanceOfState_class(problem,interpretation,root); | ||
11589 | find mustExist(problem, interpretation, root); | ||
11590 | }or{ | ||
11591 | find interpretation(problem,interpretation); | ||
11592 | find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,root); | ||
11593 | find mustExist(problem, interpretation, root); | ||
11594 | }or{ | ||
11595 | find interpretation(problem,interpretation); | ||
11596 | find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,root); | ||
11597 | find mustExist(problem, interpretation, root); | ||
11598 | }or{ | ||
11599 | find interpretation(problem,interpretation); | ||
11600 | find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,root); | ||
11601 | find mustExist(problem, interpretation, root); | ||
11602 | }or{ | ||
11603 | find interpretation(problem,interpretation); | ||
11604 | find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,root); | ||
11605 | find mustExist(problem, interpretation, root); | ||
11606 | } | ||
11607 | pattern createObject_Entry_class_by_vertices_reference_Region( | ||
11608 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11609 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
11610 | container:DefinedElement) | ||
11611 | { | ||
11612 | find interpretation(problem,interpretation); | ||
11613 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
11614 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class"); | ||
11615 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
11616 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
11617 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
11618 | find mayInstanceOfEntry_class(problem,interpretation,newObject); | ||
11619 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
11620 | find mustExist(problem, interpretation, container); | ||
11621 | neg find mustExist(problem, interpretation, newObject); | ||
11622 | } | ||
11623 | pattern createObject_Entry_class( | ||
11624 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11625 | typeInterpretation:PartialComplexTypeInterpretation) | ||
11626 | { | ||
11627 | find interpretation(problem,interpretation); | ||
11628 | neg find hasElementInContainment(problem,interpretation); | ||
11629 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
11630 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class"); | ||
11631 | find mayInstanceOfEntry_class(problem,interpretation,newObject); | ||
11632 | find mayExist(problem, interpretation, newObject); | ||
11633 | neg find mustExist(problem, interpretation, newObject); | ||
11634 | } | ||
11635 | pattern createObject_FinalState_class_by_vertices_reference_Region( | ||
11636 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11637 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
11638 | container:DefinedElement) | ||
11639 | { | ||
11640 | find interpretation(problem,interpretation); | ||
11641 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
11642 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class"); | ||
11643 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
11644 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
11645 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
11646 | find mayInstanceOfFinalState_class(problem,interpretation,newObject); | ||
11647 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
11648 | find mustExist(problem, interpretation, container); | ||
11649 | neg find mustExist(problem, interpretation, newObject); | ||
11650 | } | ||
11651 | pattern createObject_FinalState_class( | ||
11652 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11653 | typeInterpretation:PartialComplexTypeInterpretation) | ||
11654 | { | ||
11655 | find interpretation(problem,interpretation); | ||
11656 | neg find hasElementInContainment(problem,interpretation); | ||
11657 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
11658 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class"); | ||
11659 | find mayInstanceOfFinalState_class(problem,interpretation,newObject); | ||
11660 | find mayExist(problem, interpretation, newObject); | ||
11661 | neg find mustExist(problem, interpretation, newObject); | ||
11662 | } | ||
11663 | pattern createObject_Synchronization_class_by_vertices_reference_Region( | ||
11664 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11665 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
11666 | container:DefinedElement) | ||
11667 | { | ||
11668 | find interpretation(problem,interpretation); | ||
11669 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
11670 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class"); | ||
11671 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
11672 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
11673 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
11674 | find mayInstanceOfSynchronization_class(problem,interpretation,newObject); | ||
11675 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
11676 | find mustExist(problem, interpretation, container); | ||
11677 | neg find mustExist(problem, interpretation, newObject); | ||
11678 | } | ||
11679 | pattern createObject_Synchronization_class( | ||
11680 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11681 | typeInterpretation:PartialComplexTypeInterpretation) | ||
11682 | { | ||
11683 | find interpretation(problem,interpretation); | ||
11684 | neg find hasElementInContainment(problem,interpretation); | ||
11685 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
11686 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class"); | ||
11687 | find mayInstanceOfSynchronization_class(problem,interpretation,newObject); | ||
11688 | find mayExist(problem, interpretation, newObject); | ||
11689 | neg find mustExist(problem, interpretation, newObject); | ||
11690 | } | ||
11691 | pattern createObject_Transition_class_by_outgoingTransitions_reference_Vertex_with_source_reference_Transition( | ||
11692 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11693 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
11694 | container:DefinedElement) | ||
11695 | { | ||
11696 | find interpretation(problem,interpretation); | ||
11697 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
11698 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class"); | ||
11699 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
11700 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingTransitions reference Vertex"); | ||
11701 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
11702 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"source reference Transition"); | ||
11703 | find mustInstanceOfVertex_class(problem,interpretation,container); | ||
11704 | find mayInstanceOfTransition_class(problem,interpretation,newObject); | ||
11705 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,container,newObject); | ||
11706 | find mustExist(problem, interpretation, container); | ||
11707 | neg find mustExist(problem, interpretation, newObject); | ||
11708 | } | ||
11709 | pattern createObject_Transition_class( | ||
11710 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11711 | typeInterpretation:PartialComplexTypeInterpretation) | ||
11712 | { | ||
11713 | find interpretation(problem,interpretation); | ||
11714 | neg find hasElementInContainment(problem,interpretation); | ||
11715 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
11716 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class"); | ||
11717 | find mayInstanceOfTransition_class(problem,interpretation,newObject); | ||
11718 | find mayExist(problem, interpretation, newObject); | ||
11719 | neg find mustExist(problem, interpretation, newObject); | ||
11720 | } | ||
11721 | pattern createObject_Choice_class_by_vertices_reference_Region( | ||
11722 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11723 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
11724 | container:DefinedElement) | ||
11725 | { | ||
11726 | find interpretation(problem,interpretation); | ||
11727 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
11728 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class"); | ||
11729 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
11730 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
11731 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
11732 | find mayInstanceOfChoice_class(problem,interpretation,newObject); | ||
11733 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
11734 | find mustExist(problem, interpretation, container); | ||
11735 | neg find mustExist(problem, interpretation, newObject); | ||
11736 | } | ||
11737 | pattern createObject_Choice_class( | ||
11738 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11739 | typeInterpretation:PartialComplexTypeInterpretation) | ||
11740 | { | ||
11741 | find interpretation(problem,interpretation); | ||
11742 | neg find hasElementInContainment(problem,interpretation); | ||
11743 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
11744 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class"); | ||
11745 | find mayInstanceOfChoice_class(problem,interpretation,newObject); | ||
11746 | find mayExist(problem, interpretation, newObject); | ||
11747 | neg find mustExist(problem, interpretation, newObject); | ||
11748 | } | ||
11749 | pattern createObject_Statechart_class_UndefinedPart( | ||
11750 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11751 | typeInterpretation:PartialComplexTypeInterpretation) | ||
11752 | { | ||
11753 | find interpretation(problem,interpretation); | ||
11754 | neg find hasElementInContainment(problem,interpretation); | ||
11755 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
11756 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Statechart class UndefinedPart"); | ||
11757 | find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,newObject); | ||
11758 | find mayExist(problem, interpretation, newObject); | ||
11759 | neg find mustExist(problem, interpretation, newObject); | ||
11760 | } | ||
11761 | pattern createObject_Region_class_by_regions_reference_CompositeElement( | ||
11762 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11763 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
11764 | container:DefinedElement) | ||
11765 | { | ||
11766 | find interpretation(problem,interpretation); | ||
11767 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
11768 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class"); | ||
11769 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
11770 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"regions reference CompositeElement"); | ||
11771 | find mustInstanceOfCompositeElement_class(problem,interpretation,container); | ||
11772 | find mayInstanceOfRegion_class(problem,interpretation,newObject); | ||
11773 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,container,newObject); | ||
11774 | find mustExist(problem, interpretation, container); | ||
11775 | neg find mustExist(problem, interpretation, newObject); | ||
11776 | } | ||
11777 | pattern createObject_Region_class( | ||
11778 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11779 | typeInterpretation:PartialComplexTypeInterpretation) | ||
11780 | { | ||
11781 | find interpretation(problem,interpretation); | ||
11782 | neg find hasElementInContainment(problem,interpretation); | ||
11783 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
11784 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class"); | ||
11785 | find mayInstanceOfRegion_class(problem,interpretation,newObject); | ||
11786 | find mayExist(problem, interpretation, newObject); | ||
11787 | neg find mustExist(problem, interpretation, newObject); | ||
11788 | } | ||
11789 | pattern createObject_State_class_by_vertices_reference_Region( | ||
11790 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11791 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
11792 | container:DefinedElement) | ||
11793 | { | ||
11794 | find interpretation(problem,interpretation); | ||
11795 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
11796 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class"); | ||
11797 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
11798 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
11799 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
11800 | find mayInstanceOfState_class(problem,interpretation,newObject); | ||
11801 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
11802 | find mustExist(problem, interpretation, container); | ||
11803 | neg find mustExist(problem, interpretation, newObject); | ||
11804 | } | ||
11805 | pattern createObject_State_class( | ||
11806 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11807 | typeInterpretation:PartialComplexTypeInterpretation) | ||
11808 | { | ||
11809 | find interpretation(problem,interpretation); | ||
11810 | neg find hasElementInContainment(problem,interpretation); | ||
11811 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
11812 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class"); | ||
11813 | find mayInstanceOfState_class(problem,interpretation,newObject); | ||
11814 | find mayExist(problem, interpretation, newObject); | ||
11815 | neg find mustExist(problem, interpretation, newObject); | ||
11816 | } | ||
11817 | pattern createObject_Exit_class_by_vertices_reference_Region( | ||
11818 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11819 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
11820 | container:DefinedElement) | ||
11821 | { | ||
11822 | find interpretation(problem,interpretation); | ||
11823 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
11824 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class"); | ||
11825 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
11826 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
11827 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
11828 | find mayInstanceOfExit_class(problem,interpretation,newObject); | ||
11829 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
11830 | find mustExist(problem, interpretation, container); | ||
11831 | neg find mustExist(problem, interpretation, newObject); | ||
11832 | } | ||
11833 | pattern createObject_Exit_class( | ||
11834 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11835 | typeInterpretation:PartialComplexTypeInterpretation) | ||
11836 | { | ||
11837 | find interpretation(problem,interpretation); | ||
11838 | neg find hasElementInContainment(problem,interpretation); | ||
11839 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
11840 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class"); | ||
11841 | find mayInstanceOfExit_class(problem,interpretation,newObject); | ||
11842 | find mayExist(problem, interpretation, newObject); | ||
11843 | neg find mustExist(problem, interpretation, newObject); | ||
11844 | } | ||
11845 | |||
11846 | ////////// | ||
11847 | // 4.2 Type refinement | ||
11848 | ////////// | ||
11849 | pattern refineTypeTo_Entry_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
11850 | find interpretation(problem,interpretation); | ||
11851 | PartialInterpretation.newElements(interpretation,element); | ||
11852 | find mayInstanceOfEntry_class(problem,interpretation,element); | ||
11853 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
11854 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
11855 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
11856 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
11857 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
11858 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
11859 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
11860 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
11861 | } | ||
11862 | pattern refineTypeTo_FinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
11863 | find interpretation(problem,interpretation); | ||
11864 | PartialInterpretation.newElements(interpretation,element); | ||
11865 | find mayInstanceOfFinalState_class(problem,interpretation,element); | ||
11866 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
11867 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
11868 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
11869 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
11870 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
11871 | } | ||
11872 | pattern refineTypeTo_Synchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
11873 | find interpretation(problem,interpretation); | ||
11874 | PartialInterpretation.newElements(interpretation,element); | ||
11875 | find mayInstanceOfSynchronization_class(problem,interpretation,element); | ||
11876 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
11877 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
11878 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
11879 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
11880 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
11881 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
11882 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
11883 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
11884 | } | ||
11885 | pattern refineTypeTo_Transition_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
11886 | find interpretation(problem,interpretation); | ||
11887 | PartialInterpretation.newElements(interpretation,element); | ||
11888 | find mayInstanceOfTransition_class(problem,interpretation,element); | ||
11889 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
11890 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
11891 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
11892 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
11893 | } | ||
11894 | pattern refineTypeTo_Choice_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
11895 | find interpretation(problem,interpretation); | ||
11896 | PartialInterpretation.newElements(interpretation,element); | ||
11897 | find mayInstanceOfChoice_class(problem,interpretation,element); | ||
11898 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
11899 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
11900 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
11901 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
11902 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
11903 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
11904 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
11905 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
11906 | } | ||
11907 | pattern refineTypeTo_Statechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
11908 | find interpretation(problem,interpretation); | ||
11909 | PartialInterpretation.newElements(interpretation,element); | ||
11910 | find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); | ||
11911 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
11912 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
11913 | neg find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); | ||
11914 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
11915 | } | ||
11916 | pattern refineTypeTo_Region_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
11917 | find interpretation(problem,interpretation); | ||
11918 | PartialInterpretation.newElements(interpretation,element); | ||
11919 | find mayInstanceOfRegion_class(problem,interpretation,element); | ||
11920 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
11921 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
11922 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
11923 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
11924 | } | ||
11925 | pattern refineTypeTo_State_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
11926 | find interpretation(problem,interpretation); | ||
11927 | PartialInterpretation.newElements(interpretation,element); | ||
11928 | find mayInstanceOfState_class(problem,interpretation,element); | ||
11929 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
11930 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
11931 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
11932 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
11933 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
11934 | neg find mustInstanceOfState_class(problem,interpretation,element); | ||
11935 | } | ||
11936 | pattern refineTypeTo_Exit_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
11937 | find interpretation(problem,interpretation); | ||
11938 | PartialInterpretation.newElements(interpretation,element); | ||
11939 | find mayInstanceOfExit_class(problem,interpretation,element); | ||
11940 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
11941 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
11942 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
11943 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
11944 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
11945 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
11946 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
11947 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
11948 | } | ||
11949 | |||
11950 | ////////// | ||
11951 | // 4.3 Relation refinement | ||
11952 | ////////// | ||
11953 | pattern refineRelation_incomingTransitions_reference_Vertex_and_target_reference_Transition( | ||
11954 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
11955 | relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, | ||
11956 | from: DefinedElement, to: DefinedElement) | ||
11957 | { | ||
11958 | find interpretation(problem,interpretation); | ||
11959 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
11960 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex"); | ||
11961 | PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); | ||
11962 | PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"target reference Transition"); | ||
11963 | find mustExist(problem, interpretation, from); | ||
11964 | find mustExist(problem, interpretation, to); | ||
11965 | find mustInstanceOfVertex_class(problem,interpretation,from); | ||
11966 | find mustInstanceOfTransition_class(problem,interpretation,to); | ||
11967 | find mayInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to); | ||
11968 | neg find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to); | ||
11969 | } | ||
11970 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
11971 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" | ||
11972 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
11973 | |||
11974 | ////////// | ||
11975 | // 0. Util | ||
11976 | ////////// | ||
11977 | private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
11978 | PartialInterpretation.problem(interpretation,problem); | ||
11979 | } | ||
11980 | |||
11981 | ///////////////////////// | ||
11982 | // 0.1 Existence | ||
11983 | ///////////////////////// | ||
11984 | private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
11985 | find interpretation(problem,interpretation); | ||
11986 | LogicProblem.elements(problem,element); | ||
11987 | } or { | ||
11988 | find interpretation(problem,interpretation); | ||
11989 | PartialInterpretation.newElements(interpretation,element); | ||
11990 | } | ||
11991 | |||
11992 | private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
11993 | find mustExist(problem,interpretation,element); | ||
11994 | } or { | ||
11995 | find interpretation(problem,interpretation); | ||
11996 | neg find elementCloseWorld(element); | ||
11997 | PartialInterpretation.openWorldElements(interpretation,element); | ||
11998 | } | ||
11999 | |||
12000 | private pattern elementCloseWorld(element:DefinedElement) { | ||
12001 | PartialInterpretation.openWorldElements(i,element); | ||
12002 | PartialInterpretation.maxNewElements(i,0); | ||
12003 | } or { | ||
12004 | Scope.targetTypeInterpretation(scope,interpretation); | ||
12005 | PartialTypeInterpratation.elements(interpretation,element); | ||
12006 | Scope.maxNewElements(scope,0); | ||
12007 | } | ||
12008 | |||
12009 | //////////////////////// | ||
12010 | // 0.2 Equivalence | ||
12011 | //////////////////////// | ||
12012 | pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { | ||
12013 | find mayExist(problem,interpretation,a); | ||
12014 | find mayExist(problem,interpretation,b); | ||
12015 | a == b; | ||
12016 | } | ||
12017 | |||
12018 | //////////////////////// | ||
12019 | // 0.3 Required Patterns by TypeIndexer | ||
12020 | //////////////////////// | ||
12021 | private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { | ||
12022 | find interpretation(problem,interpretation); | ||
12023 | LogicProblem.types(problem,type); | ||
12024 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
12025 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12026 | } | ||
12027 | |||
12028 | private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
12029 | find interpretation(problem,interpretation); | ||
12030 | LogicProblem.types(problem,type); | ||
12031 | TypeDefinition.elements(type,element); | ||
12032 | } or { | ||
12033 | find interpretation(problem,interpretation); | ||
12034 | find typeInterpretation(problem,interpretation,type,typeInterpretation); | ||
12035 | PartialComplexTypeInterpretation.elements(typeInterpretation,element); | ||
12036 | } | ||
12037 | |||
12038 | private pattern isPrimitive(element: PrimitiveElement) { | ||
12039 | PrimitiveElement(element); | ||
12040 | } | ||
12041 | |||
12042 | ////////// | ||
12043 | // 1. Problem-Specific Base Indexers | ||
12044 | ////////// | ||
12045 | // 1.1 Type Indexers | ||
12046 | ////////// | ||
12047 | // 1.1.1 primitive Type Indexers | ||
12048 | ////////// | ||
12049 | |||
12050 | ////////// | ||
12051 | // 1.1.2 domain-specific Type Indexers | ||
12052 | ////////// | ||
12053 | /** | ||
12054 | * An element must be an instance of type "Pseudostate class". | ||
12055 | */ | ||
12056 | private pattern mustInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12057 | Type.name(type,"Pseudostate class"); | ||
12058 | find directInstanceOf(problem,interpretation,element,type); | ||
12059 | } | ||
12060 | private pattern scopeDisallowsNewPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12061 | find interpretation(problem,interpretation); | ||
12062 | PartialInterpretation.scopes(interpretation,scope); | ||
12063 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12064 | Scope.maxNewElements(scope,0); | ||
12065 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12066 | Type.name(type,"Pseudostate class"); | ||
12067 | } | ||
12068 | |||
12069 | /** | ||
12070 | * An element may be an instance of type "Pseudostate class". | ||
12071 | */ | ||
12072 | private pattern mayInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12073 | { | ||
12074 | find interpretation(problem,interpretation); | ||
12075 | PartialInterpretation.newElements(interpretation,element); | ||
12076 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12077 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
12078 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
12079 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
12080 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
12081 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
12082 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
12083 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12084 | neg find scopeDisallowsNewPseudostate_class(problem, interpretation); | ||
12085 | neg find isPrimitive(element); | ||
12086 | } or { | ||
12087 | find interpretation(problem,interpretation); | ||
12088 | PartialInterpretation.openWorldElements(interpretation,element); | ||
12089 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12090 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
12091 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
12092 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
12093 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
12094 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
12095 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
12096 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12097 | neg find scopeDisallowsNewPseudostate_class(problem, interpretation); | ||
12098 | neg find isPrimitive(element); | ||
12099 | } or | ||
12100 | { find mustInstanceOfPseudostate_class(problem,interpretation,element); } | ||
12101 | /** | ||
12102 | * An element must be an instance of type "Vertex class". | ||
12103 | */ | ||
12104 | private pattern mustInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12105 | Type.name(type,"Vertex class"); | ||
12106 | find directInstanceOf(problem,interpretation,element,type); | ||
12107 | } | ||
12108 | private pattern scopeDisallowsNewVertex_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12109 | find interpretation(problem,interpretation); | ||
12110 | PartialInterpretation.scopes(interpretation,scope); | ||
12111 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12112 | Scope.maxNewElements(scope,0); | ||
12113 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12114 | Type.name(type,"Vertex class"); | ||
12115 | } | ||
12116 | |||
12117 | /** | ||
12118 | * An element may be an instance of type "Vertex class". | ||
12119 | */ | ||
12120 | private pattern mayInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12121 | { | ||
12122 | find interpretation(problem,interpretation); | ||
12123 | PartialInterpretation.newElements(interpretation,element); | ||
12124 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12125 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
12126 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
12127 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
12128 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12129 | neg find scopeDisallowsNewVertex_class(problem, interpretation); | ||
12130 | neg find isPrimitive(element); | ||
12131 | } or { | ||
12132 | find interpretation(problem,interpretation); | ||
12133 | PartialInterpretation.openWorldElements(interpretation,element); | ||
12134 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12135 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
12136 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
12137 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
12138 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12139 | neg find scopeDisallowsNewVertex_class(problem, interpretation); | ||
12140 | neg find isPrimitive(element); | ||
12141 | } or | ||
12142 | { find mustInstanceOfVertex_class(problem,interpretation,element); } | ||
12143 | /** | ||
12144 | * An element must be an instance of type "Region class". | ||
12145 | */ | ||
12146 | private pattern mustInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12147 | Type.name(type,"Region class"); | ||
12148 | find directInstanceOf(problem,interpretation,element,type); | ||
12149 | } | ||
12150 | private pattern scopeDisallowsNewRegion_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12151 | find interpretation(problem,interpretation); | ||
12152 | PartialInterpretation.scopes(interpretation,scope); | ||
12153 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12154 | Scope.maxNewElements(scope,0); | ||
12155 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12156 | Type.name(type,"Region class"); | ||
12157 | } | ||
12158 | |||
12159 | /** | ||
12160 | * An element may be an instance of type "Region class". | ||
12161 | */ | ||
12162 | private pattern mayInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12163 | { | ||
12164 | find interpretation(problem,interpretation); | ||
12165 | PartialInterpretation.newElements(interpretation,element); | ||
12166 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12167 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
12168 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
12169 | neg find scopeDisallowsNewRegion_class(problem, interpretation); | ||
12170 | neg find isPrimitive(element); | ||
12171 | } or { | ||
12172 | find interpretation(problem,interpretation); | ||
12173 | PartialInterpretation.openWorldElements(interpretation,element); | ||
12174 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12175 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
12176 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
12177 | neg find scopeDisallowsNewRegion_class(problem, interpretation); | ||
12178 | neg find isPrimitive(element); | ||
12179 | } or | ||
12180 | { find mustInstanceOfRegion_class(problem,interpretation,element); } | ||
12181 | /** | ||
12182 | * An element must be an instance of type "Transition class". | ||
12183 | */ | ||
12184 | private pattern mustInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12185 | Type.name(type,"Transition class"); | ||
12186 | find directInstanceOf(problem,interpretation,element,type); | ||
12187 | } | ||
12188 | private pattern scopeDisallowsNewTransition_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12189 | find interpretation(problem,interpretation); | ||
12190 | PartialInterpretation.scopes(interpretation,scope); | ||
12191 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12192 | Scope.maxNewElements(scope,0); | ||
12193 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12194 | Type.name(type,"Transition class"); | ||
12195 | } | ||
12196 | |||
12197 | /** | ||
12198 | * An element may be an instance of type "Transition class". | ||
12199 | */ | ||
12200 | private pattern mayInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12201 | { | ||
12202 | find interpretation(problem,interpretation); | ||
12203 | PartialInterpretation.newElements(interpretation,element); | ||
12204 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
12205 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
12206 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12207 | neg find scopeDisallowsNewTransition_class(problem, interpretation); | ||
12208 | neg find isPrimitive(element); | ||
12209 | } or { | ||
12210 | find interpretation(problem,interpretation); | ||
12211 | PartialInterpretation.openWorldElements(interpretation,element); | ||
12212 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
12213 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
12214 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12215 | neg find scopeDisallowsNewTransition_class(problem, interpretation); | ||
12216 | neg find isPrimitive(element); | ||
12217 | } or | ||
12218 | { find mustInstanceOfTransition_class(problem,interpretation,element); } | ||
12219 | /** | ||
12220 | * An element must be an instance of type "Statechart class". | ||
12221 | */ | ||
12222 | private pattern mustInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12223 | Type.name(type,"Statechart class"); | ||
12224 | find directInstanceOf(problem,interpretation,element,type); | ||
12225 | } | ||
12226 | private pattern scopeDisallowsNewStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12227 | find interpretation(problem,interpretation); | ||
12228 | PartialInterpretation.scopes(interpretation,scope); | ||
12229 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12230 | Scope.maxNewElements(scope,0); | ||
12231 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12232 | Type.name(type,"Statechart class"); | ||
12233 | } | ||
12234 | |||
12235 | /** | ||
12236 | * An element may be an instance of type "Statechart class". | ||
12237 | */ | ||
12238 | private pattern mayInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12239 | { | ||
12240 | find interpretation(problem,interpretation); | ||
12241 | PartialInterpretation.newElements(interpretation,element); | ||
12242 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12243 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
12244 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
12245 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12246 | neg find scopeDisallowsNewStatechart_class(problem, interpretation); | ||
12247 | neg find isPrimitive(element); | ||
12248 | } or { | ||
12249 | find interpretation(problem,interpretation); | ||
12250 | PartialInterpretation.openWorldElements(interpretation,element); | ||
12251 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12252 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
12253 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
12254 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12255 | neg find scopeDisallowsNewStatechart_class(problem, interpretation); | ||
12256 | neg find isPrimitive(element); | ||
12257 | } or | ||
12258 | { find mustInstanceOfStatechart_class(problem,interpretation,element); } | ||
12259 | /** | ||
12260 | * An element must be an instance of type "Entry class". | ||
12261 | */ | ||
12262 | private pattern mustInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12263 | Type.name(type,"Entry class"); | ||
12264 | find directInstanceOf(problem,interpretation,element,type); | ||
12265 | } | ||
12266 | private pattern scopeDisallowsNewEntry_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12267 | find interpretation(problem,interpretation); | ||
12268 | PartialInterpretation.scopes(interpretation,scope); | ||
12269 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12270 | Scope.maxNewElements(scope,0); | ||
12271 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12272 | Type.name(type,"Entry class"); | ||
12273 | } | ||
12274 | |||
12275 | /** | ||
12276 | * An element may be an instance of type "Entry class". | ||
12277 | */ | ||
12278 | private pattern mayInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12279 | { | ||
12280 | find interpretation(problem,interpretation); | ||
12281 | PartialInterpretation.newElements(interpretation,element); | ||
12282 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12283 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
12284 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
12285 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
12286 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
12287 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
12288 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12289 | neg find scopeDisallowsNewEntry_class(problem, interpretation); | ||
12290 | neg find isPrimitive(element); | ||
12291 | } or { | ||
12292 | find interpretation(problem,interpretation); | ||
12293 | PartialInterpretation.openWorldElements(interpretation,element); | ||
12294 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12295 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
12296 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
12297 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
12298 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
12299 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
12300 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12301 | neg find scopeDisallowsNewEntry_class(problem, interpretation); | ||
12302 | neg find isPrimitive(element); | ||
12303 | } or | ||
12304 | { find mustInstanceOfEntry_class(problem,interpretation,element); } | ||
12305 | /** | ||
12306 | * An element must be an instance of type "Synchronization class". | ||
12307 | */ | ||
12308 | private pattern mustInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12309 | Type.name(type,"Synchronization class"); | ||
12310 | find directInstanceOf(problem,interpretation,element,type); | ||
12311 | } | ||
12312 | private pattern scopeDisallowsNewSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12313 | find interpretation(problem,interpretation); | ||
12314 | PartialInterpretation.scopes(interpretation,scope); | ||
12315 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12316 | Scope.maxNewElements(scope,0); | ||
12317 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12318 | Type.name(type,"Synchronization class"); | ||
12319 | } | ||
12320 | |||
12321 | /** | ||
12322 | * An element may be an instance of type "Synchronization class". | ||
12323 | */ | ||
12324 | private pattern mayInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12325 | { | ||
12326 | find interpretation(problem,interpretation); | ||
12327 | PartialInterpretation.newElements(interpretation,element); | ||
12328 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12329 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
12330 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
12331 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
12332 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
12333 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
12334 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12335 | neg find scopeDisallowsNewSynchronization_class(problem, interpretation); | ||
12336 | neg find isPrimitive(element); | ||
12337 | } or { | ||
12338 | find interpretation(problem,interpretation); | ||
12339 | PartialInterpretation.openWorldElements(interpretation,element); | ||
12340 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12341 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
12342 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
12343 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
12344 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
12345 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
12346 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12347 | neg find scopeDisallowsNewSynchronization_class(problem, interpretation); | ||
12348 | neg find isPrimitive(element); | ||
12349 | } or | ||
12350 | { find mustInstanceOfSynchronization_class(problem,interpretation,element); } | ||
12351 | /** | ||
12352 | * An element must be an instance of type "State class". | ||
12353 | */ | ||
12354 | private pattern mustInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12355 | Type.name(type,"State class"); | ||
12356 | find directInstanceOf(problem,interpretation,element,type); | ||
12357 | } | ||
12358 | private pattern scopeDisallowsNewState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12359 | find interpretation(problem,interpretation); | ||
12360 | PartialInterpretation.scopes(interpretation,scope); | ||
12361 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12362 | Scope.maxNewElements(scope,0); | ||
12363 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12364 | Type.name(type,"State class"); | ||
12365 | } | ||
12366 | |||
12367 | /** | ||
12368 | * An element may be an instance of type "State class". | ||
12369 | */ | ||
12370 | private pattern mayInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12371 | { | ||
12372 | find interpretation(problem,interpretation); | ||
12373 | PartialInterpretation.newElements(interpretation,element); | ||
12374 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12375 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
12376 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
12377 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
12378 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12379 | neg find scopeDisallowsNewState_class(problem, interpretation); | ||
12380 | neg find isPrimitive(element); | ||
12381 | } or { | ||
12382 | find interpretation(problem,interpretation); | ||
12383 | PartialInterpretation.openWorldElements(interpretation,element); | ||
12384 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12385 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
12386 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
12387 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
12388 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12389 | neg find scopeDisallowsNewState_class(problem, interpretation); | ||
12390 | neg find isPrimitive(element); | ||
12391 | } or | ||
12392 | { find mustInstanceOfState_class(problem,interpretation,element); } | ||
12393 | /** | ||
12394 | * An element must be an instance of type "RegularState class". | ||
12395 | */ | ||
12396 | private pattern mustInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12397 | Type.name(type,"RegularState class"); | ||
12398 | find directInstanceOf(problem,interpretation,element,type); | ||
12399 | } | ||
12400 | private pattern scopeDisallowsNewRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12401 | find interpretation(problem,interpretation); | ||
12402 | PartialInterpretation.scopes(interpretation,scope); | ||
12403 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12404 | Scope.maxNewElements(scope,0); | ||
12405 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12406 | Type.name(type,"RegularState class"); | ||
12407 | } | ||
12408 | |||
12409 | /** | ||
12410 | * An element may be an instance of type "RegularState class". | ||
12411 | */ | ||
12412 | private pattern mayInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12413 | { | ||
12414 | find interpretation(problem,interpretation); | ||
12415 | PartialInterpretation.newElements(interpretation,element); | ||
12416 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12417 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
12418 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
12419 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
12420 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12421 | neg find scopeDisallowsNewRegularState_class(problem, interpretation); | ||
12422 | neg find isPrimitive(element); | ||
12423 | } or { | ||
12424 | find interpretation(problem,interpretation); | ||
12425 | PartialInterpretation.openWorldElements(interpretation,element); | ||
12426 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12427 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
12428 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
12429 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
12430 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12431 | neg find scopeDisallowsNewRegularState_class(problem, interpretation); | ||
12432 | neg find isPrimitive(element); | ||
12433 | } or | ||
12434 | { find mustInstanceOfRegularState_class(problem,interpretation,element); } | ||
12435 | /** | ||
12436 | * An element must be an instance of type "CompositeElement class". | ||
12437 | */ | ||
12438 | private pattern mustInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12439 | Type.name(type,"CompositeElement class"); | ||
12440 | find directInstanceOf(problem,interpretation,element,type); | ||
12441 | } | ||
12442 | private pattern scopeDisallowsNewCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12443 | find interpretation(problem,interpretation); | ||
12444 | PartialInterpretation.scopes(interpretation,scope); | ||
12445 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12446 | Scope.maxNewElements(scope,0); | ||
12447 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12448 | Type.name(type,"CompositeElement class"); | ||
12449 | } | ||
12450 | |||
12451 | /** | ||
12452 | * An element may be an instance of type "CompositeElement class". | ||
12453 | */ | ||
12454 | private pattern mayInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12455 | { | ||
12456 | find interpretation(problem,interpretation); | ||
12457 | PartialInterpretation.newElements(interpretation,element); | ||
12458 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12459 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
12460 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
12461 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12462 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
12463 | neg find scopeDisallowsNewCompositeElement_class(problem, interpretation); | ||
12464 | neg find isPrimitive(element); | ||
12465 | } or { | ||
12466 | find interpretation(problem,interpretation); | ||
12467 | PartialInterpretation.openWorldElements(interpretation,element); | ||
12468 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12469 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
12470 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
12471 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12472 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
12473 | neg find scopeDisallowsNewCompositeElement_class(problem, interpretation); | ||
12474 | neg find isPrimitive(element); | ||
12475 | } or | ||
12476 | { find mustInstanceOfCompositeElement_class(problem,interpretation,element); } | ||
12477 | /** | ||
12478 | * An element must be an instance of type "Choice class". | ||
12479 | */ | ||
12480 | private pattern mustInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12481 | Type.name(type,"Choice class"); | ||
12482 | find directInstanceOf(problem,interpretation,element,type); | ||
12483 | } | ||
12484 | private pattern scopeDisallowsNewChoice_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12485 | find interpretation(problem,interpretation); | ||
12486 | PartialInterpretation.scopes(interpretation,scope); | ||
12487 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12488 | Scope.maxNewElements(scope,0); | ||
12489 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12490 | Type.name(type,"Choice class"); | ||
12491 | } | ||
12492 | |||
12493 | /** | ||
12494 | * An element may be an instance of type "Choice class". | ||
12495 | */ | ||
12496 | private pattern mayInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12497 | { | ||
12498 | find interpretation(problem,interpretation); | ||
12499 | PartialInterpretation.newElements(interpretation,element); | ||
12500 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12501 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
12502 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
12503 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
12504 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
12505 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12506 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
12507 | neg find scopeDisallowsNewChoice_class(problem, interpretation); | ||
12508 | neg find isPrimitive(element); | ||
12509 | } or { | ||
12510 | find interpretation(problem,interpretation); | ||
12511 | PartialInterpretation.openWorldElements(interpretation,element); | ||
12512 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12513 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
12514 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
12515 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
12516 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
12517 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12518 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
12519 | neg find scopeDisallowsNewChoice_class(problem, interpretation); | ||
12520 | neg find isPrimitive(element); | ||
12521 | } or | ||
12522 | { find mustInstanceOfChoice_class(problem,interpretation,element); } | ||
12523 | /** | ||
12524 | * An element must be an instance of type "Exit class". | ||
12525 | */ | ||
12526 | private pattern mustInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12527 | Type.name(type,"Exit class"); | ||
12528 | find directInstanceOf(problem,interpretation,element,type); | ||
12529 | } | ||
12530 | private pattern scopeDisallowsNewExit_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12531 | find interpretation(problem,interpretation); | ||
12532 | PartialInterpretation.scopes(interpretation,scope); | ||
12533 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12534 | Scope.maxNewElements(scope,0); | ||
12535 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12536 | Type.name(type,"Exit class"); | ||
12537 | } | ||
12538 | |||
12539 | /** | ||
12540 | * An element may be an instance of type "Exit class". | ||
12541 | */ | ||
12542 | private pattern mayInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12543 | { | ||
12544 | find interpretation(problem,interpretation); | ||
12545 | PartialInterpretation.newElements(interpretation,element); | ||
12546 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12547 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
12548 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
12549 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
12550 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
12551 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12552 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
12553 | neg find scopeDisallowsNewExit_class(problem, interpretation); | ||
12554 | neg find isPrimitive(element); | ||
12555 | } or { | ||
12556 | find interpretation(problem,interpretation); | ||
12557 | PartialInterpretation.openWorldElements(interpretation,element); | ||
12558 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12559 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
12560 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
12561 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
12562 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
12563 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12564 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
12565 | neg find scopeDisallowsNewExit_class(problem, interpretation); | ||
12566 | neg find isPrimitive(element); | ||
12567 | } or | ||
12568 | { find mustInstanceOfExit_class(problem,interpretation,element); } | ||
12569 | /** | ||
12570 | * An element must be an instance of type "FinalState class". | ||
12571 | */ | ||
12572 | private pattern mustInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12573 | Type.name(type,"FinalState class"); | ||
12574 | find directInstanceOf(problem,interpretation,element,type); | ||
12575 | } | ||
12576 | private pattern scopeDisallowsNewFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12577 | find interpretation(problem,interpretation); | ||
12578 | PartialInterpretation.scopes(interpretation,scope); | ||
12579 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12580 | Scope.maxNewElements(scope,0); | ||
12581 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12582 | Type.name(type,"FinalState class"); | ||
12583 | } | ||
12584 | |||
12585 | /** | ||
12586 | * An element may be an instance of type "FinalState class". | ||
12587 | */ | ||
12588 | private pattern mayInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12589 | { | ||
12590 | find interpretation(problem,interpretation); | ||
12591 | PartialInterpretation.newElements(interpretation,element); | ||
12592 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12593 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
12594 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
12595 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12596 | neg find scopeDisallowsNewFinalState_class(problem, interpretation); | ||
12597 | neg find isPrimitive(element); | ||
12598 | } or { | ||
12599 | find interpretation(problem,interpretation); | ||
12600 | PartialInterpretation.openWorldElements(interpretation,element); | ||
12601 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12602 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
12603 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
12604 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12605 | neg find scopeDisallowsNewFinalState_class(problem, interpretation); | ||
12606 | neg find isPrimitive(element); | ||
12607 | } or | ||
12608 | { find mustInstanceOfFinalState_class(problem,interpretation,element); } | ||
12609 | /** | ||
12610 | * An element must be an instance of type "Statechart class DefinedPart". | ||
12611 | */ | ||
12612 | private pattern mustInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12613 | Type.name(type,"Statechart class DefinedPart"); | ||
12614 | find directInstanceOf(problem,interpretation,element,type); | ||
12615 | } | ||
12616 | private pattern scopeDisallowsNewStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12617 | find interpretation(problem,interpretation); | ||
12618 | PartialInterpretation.scopes(interpretation,scope); | ||
12619 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12620 | Scope.maxNewElements(scope,0); | ||
12621 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12622 | Type.name(type,"Statechart class DefinedPart"); | ||
12623 | } | ||
12624 | |||
12625 | /** | ||
12626 | * An element may be an instance of type "Statechart class DefinedPart". | ||
12627 | */ | ||
12628 | private pattern mayInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12629 | { find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,element); } | ||
12630 | /** | ||
12631 | * An element must be an instance of type "Statechart class UndefinedPart". | ||
12632 | */ | ||
12633 | private pattern mustInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12634 | Type.name(type,"Statechart class UndefinedPart"); | ||
12635 | find directInstanceOf(problem,interpretation,element,type); | ||
12636 | } | ||
12637 | private pattern scopeDisallowsNewStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12638 | find interpretation(problem,interpretation); | ||
12639 | PartialInterpretation.scopes(interpretation,scope); | ||
12640 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12641 | Scope.maxNewElements(scope,0); | ||
12642 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12643 | Type.name(type,"Statechart class UndefinedPart"); | ||
12644 | } | ||
12645 | |||
12646 | /** | ||
12647 | * An element may be an instance of type "Statechart class UndefinedPart". | ||
12648 | */ | ||
12649 | private pattern mayInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12650 | { | ||
12651 | find interpretation(problem,interpretation); | ||
12652 | PartialInterpretation.newElements(interpretation,element); | ||
12653 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12654 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
12655 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12656 | neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation); | ||
12657 | neg find isPrimitive(element); | ||
12658 | } or { | ||
12659 | find interpretation(problem,interpretation); | ||
12660 | PartialInterpretation.openWorldElements(interpretation,element); | ||
12661 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12662 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
12663 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12664 | neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation); | ||
12665 | neg find isPrimitive(element); | ||
12666 | } or | ||
12667 | { find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); } | ||
12668 | /** | ||
12669 | * An element must be an instance of type "CompositeElement class DefinedPart". | ||
12670 | */ | ||
12671 | private pattern mustInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12672 | Type.name(type,"CompositeElement class DefinedPart"); | ||
12673 | find directInstanceOf(problem,interpretation,element,type); | ||
12674 | } | ||
12675 | private pattern scopeDisallowsNewCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12676 | find interpretation(problem,interpretation); | ||
12677 | PartialInterpretation.scopes(interpretation,scope); | ||
12678 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12679 | Scope.maxNewElements(scope,0); | ||
12680 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12681 | Type.name(type,"CompositeElement class DefinedPart"); | ||
12682 | } | ||
12683 | |||
12684 | /** | ||
12685 | * An element may be an instance of type "CompositeElement class DefinedPart". | ||
12686 | */ | ||
12687 | private pattern mayInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12688 | { find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,element); } | ||
12689 | /** | ||
12690 | * An element must be an instance of type "CompositeElement class UndefinedPart". | ||
12691 | */ | ||
12692 | private pattern mustInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
12693 | Type.name(type,"CompositeElement class UndefinedPart"); | ||
12694 | find directInstanceOf(problem,interpretation,element,type); | ||
12695 | } | ||
12696 | private pattern scopeDisallowsNewCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
12697 | find interpretation(problem,interpretation); | ||
12698 | PartialInterpretation.scopes(interpretation,scope); | ||
12699 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
12700 | Scope.maxNewElements(scope,0); | ||
12701 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
12702 | Type.name(type,"CompositeElement class UndefinedPart"); | ||
12703 | } | ||
12704 | |||
12705 | /** | ||
12706 | * An element may be an instance of type "CompositeElement class UndefinedPart". | ||
12707 | */ | ||
12708 | private pattern mayInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
12709 | { | ||
12710 | find interpretation(problem,interpretation); | ||
12711 | PartialInterpretation.newElements(interpretation,element); | ||
12712 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12713 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
12714 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12715 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
12716 | neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation); | ||
12717 | neg find isPrimitive(element); | ||
12718 | } or { | ||
12719 | find interpretation(problem,interpretation); | ||
12720 | PartialInterpretation.openWorldElements(interpretation,element); | ||
12721 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
12722 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
12723 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
12724 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
12725 | neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation); | ||
12726 | neg find isPrimitive(element); | ||
12727 | } or | ||
12728 | { find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); } | ||
12729 | |||
12730 | ////////// | ||
12731 | // 1.2 Relation Declaration Indexers | ||
12732 | ////////// | ||
12733 | /** | ||
12734 | * Matcher for detecting tuples t where []incomingTransitions reference Vertex(source,target) | ||
12735 | */ | ||
12736 | private pattern mustInRelationincomingTransitions_reference_Vertex( | ||
12737 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12738 | source: DefinedElement, target:DefinedElement) | ||
12739 | { | ||
12740 | find interpretation(problem,interpretation); | ||
12741 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
12742 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex"); | ||
12743 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
12744 | BinaryElementRelationLink.param1(link,source); | ||
12745 | BinaryElementRelationLink.param2(link,target); | ||
12746 | } | ||
12747 | /** | ||
12748 | * Matcher for detecting tuples t where <>incomingTransitions reference Vertex(source,target) | ||
12749 | */ | ||
12750 | private pattern mayInRelationincomingTransitions_reference_Vertex( | ||
12751 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12752 | source: DefinedElement, target:DefinedElement) | ||
12753 | { | ||
12754 | find interpretation(problem,interpretation); | ||
12755 | // The two endpoint of the link have to exist | ||
12756 | find mayExist(problem, interpretation, source); | ||
12757 | find mayExist(problem, interpretation, target); | ||
12758 | // Type consistency | ||
12759 | find mayInstanceOfVertex_class(problem,interpretation,source); | ||
12760 | find mayInstanceOfTransition_class(problem,interpretation,target); | ||
12761 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
12762 | // the upper bound of the opposite reference multiplicity should be considered. | ||
12763 | numberOfExistingOppositeReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,target,_); | ||
12764 | check(numberOfExistingOppositeReferences < 1); | ||
12765 | } or { | ||
12766 | find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,source,target); | ||
12767 | } | ||
12768 | /** | ||
12769 | * Matcher for detecting tuples t where []outgoingTransitions reference Vertex(source,target) | ||
12770 | */ | ||
12771 | private pattern mustInRelationoutgoingTransitions_reference_Vertex( | ||
12772 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12773 | source: DefinedElement, target:DefinedElement) | ||
12774 | { | ||
12775 | find interpretation(problem,interpretation); | ||
12776 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
12777 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingTransitions reference Vertex"); | ||
12778 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
12779 | BinaryElementRelationLink.param1(link,source); | ||
12780 | BinaryElementRelationLink.param2(link,target); | ||
12781 | } | ||
12782 | /** | ||
12783 | * Matcher for detecting tuples t where <>outgoingTransitions reference Vertex(source,target) | ||
12784 | */ | ||
12785 | private pattern mayInRelationoutgoingTransitions_reference_Vertex( | ||
12786 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12787 | source: DefinedElement, target:DefinedElement) | ||
12788 | { | ||
12789 | find interpretation(problem,interpretation); | ||
12790 | // The two endpoint of the link have to exist | ||
12791 | find mayExist(problem, interpretation, source); | ||
12792 | find mayExist(problem, interpretation, target); | ||
12793 | // Type consistency | ||
12794 | find mayInstanceOfVertex_class(problem,interpretation,source); | ||
12795 | find mayInstanceOfTransition_class(problem,interpretation,target); | ||
12796 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
12797 | // the upper bound of the opposite reference multiplicity should be considered. | ||
12798 | numberOfExistingOppositeReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,target,_); | ||
12799 | check(numberOfExistingOppositeReferences < 1); | ||
12800 | // The reference is containment, then a new reference cannot be create if: | ||
12801 | // 1. Multiple parents | ||
12802 | neg find mustContains4(problem,interpretation,_,target); | ||
12803 | // 2. Circle in the containment hierarchy | ||
12804 | neg find mustTransitiveContains(source,target); | ||
12805 | } or { | ||
12806 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target); | ||
12807 | } | ||
12808 | /** | ||
12809 | * Matcher for detecting tuples t where []vertices reference Region(source,target) | ||
12810 | */ | ||
12811 | private pattern mustInRelationvertices_reference_Region( | ||
12812 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12813 | source: DefinedElement, target:DefinedElement) | ||
12814 | { | ||
12815 | find interpretation(problem,interpretation); | ||
12816 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
12817 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"vertices reference Region"); | ||
12818 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
12819 | BinaryElementRelationLink.param1(link,source); | ||
12820 | BinaryElementRelationLink.param2(link,target); | ||
12821 | } | ||
12822 | /** | ||
12823 | * Matcher for detecting tuples t where <>vertices reference Region(source,target) | ||
12824 | */ | ||
12825 | private pattern mayInRelationvertices_reference_Region( | ||
12826 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12827 | source: DefinedElement, target:DefinedElement) | ||
12828 | { | ||
12829 | find interpretation(problem,interpretation); | ||
12830 | // The two endpoint of the link have to exist | ||
12831 | find mayExist(problem, interpretation, source); | ||
12832 | find mayExist(problem, interpretation, target); | ||
12833 | // Type consistency | ||
12834 | find mayInstanceOfRegion_class(problem,interpretation,source); | ||
12835 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
12836 | // The reference is containment, then a new reference cannot be create if: | ||
12837 | // 1. Multiple parents | ||
12838 | neg find mustContains4(problem,interpretation,_,target); | ||
12839 | // 2. Circle in the containment hierarchy | ||
12840 | neg find mustTransitiveContains(source,target); | ||
12841 | } or { | ||
12842 | find mustInRelationvertices_reference_Region(problem,interpretation,source,target); | ||
12843 | } | ||
12844 | /** | ||
12845 | * Matcher for detecting tuples t where []target reference Transition(source,target) | ||
12846 | */ | ||
12847 | private pattern mustInRelationtarget_reference_Transition( | ||
12848 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12849 | source: DefinedElement, target:DefinedElement) | ||
12850 | { | ||
12851 | find interpretation(problem,interpretation); | ||
12852 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
12853 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition"); | ||
12854 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
12855 | BinaryElementRelationLink.param1(link,source); | ||
12856 | BinaryElementRelationLink.param2(link,target); | ||
12857 | } | ||
12858 | /** | ||
12859 | * Matcher for detecting tuples t where <>target reference Transition(source,target) | ||
12860 | */ | ||
12861 | private pattern mayInRelationtarget_reference_Transition( | ||
12862 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12863 | source: DefinedElement, target:DefinedElement) | ||
12864 | { | ||
12865 | find interpretation(problem,interpretation); | ||
12866 | // The two endpoint of the link have to exist | ||
12867 | find mayExist(problem, interpretation, source); | ||
12868 | find mayExist(problem, interpretation, target); | ||
12869 | // Type consistency | ||
12870 | find mayInstanceOfTransition_class(problem,interpretation,source); | ||
12871 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
12872 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
12873 | // the upper bound of the multiplicity should be considered. | ||
12874 | numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,source,_); | ||
12875 | check(numberOfExistingReferences < 1); | ||
12876 | } or { | ||
12877 | find mustInRelationtarget_reference_Transition(problem,interpretation,source,target); | ||
12878 | } | ||
12879 | /** | ||
12880 | * Matcher for detecting tuples t where []source reference Transition(source,target) | ||
12881 | */ | ||
12882 | private pattern mustInRelationsource_reference_Transition( | ||
12883 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12884 | source: DefinedElement, target:DefinedElement) | ||
12885 | { | ||
12886 | find interpretation(problem,interpretation); | ||
12887 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
12888 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"source reference Transition"); | ||
12889 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
12890 | BinaryElementRelationLink.param1(link,source); | ||
12891 | BinaryElementRelationLink.param2(link,target); | ||
12892 | } | ||
12893 | /** | ||
12894 | * Matcher for detecting tuples t where <>source reference Transition(source,target) | ||
12895 | */ | ||
12896 | private pattern mayInRelationsource_reference_Transition( | ||
12897 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12898 | source: DefinedElement, target:DefinedElement) | ||
12899 | { | ||
12900 | find interpretation(problem,interpretation); | ||
12901 | // The two endpoint of the link have to exist | ||
12902 | find mayExist(problem, interpretation, source); | ||
12903 | find mayExist(problem, interpretation, target); | ||
12904 | // Type consistency | ||
12905 | find mayInstanceOfTransition_class(problem,interpretation,source); | ||
12906 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
12907 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
12908 | // the upper bound of the multiplicity should be considered. | ||
12909 | numberOfExistingReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,source,_); | ||
12910 | check(numberOfExistingReferences < 1); | ||
12911 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
12912 | // 1. Multiple parents | ||
12913 | neg find mustContains4(problem,interpretation,source,_); | ||
12914 | // 2. Circle in the containment hierarchy | ||
12915 | neg find mustTransitiveContains(source,target); | ||
12916 | } or { | ||
12917 | find mustInRelationsource_reference_Transition(problem,interpretation,source,target); | ||
12918 | } | ||
12919 | /** | ||
12920 | * Matcher for detecting tuples t where []regions reference CompositeElement(source,target) | ||
12921 | */ | ||
12922 | private pattern mustInRelationregions_reference_CompositeElement( | ||
12923 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12924 | source: DefinedElement, target:DefinedElement) | ||
12925 | { | ||
12926 | find interpretation(problem,interpretation); | ||
12927 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
12928 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"regions reference CompositeElement"); | ||
12929 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
12930 | BinaryElementRelationLink.param1(link,source); | ||
12931 | BinaryElementRelationLink.param2(link,target); | ||
12932 | } | ||
12933 | /** | ||
12934 | * Matcher for detecting tuples t where <>regions reference CompositeElement(source,target) | ||
12935 | */ | ||
12936 | private pattern mayInRelationregions_reference_CompositeElement( | ||
12937 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12938 | source: DefinedElement, target:DefinedElement) | ||
12939 | { | ||
12940 | find interpretation(problem,interpretation); | ||
12941 | // The two endpoint of the link have to exist | ||
12942 | find mayExist(problem, interpretation, source); | ||
12943 | find mayExist(problem, interpretation, target); | ||
12944 | // Type consistency | ||
12945 | find mayInstanceOfCompositeElement_class(problem,interpretation,source); | ||
12946 | find mayInstanceOfRegion_class(problem,interpretation,target); | ||
12947 | // The reference is containment, then a new reference cannot be create if: | ||
12948 | // 1. Multiple parents | ||
12949 | neg find mustContains4(problem,interpretation,_,target); | ||
12950 | // 2. Circle in the containment hierarchy | ||
12951 | neg find mustTransitiveContains(source,target); | ||
12952 | } or { | ||
12953 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target); | ||
12954 | } | ||
12955 | |||
12956 | ////////// | ||
12957 | // 1.3 Relation Definition Indexers | ||
12958 | ////////// | ||
12959 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries entryInRegion | ||
12960 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
12961 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12962 | var_r1, var_e1) | ||
12963 | { | ||
12964 | find interpretation(problem,interpretation); | ||
12965 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
12966 | find mustInstanceOfEntry_class(problem,interpretation,var_e1); | ||
12967 | // r1 is exported | ||
12968 | // e1 is exported | ||
12969 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
12970 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
12971 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
12972 | var_virtual0 == var_e1; | ||
12973 | } | ||
12974 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
12975 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12976 | var_r1, var_e1) | ||
12977 | { | ||
12978 | find interpretation(problem,interpretation); | ||
12979 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
12980 | find mayInstanceOfEntry_class(problem,interpretation,var_e1); | ||
12981 | // r1 is exported | ||
12982 | // e1 is exported | ||
12983 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
12984 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
12985 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
12986 | find mayEquivalent(problem, interpretation, var_virtual0, var_e1); | ||
12987 | } | ||
12988 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
12989 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
12990 | var_r1, var_e1) | ||
12991 | { | ||
12992 | find interpretation(problem,interpretation); | ||
12993 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
12994 | find mustInstanceOfEntry_class(problem,interpretation,var_e1); | ||
12995 | // r1 is exported | ||
12996 | // e1 is exported | ||
12997 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
12998 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
12999 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
13000 | var_virtual0 == var_e1; | ||
13001 | } | ||
13002 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noEntryInRegion | ||
13003 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
13004 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13005 | var_r1) | ||
13006 | { | ||
13007 | find interpretation(problem,interpretation); | ||
13008 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
13009 | // r1 is exported | ||
13010 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
13011 | } | ||
13012 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
13013 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13014 | var_r1) | ||
13015 | { | ||
13016 | find interpretation(problem,interpretation); | ||
13017 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
13018 | // r1 is exported | ||
13019 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
13020 | } | ||
13021 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
13022 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13023 | var_r1) | ||
13024 | { | ||
13025 | find interpretation(problem,interpretation); | ||
13026 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
13027 | // r1 is exported | ||
13028 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
13029 | } | ||
13030 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleEntryInRegion | ||
13031 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
13032 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13033 | var_r) | ||
13034 | { | ||
13035 | find interpretation(problem,interpretation); | ||
13036 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
13037 | // r is exported | ||
13038 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
13039 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
13040 | neg find mayEquivalent(problem, interpretation, var_e1, var_e2); | ||
13041 | } | ||
13042 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
13043 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13044 | var_r) | ||
13045 | { | ||
13046 | find interpretation(problem,interpretation); | ||
13047 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
13048 | // r is exported | ||
13049 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
13050 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
13051 | var_e1 != var_e2; | ||
13052 | } | ||
13053 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
13054 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13055 | var_r) | ||
13056 | { | ||
13057 | find interpretation(problem,interpretation); | ||
13058 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
13059 | // r is exported | ||
13060 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
13061 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
13062 | var_e1 != var_e2; | ||
13063 | } | ||
13064 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries transition | ||
13065 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
13066 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13067 | var_t, var_src, var_trg) | ||
13068 | { | ||
13069 | find interpretation(problem,interpretation); | ||
13070 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
13071 | find mustInstanceOfVertex_class(problem,interpretation,var_src); | ||
13072 | find mustInstanceOfVertex_class(problem,interpretation,var_trg); | ||
13073 | // t is exported | ||
13074 | // src is exported | ||
13075 | // trg is exported | ||
13076 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
13077 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
13078 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
13079 | var_virtual0 == var_src; | ||
13080 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
13081 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
13082 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
13083 | var_virtual1 == var_trg; | ||
13084 | } | ||
13085 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
13086 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13087 | var_t, var_src, var_trg) | ||
13088 | { | ||
13089 | find interpretation(problem,interpretation); | ||
13090 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
13091 | find mayInstanceOfVertex_class(problem,interpretation,var_src); | ||
13092 | find mayInstanceOfVertex_class(problem,interpretation,var_trg); | ||
13093 | // t is exported | ||
13094 | // src is exported | ||
13095 | // trg is exported | ||
13096 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
13097 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
13098 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
13099 | find mayEquivalent(problem, interpretation, var_virtual0, var_src); | ||
13100 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
13101 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
13102 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
13103 | find mayEquivalent(problem, interpretation, var_virtual1, var_trg); | ||
13104 | } | ||
13105 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
13106 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13107 | var_t, var_src, var_trg) | ||
13108 | { | ||
13109 | find interpretation(problem,interpretation); | ||
13110 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
13111 | find mustInstanceOfVertex_class(problem,interpretation,var_src); | ||
13112 | find mustInstanceOfVertex_class(problem,interpretation,var_trg); | ||
13113 | // t is exported | ||
13114 | // src is exported | ||
13115 | // trg is exported | ||
13116 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
13117 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
13118 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
13119 | var_virtual0 == var_src; | ||
13120 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
13121 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
13122 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
13123 | var_virtual1 == var_trg; | ||
13124 | } | ||
13125 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries incomingToEntry | ||
13126 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
13127 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13128 | var_t, var_e) | ||
13129 | { | ||
13130 | find interpretation(problem,interpretation); | ||
13131 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
13132 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
13133 | // t is exported | ||
13134 | // e is exported | ||
13135 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
13136 | } | ||
13137 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
13138 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13139 | var_t, var_e) | ||
13140 | { | ||
13141 | find interpretation(problem,interpretation); | ||
13142 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
13143 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
13144 | // t is exported | ||
13145 | // e is exported | ||
13146 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
13147 | } | ||
13148 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
13149 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13150 | var_t, var_e) | ||
13151 | { | ||
13152 | find interpretation(problem,interpretation); | ||
13153 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
13154 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
13155 | // t is exported | ||
13156 | // e is exported | ||
13157 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
13158 | } | ||
13159 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noOutgoingTransitionFromEntry | ||
13160 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
13161 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13162 | var_e) | ||
13163 | { | ||
13164 | find interpretation(problem,interpretation); | ||
13165 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
13166 | // e is exported | ||
13167 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
13168 | } | ||
13169 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
13170 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13171 | var_e) | ||
13172 | { | ||
13173 | find interpretation(problem,interpretation); | ||
13174 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
13175 | // e is exported | ||
13176 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
13177 | } | ||
13178 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
13179 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13180 | var_e) | ||
13181 | { | ||
13182 | find interpretation(problem,interpretation); | ||
13183 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
13184 | // e is exported | ||
13185 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
13186 | } | ||
13187 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleTransitionFromEntry | ||
13188 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
13189 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13190 | var_e, var_t1, var_t2) | ||
13191 | { | ||
13192 | find interpretation(problem,interpretation); | ||
13193 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
13194 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
13195 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
13196 | // e is exported | ||
13197 | // t1 is exported | ||
13198 | // t2 is exported | ||
13199 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
13200 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
13201 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
13202 | var_virtual0 == var_t1; | ||
13203 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
13204 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
13205 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
13206 | var_virtual1 == var_t2; | ||
13207 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
13208 | } | ||
13209 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
13210 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13211 | var_e, var_t1, var_t2) | ||
13212 | { | ||
13213 | find interpretation(problem,interpretation); | ||
13214 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
13215 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
13216 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
13217 | // e is exported | ||
13218 | // t1 is exported | ||
13219 | // t2 is exported | ||
13220 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
13221 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
13222 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
13223 | find mayEquivalent(problem, interpretation, var_virtual0, var_t1); | ||
13224 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
13225 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
13226 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
13227 | find mayEquivalent(problem, interpretation, var_virtual1, var_t2); | ||
13228 | var_t1 != var_t2; | ||
13229 | } | ||
13230 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
13231 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13232 | var_e, var_t1, var_t2) | ||
13233 | { | ||
13234 | find interpretation(problem,interpretation); | ||
13235 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
13236 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
13237 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
13238 | // e is exported | ||
13239 | // t1 is exported | ||
13240 | // t2 is exported | ||
13241 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
13242 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
13243 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
13244 | var_virtual0 == var_t1; | ||
13245 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
13246 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
13247 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
13248 | var_virtual1 == var_t2; | ||
13249 | var_t1 != var_t2; | ||
13250 | } | ||
13251 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromExit | ||
13252 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
13253 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13254 | var_t, var_e) | ||
13255 | { | ||
13256 | find interpretation(problem,interpretation); | ||
13257 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
13258 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
13259 | // t is exported | ||
13260 | // e is exported | ||
13261 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
13262 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
13263 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
13264 | var_virtual0 == var_t; | ||
13265 | } | ||
13266 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
13267 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13268 | var_t, var_e) | ||
13269 | { | ||
13270 | find interpretation(problem,interpretation); | ||
13271 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
13272 | find mayInstanceOfExit_class(problem,interpretation,var_e); | ||
13273 | // t is exported | ||
13274 | // e is exported | ||
13275 | find mayInstanceOfExit_class(problem,interpretation,var_e); | ||
13276 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
13277 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
13278 | find mayEquivalent(problem, interpretation, var_virtual0, var_t); | ||
13279 | } | ||
13280 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
13281 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13282 | var_t, var_e) | ||
13283 | { | ||
13284 | find interpretation(problem,interpretation); | ||
13285 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
13286 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
13287 | // t is exported | ||
13288 | // e is exported | ||
13289 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
13290 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
13291 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
13292 | var_virtual0 == var_t; | ||
13293 | } | ||
13294 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromFinal | ||
13295 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
13296 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13297 | var_t, var_f) | ||
13298 | { | ||
13299 | find interpretation(problem,interpretation); | ||
13300 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
13301 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
13302 | // t is exported | ||
13303 | // f is exported | ||
13304 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
13305 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
13306 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
13307 | var_virtual0 == var_t; | ||
13308 | } | ||
13309 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
13310 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13311 | var_t, var_f) | ||
13312 | { | ||
13313 | find interpretation(problem,interpretation); | ||
13314 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
13315 | find mayInstanceOfFinalState_class(problem,interpretation,var_f); | ||
13316 | // t is exported | ||
13317 | // f is exported | ||
13318 | find mayInstanceOfFinalState_class(problem,interpretation,var_f); | ||
13319 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
13320 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
13321 | find mayEquivalent(problem, interpretation, var_virtual0, var_t); | ||
13322 | } | ||
13323 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
13324 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13325 | var_t, var_f) | ||
13326 | { | ||
13327 | find interpretation(problem,interpretation); | ||
13328 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
13329 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
13330 | // t is exported | ||
13331 | // f is exported | ||
13332 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
13333 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
13334 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
13335 | var_virtual0 == var_t; | ||
13336 | } | ||
13337 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noStateInRegion | ||
13338 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
13339 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13340 | var_region) | ||
13341 | { | ||
13342 | find interpretation(problem,interpretation); | ||
13343 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
13344 | // region is exported | ||
13345 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
13346 | } | ||
13347 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
13348 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13349 | var_region) | ||
13350 | { | ||
13351 | find interpretation(problem,interpretation); | ||
13352 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
13353 | // region is exported | ||
13354 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
13355 | } | ||
13356 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
13357 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13358 | var_region) | ||
13359 | { | ||
13360 | find interpretation(problem,interpretation); | ||
13361 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
13362 | // region is exported | ||
13363 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
13364 | } | ||
13365 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries StateInRegion | ||
13366 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
13367 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13368 | var_region, var_state) | ||
13369 | { | ||
13370 | find interpretation(problem,interpretation); | ||
13371 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
13372 | find mustInstanceOfState_class(problem,interpretation,var_state); | ||
13373 | // region is exported | ||
13374 | // state is exported | ||
13375 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
13376 | find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
13377 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
13378 | var_virtual0 == var_state; | ||
13379 | } | ||
13380 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
13381 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13382 | var_region, var_state) | ||
13383 | { | ||
13384 | find interpretation(problem,interpretation); | ||
13385 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
13386 | find mayInstanceOfState_class(problem,interpretation,var_state); | ||
13387 | // region is exported | ||
13388 | // state is exported | ||
13389 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
13390 | find mayInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
13391 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
13392 | find mayEquivalent(problem, interpretation, var_virtual0, var_state); | ||
13393 | } | ||
13394 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
13395 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13396 | var_region, var_state) | ||
13397 | { | ||
13398 | find interpretation(problem,interpretation); | ||
13399 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
13400 | find mustInstanceOfState_class(problem,interpretation,var_state); | ||
13401 | // region is exported | ||
13402 | // state is exported | ||
13403 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
13404 | find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
13405 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
13406 | var_virtual0 == var_state; | ||
13407 | } | ||
13408 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoOutgoing | ||
13409 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
13410 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13411 | var_c) | ||
13412 | { | ||
13413 | find interpretation(problem,interpretation); | ||
13414 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
13415 | // c is exported | ||
13416 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
13417 | } | ||
13418 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
13419 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13420 | var_c) | ||
13421 | { | ||
13422 | find interpretation(problem,interpretation); | ||
13423 | find mayInstanceOfChoice_class(problem,interpretation,var_c); | ||
13424 | // c is exported | ||
13425 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
13426 | } | ||
13427 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
13428 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13429 | var_c) | ||
13430 | { | ||
13431 | find interpretation(problem,interpretation); | ||
13432 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
13433 | // c is exported | ||
13434 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
13435 | } | ||
13436 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoIncoming | ||
13437 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
13438 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13439 | var_c) | ||
13440 | { | ||
13441 | find interpretation(problem,interpretation); | ||
13442 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
13443 | // c is exported | ||
13444 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
13445 | } | ||
13446 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
13447 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13448 | var_c) | ||
13449 | { | ||
13450 | find interpretation(problem,interpretation); | ||
13451 | find mayInstanceOfChoice_class(problem,interpretation,var_c); | ||
13452 | // c is exported | ||
13453 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
13454 | } | ||
13455 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
13456 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13457 | var_c) | ||
13458 | { | ||
13459 | find interpretation(problem,interpretation); | ||
13460 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
13461 | // c is exported | ||
13462 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
13463 | } | ||
13464 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoOutgoing | ||
13465 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
13466 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13467 | var_s) | ||
13468 | { | ||
13469 | find interpretation(problem,interpretation); | ||
13470 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13471 | // s is exported | ||
13472 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
13473 | } | ||
13474 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
13475 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13476 | var_s) | ||
13477 | { | ||
13478 | find interpretation(problem,interpretation); | ||
13479 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13480 | // s is exported | ||
13481 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
13482 | } | ||
13483 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
13484 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13485 | var_s) | ||
13486 | { | ||
13487 | find interpretation(problem,interpretation); | ||
13488 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13489 | // s is exported | ||
13490 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
13491 | } | ||
13492 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoIncoming | ||
13493 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
13494 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13495 | var_s) | ||
13496 | { | ||
13497 | find interpretation(problem,interpretation); | ||
13498 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13499 | // s is exported | ||
13500 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
13501 | } | ||
13502 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
13503 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13504 | var_s) | ||
13505 | { | ||
13506 | find interpretation(problem,interpretation); | ||
13507 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13508 | // s is exported | ||
13509 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
13510 | } | ||
13511 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
13512 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13513 | var_s) | ||
13514 | { | ||
13515 | find interpretation(problem,interpretation); | ||
13516 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13517 | // s is exported | ||
13518 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
13519 | } | ||
13520 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedIncomingInSameRegion | ||
13521 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
13522 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13523 | var_s, var_v1, var_v2) | ||
13524 | { | ||
13525 | find interpretation(problem,interpretation); | ||
13526 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13527 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
13528 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
13529 | // s is exported | ||
13530 | // v1 is exported | ||
13531 | // v2 is exported | ||
13532 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
13533 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
13534 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
13535 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
13536 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
13537 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
13538 | var_virtual0 == var_v1; | ||
13539 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
13540 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
13541 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
13542 | var_virtual1 == var_v2; | ||
13543 | }or{ | ||
13544 | find interpretation(problem,interpretation); | ||
13545 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13546 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
13547 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
13548 | // s is exported | ||
13549 | // v1 is exported | ||
13550 | // v2 is exported | ||
13551 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
13552 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
13553 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
13554 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
13555 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
13556 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
13557 | var_virtual0 == var_v1; | ||
13558 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
13559 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
13560 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
13561 | var_virtual1 == var_v2; | ||
13562 | } | ||
13563 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
13564 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13565 | var_s, var_v1, var_v2) | ||
13566 | { | ||
13567 | find interpretation(problem,interpretation); | ||
13568 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13569 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
13570 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
13571 | // s is exported | ||
13572 | // v1 is exported | ||
13573 | // v2 is exported | ||
13574 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
13575 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
13576 | var_t1 != var_t2; | ||
13577 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
13578 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
13579 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
13580 | find mayEquivalent(problem, interpretation, var_virtual0, var_v1); | ||
13581 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
13582 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
13583 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
13584 | find mayEquivalent(problem, interpretation, var_virtual1, var_v2); | ||
13585 | }or{ | ||
13586 | find interpretation(problem,interpretation); | ||
13587 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13588 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
13589 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
13590 | // s is exported | ||
13591 | // v1 is exported | ||
13592 | // v2 is exported | ||
13593 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
13594 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
13595 | var_t1 != var_t2; | ||
13596 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
13597 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
13598 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
13599 | find mayEquivalent(problem, interpretation, var_virtual0, var_v1); | ||
13600 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
13601 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
13602 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
13603 | find mayEquivalent(problem, interpretation, var_virtual1, var_v2); | ||
13604 | } | ||
13605 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
13606 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13607 | var_s, var_v1, var_v2) | ||
13608 | { | ||
13609 | find interpretation(problem,interpretation); | ||
13610 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13611 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
13612 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
13613 | // s is exported | ||
13614 | // v1 is exported | ||
13615 | // v2 is exported | ||
13616 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
13617 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
13618 | var_t1 != var_t2; | ||
13619 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
13620 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
13621 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
13622 | var_virtual0 == var_v1; | ||
13623 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
13624 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
13625 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
13626 | var_virtual1 == var_v2; | ||
13627 | }or{ | ||
13628 | find interpretation(problem,interpretation); | ||
13629 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13630 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
13631 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
13632 | // s is exported | ||
13633 | // v1 is exported | ||
13634 | // v2 is exported | ||
13635 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
13636 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
13637 | var_t1 != var_t2; | ||
13638 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
13639 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
13640 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
13641 | var_virtual0 == var_v1; | ||
13642 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
13643 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
13644 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
13645 | var_virtual1 == var_v2; | ||
13646 | } | ||
13647 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries notSynchronizingStates | ||
13648 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
13649 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13650 | var_s) | ||
13651 | { | ||
13652 | find interpretation(problem,interpretation); | ||
13653 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13654 | // s is exported | ||
13655 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
13656 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
13657 | } | ||
13658 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
13659 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13660 | var_s) | ||
13661 | { | ||
13662 | find interpretation(problem,interpretation); | ||
13663 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13664 | // s is exported | ||
13665 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
13666 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
13667 | } | ||
13668 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
13669 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13670 | var_s) | ||
13671 | { | ||
13672 | find interpretation(problem,interpretation); | ||
13673 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13674 | // s is exported | ||
13675 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
13676 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
13677 | } | ||
13678 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleOutgoingTrainsition | ||
13679 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
13680 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13681 | var_v) | ||
13682 | { | ||
13683 | find interpretation(problem,interpretation); | ||
13684 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
13685 | // v is exported | ||
13686 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
13687 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
13688 | neg find mayEquivalent(problem, interpretation, var_trg1, var_trg2); | ||
13689 | } | ||
13690 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
13691 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13692 | var_v) | ||
13693 | { | ||
13694 | find interpretation(problem,interpretation); | ||
13695 | find mayInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
13696 | // v is exported | ||
13697 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
13698 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
13699 | var_trg1 != var_trg2; | ||
13700 | } | ||
13701 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
13702 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13703 | var_v) | ||
13704 | { | ||
13705 | find interpretation(problem,interpretation); | ||
13706 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
13707 | // v is exported | ||
13708 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
13709 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
13710 | var_trg1 != var_trg2; | ||
13711 | } | ||
13712 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleIncomingTrainsition | ||
13713 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
13714 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13715 | var_v) | ||
13716 | { | ||
13717 | find interpretation(problem,interpretation); | ||
13718 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
13719 | // v is exported | ||
13720 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
13721 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
13722 | neg find mayEquivalent(problem, interpretation, var_src1, var_src2); | ||
13723 | } | ||
13724 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
13725 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13726 | var_v) | ||
13727 | { | ||
13728 | find interpretation(problem,interpretation); | ||
13729 | find mayInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
13730 | // v is exported | ||
13731 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
13732 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
13733 | var_src1 != var_src2; | ||
13734 | } | ||
13735 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
13736 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13737 | var_v) | ||
13738 | { | ||
13739 | find interpretation(problem,interpretation); | ||
13740 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
13741 | // v is exported | ||
13742 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
13743 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
13744 | var_src1 != var_src2; | ||
13745 | } | ||
13746 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionsAreNotSiblings | ||
13747 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
13748 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13749 | var_s, var_v1, var_v2) | ||
13750 | { | ||
13751 | find interpretation(problem,interpretation); | ||
13752 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13753 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
13754 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
13755 | // s is exported | ||
13756 | // v1 is exported | ||
13757 | // v2 is exported | ||
13758 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
13759 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
13760 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
13761 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
13762 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
13763 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
13764 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
13765 | var_virtual1 == var_v1; | ||
13766 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
13767 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
13768 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
13769 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
13770 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
13771 | var_virtual3 == var_v2; | ||
13772 | neg find mayEquivalent(problem, interpretation, var_r1, var_r2); | ||
13773 | }or{ | ||
13774 | find interpretation(problem,interpretation); | ||
13775 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13776 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
13777 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
13778 | // s is exported | ||
13779 | // v1 is exported | ||
13780 | // v2 is exported | ||
13781 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
13782 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
13783 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
13784 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
13785 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
13786 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
13787 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
13788 | var_virtual1 == var_v1; | ||
13789 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
13790 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
13791 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
13792 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
13793 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
13794 | var_virtual3 == var_v2; | ||
13795 | neg find mayEquivalent(problem, interpretation, var_r1, var_r2); | ||
13796 | } | ||
13797 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
13798 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13799 | var_s, var_v1, var_v2) | ||
13800 | { | ||
13801 | find interpretation(problem,interpretation); | ||
13802 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13803 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
13804 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
13805 | // s is exported | ||
13806 | // v1 is exported | ||
13807 | // v2 is exported | ||
13808 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
13809 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
13810 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
13811 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
13812 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
13813 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
13814 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
13815 | find mayEquivalent(problem, interpretation, var_virtual1, var_v1); | ||
13816 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
13817 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
13818 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
13819 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
13820 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
13821 | find mayEquivalent(problem, interpretation, var_virtual3, var_v2); | ||
13822 | var_r1 != var_r2; | ||
13823 | }or{ | ||
13824 | find interpretation(problem,interpretation); | ||
13825 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13826 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
13827 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
13828 | // s is exported | ||
13829 | // v1 is exported | ||
13830 | // v2 is exported | ||
13831 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
13832 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
13833 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
13834 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
13835 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
13836 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
13837 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
13838 | find mayEquivalent(problem, interpretation, var_virtual1, var_v1); | ||
13839 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
13840 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
13841 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
13842 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
13843 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
13844 | find mayEquivalent(problem, interpretation, var_virtual3, var_v2); | ||
13845 | var_r1 != var_r2; | ||
13846 | } | ||
13847 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
13848 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13849 | var_s, var_v1, var_v2) | ||
13850 | { | ||
13851 | find interpretation(problem,interpretation); | ||
13852 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13853 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
13854 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
13855 | // s is exported | ||
13856 | // v1 is exported | ||
13857 | // v2 is exported | ||
13858 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
13859 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
13860 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
13861 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
13862 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
13863 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
13864 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
13865 | var_virtual1 == var_v1; | ||
13866 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
13867 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
13868 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
13869 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
13870 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
13871 | var_virtual3 == var_v2; | ||
13872 | var_r1 != var_r2; | ||
13873 | }or{ | ||
13874 | find interpretation(problem,interpretation); | ||
13875 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13876 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
13877 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
13878 | // s is exported | ||
13879 | // v1 is exported | ||
13880 | // v2 is exported | ||
13881 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
13882 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
13883 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
13884 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
13885 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
13886 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
13887 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
13888 | var_virtual1 == var_v1; | ||
13889 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
13890 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
13891 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
13892 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
13893 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
13894 | var_virtual3 == var_v2; | ||
13895 | var_r1 != var_r2; | ||
13896 | } | ||
13897 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries child | ||
13898 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
13899 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13900 | var_parent, var_child) | ||
13901 | { | ||
13902 | find interpretation(problem,interpretation); | ||
13903 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
13904 | find mustInstanceOfVertex_class(problem,interpretation,var_child); | ||
13905 | // parent is exported | ||
13906 | // child is exported | ||
13907 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
13908 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
13909 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
13910 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
13911 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
13912 | var_virtual1 == var_child; | ||
13913 | } | ||
13914 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
13915 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13916 | var_parent, var_child) | ||
13917 | { | ||
13918 | find interpretation(problem,interpretation); | ||
13919 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
13920 | find mayInstanceOfVertex_class(problem,interpretation,var_child); | ||
13921 | // parent is exported | ||
13922 | // child is exported | ||
13923 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
13924 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
13925 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
13926 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
13927 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
13928 | find mayEquivalent(problem, interpretation, var_virtual1, var_child); | ||
13929 | } | ||
13930 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
13931 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13932 | var_parent, var_child) | ||
13933 | { | ||
13934 | find interpretation(problem,interpretation); | ||
13935 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
13936 | find mustInstanceOfVertex_class(problem,interpretation,var_child); | ||
13937 | // parent is exported | ||
13938 | // child is exported | ||
13939 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
13940 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
13941 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
13942 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
13943 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
13944 | var_virtual1 == var_child; | ||
13945 | } | ||
13946 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionDoesNotHaveMultipleRegions | ||
13947 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
13948 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13949 | var_s, var_v) | ||
13950 | { | ||
13951 | find interpretation(problem,interpretation); | ||
13952 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13953 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
13954 | // s is exported | ||
13955 | // v is exported | ||
13956 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
13957 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
13958 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
13959 | }or{ | ||
13960 | find interpretation(problem,interpretation); | ||
13961 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13962 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
13963 | // s is exported | ||
13964 | // v is exported | ||
13965 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
13966 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
13967 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
13968 | } | ||
13969 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
13970 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13971 | var_s, var_v) | ||
13972 | { | ||
13973 | find interpretation(problem,interpretation); | ||
13974 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13975 | find mayInstanceOfVertex_class(problem,interpretation,var_v); | ||
13976 | // s is exported | ||
13977 | // v is exported | ||
13978 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
13979 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
13980 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
13981 | }or{ | ||
13982 | find interpretation(problem,interpretation); | ||
13983 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13984 | find mayInstanceOfVertex_class(problem,interpretation,var_v); | ||
13985 | // s is exported | ||
13986 | // v is exported | ||
13987 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
13988 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
13989 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
13990 | } | ||
13991 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
13992 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
13993 | var_s, var_v) | ||
13994 | { | ||
13995 | find interpretation(problem,interpretation); | ||
13996 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
13997 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
13998 | // s is exported | ||
13999 | // v is exported | ||
14000 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
14001 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
14002 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
14003 | }or{ | ||
14004 | find interpretation(problem,interpretation); | ||
14005 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
14006 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
14007 | // s is exported | ||
14008 | // v is exported | ||
14009 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
14010 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
14011 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
14012 | } | ||
14013 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleRegions | ||
14014 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
14015 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14016 | var_composite) | ||
14017 | { | ||
14018 | find interpretation(problem,interpretation); | ||
14019 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
14020 | // composite is exported | ||
14021 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
14022 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
14023 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
14024 | var_virtual0 == var_region1; | ||
14025 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
14026 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
14027 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
14028 | var_virtual1 == var_region2; | ||
14029 | neg find mayEquivalent(problem, interpretation, var_region1, var_region2); | ||
14030 | } | ||
14031 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
14032 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14033 | var_composite) | ||
14034 | { | ||
14035 | find interpretation(problem,interpretation); | ||
14036 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
14037 | // composite is exported | ||
14038 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
14039 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
14040 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
14041 | find mayEquivalent(problem, interpretation, var_virtual0, var_region1); | ||
14042 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
14043 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
14044 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
14045 | find mayEquivalent(problem, interpretation, var_virtual1, var_region2); | ||
14046 | var_region1 != var_region2; | ||
14047 | } | ||
14048 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
14049 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14050 | var_composite) | ||
14051 | { | ||
14052 | find interpretation(problem,interpretation); | ||
14053 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
14054 | // composite is exported | ||
14055 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
14056 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
14057 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
14058 | var_virtual0 == var_region1; | ||
14059 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
14060 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
14061 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
14062 | var_virtual1 == var_region2; | ||
14063 | var_region1 != var_region2; | ||
14064 | } | ||
14065 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchThree | ||
14066 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
14067 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14068 | var_s) | ||
14069 | { | ||
14070 | find interpretation(problem,interpretation); | ||
14071 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
14072 | // s is exported | ||
14073 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
14074 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
14075 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
14076 | var_virtual0 == var_s; | ||
14077 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
14078 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
14079 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
14080 | var_virtual1 == var_s; | ||
14081 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
14082 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
14083 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
14084 | var_virtual2 == var_s; | ||
14085 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
14086 | neg find mayEquivalent(problem, interpretation, var_t2, var_t3); | ||
14087 | neg find mayEquivalent(problem, interpretation, var_t1, var_t3); | ||
14088 | }or{ | ||
14089 | find interpretation(problem,interpretation); | ||
14090 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
14091 | // s is exported | ||
14092 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
14093 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
14094 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
14095 | var_virtual0 == var_s; | ||
14096 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
14097 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
14098 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
14099 | var_virtual1 == var_s; | ||
14100 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
14101 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
14102 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
14103 | var_virtual2 == var_s; | ||
14104 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
14105 | neg find mayEquivalent(problem, interpretation, var_t2, var_t3); | ||
14106 | neg find mayEquivalent(problem, interpretation, var_t1, var_t3); | ||
14107 | } | ||
14108 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
14109 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14110 | var_s) | ||
14111 | { | ||
14112 | find interpretation(problem,interpretation); | ||
14113 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
14114 | // s is exported | ||
14115 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
14116 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
14117 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
14118 | find mayEquivalent(problem, interpretation, var_virtual0, var_s); | ||
14119 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
14120 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
14121 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
14122 | find mayEquivalent(problem, interpretation, var_virtual1, var_s); | ||
14123 | find mayInstanceOfTransition_class(problem,interpretation,var_t3); | ||
14124 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
14125 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
14126 | find mayEquivalent(problem, interpretation, var_virtual2, var_s); | ||
14127 | var_t1 != var_t2; | ||
14128 | var_t2 != var_t3; | ||
14129 | var_t1 != var_t3; | ||
14130 | }or{ | ||
14131 | find interpretation(problem,interpretation); | ||
14132 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
14133 | // s is exported | ||
14134 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
14135 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
14136 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
14137 | find mayEquivalent(problem, interpretation, var_virtual0, var_s); | ||
14138 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
14139 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
14140 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
14141 | find mayEquivalent(problem, interpretation, var_virtual1, var_s); | ||
14142 | find mayInstanceOfTransition_class(problem,interpretation,var_t3); | ||
14143 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
14144 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
14145 | find mayEquivalent(problem, interpretation, var_virtual2, var_s); | ||
14146 | var_t1 != var_t2; | ||
14147 | var_t2 != var_t3; | ||
14148 | var_t1 != var_t3; | ||
14149 | } | ||
14150 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
14151 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14152 | var_s) | ||
14153 | { | ||
14154 | find interpretation(problem,interpretation); | ||
14155 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
14156 | // s is exported | ||
14157 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
14158 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
14159 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
14160 | var_virtual0 == var_s; | ||
14161 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
14162 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
14163 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
14164 | var_virtual1 == var_s; | ||
14165 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
14166 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
14167 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
14168 | var_virtual2 == var_s; | ||
14169 | var_t1 != var_t2; | ||
14170 | var_t2 != var_t3; | ||
14171 | var_t1 != var_t3; | ||
14172 | }or{ | ||
14173 | find interpretation(problem,interpretation); | ||
14174 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
14175 | // s is exported | ||
14176 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
14177 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
14178 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
14179 | var_virtual0 == var_s; | ||
14180 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
14181 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
14182 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
14183 | var_virtual1 == var_s; | ||
14184 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
14185 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
14186 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
14187 | var_virtual2 == var_s; | ||
14188 | var_t1 != var_t2; | ||
14189 | var_t2 != var_t3; | ||
14190 | var_t1 != var_t3; | ||
14191 | } | ||
14192 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries twoSynch | ||
14193 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
14194 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14195 | var_s1, var_s2) | ||
14196 | { | ||
14197 | find interpretation(problem,interpretation); | ||
14198 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
14199 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
14200 | // s1 is exported | ||
14201 | // s2 is exported | ||
14202 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
14203 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
14204 | neg find mayEquivalent(problem, interpretation, var_s1, var_s2); | ||
14205 | } | ||
14206 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
14207 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14208 | var_s1, var_s2) | ||
14209 | { | ||
14210 | find interpretation(problem,interpretation); | ||
14211 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
14212 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
14213 | // s1 is exported | ||
14214 | // s2 is exported | ||
14215 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
14216 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
14217 | var_s1 != var_s2; | ||
14218 | } | ||
14219 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
14220 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14221 | var_s1, var_s2) | ||
14222 | { | ||
14223 | find interpretation(problem,interpretation); | ||
14224 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
14225 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
14226 | // s1 is exported | ||
14227 | // s2 is exported | ||
14228 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
14229 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
14230 | var_s1 != var_s2; | ||
14231 | } | ||
14232 | |||
14233 | ////////// | ||
14234 | // 1.4 Containment Indexer | ||
14235 | ////////// | ||
14236 | private pattern mustContains2(source: DefinedElement, target: DefinedElement) { | ||
14237 | find mustContains4(_,_,source,target); | ||
14238 | } | ||
14239 | |||
14240 | private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14241 | source: DefinedElement, target: DefinedElement) | ||
14242 | { find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target); }or | ||
14243 | |||
14244 | { find mustInRelationvertices_reference_Region(problem,interpretation,source,target); }or | ||
14245 | |||
14246 | { find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target); } | ||
14247 | |||
14248 | private pattern mustTransitiveContains(source,target) { | ||
14249 | find mustContains2+(source,target); | ||
14250 | } | ||
14251 | |||
14252 | ////////// | ||
14253 | // 2. Invalidation Indexers | ||
14254 | ////////// | ||
14255 | // 2.1 Invalidated by WF Queries | ||
14256 | ////////// | ||
14257 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14258 | var_r1) | ||
14259 | { | ||
14260 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1); | ||
14261 | } | ||
14262 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14263 | var_r) | ||
14264 | { | ||
14265 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r); | ||
14266 | } | ||
14267 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14268 | var_t, var_e) | ||
14269 | { | ||
14270 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e); | ||
14271 | } | ||
14272 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14273 | var_e) | ||
14274 | { | ||
14275 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e); | ||
14276 | } | ||
14277 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14278 | var_e, var_t1, var_t2) | ||
14279 | { | ||
14280 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2); | ||
14281 | } | ||
14282 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14283 | var_t, var_e) | ||
14284 | { | ||
14285 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e); | ||
14286 | } | ||
14287 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14288 | var_t, var_f) | ||
14289 | { | ||
14290 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f); | ||
14291 | } | ||
14292 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14293 | var_region) | ||
14294 | { | ||
14295 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region); | ||
14296 | } | ||
14297 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14298 | var_c) | ||
14299 | { | ||
14300 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c); | ||
14301 | } | ||
14302 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14303 | var_c) | ||
14304 | { | ||
14305 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c); | ||
14306 | } | ||
14307 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14308 | var_s) | ||
14309 | { | ||
14310 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s); | ||
14311 | } | ||
14312 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14313 | var_s) | ||
14314 | { | ||
14315 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s); | ||
14316 | } | ||
14317 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14318 | var_s, var_v1, var_v2) | ||
14319 | { | ||
14320 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2); | ||
14321 | } | ||
14322 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14323 | var_s) | ||
14324 | { | ||
14325 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s); | ||
14326 | } | ||
14327 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14328 | var_s, var_v1, var_v2) | ||
14329 | { | ||
14330 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2); | ||
14331 | } | ||
14332 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14333 | var_s, var_v) | ||
14334 | { | ||
14335 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v); | ||
14336 | } | ||
14337 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14338 | var_s) | ||
14339 | { | ||
14340 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s); | ||
14341 | } | ||
14342 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14343 | var_s1, var_s2) | ||
14344 | { | ||
14345 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2); | ||
14346 | } | ||
14347 | |||
14348 | ////////// | ||
14349 | // 3. Unfinishedness Indexers | ||
14350 | ////////// | ||
14351 | // 3.1 Unfinishedness Measured by Multiplicity | ||
14352 | ////////// | ||
14353 | pattern unfinishedLowerMultiplicity_target_reference_Transition(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
14354 | find interpretation(problem,interpretation); | ||
14355 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
14356 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition"); | ||
14357 | find mustInstanceOfTransition_class(problem,interpretation,object); | ||
14358 | numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,object,_); | ||
14359 | check(numberOfExistingReferences < 1); | ||
14360 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
14361 | } | ||
14362 | |||
14363 | ////////// | ||
14364 | // 3.2 Unfinishedness Measured by WF Queries | ||
14365 | ////////// | ||
14366 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14367 | var_r1) | ||
14368 | { | ||
14369 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1); | ||
14370 | } | ||
14371 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14372 | var_r) | ||
14373 | { | ||
14374 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r); | ||
14375 | } | ||
14376 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14377 | var_t, var_e) | ||
14378 | { | ||
14379 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e); | ||
14380 | } | ||
14381 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14382 | var_e) | ||
14383 | { | ||
14384 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e); | ||
14385 | } | ||
14386 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14387 | var_e, var_t1, var_t2) | ||
14388 | { | ||
14389 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2); | ||
14390 | } | ||
14391 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14392 | var_t, var_e) | ||
14393 | { | ||
14394 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e); | ||
14395 | } | ||
14396 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14397 | var_t, var_f) | ||
14398 | { | ||
14399 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f); | ||
14400 | } | ||
14401 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14402 | var_region) | ||
14403 | { | ||
14404 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region); | ||
14405 | } | ||
14406 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14407 | var_c) | ||
14408 | { | ||
14409 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c); | ||
14410 | } | ||
14411 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14412 | var_c) | ||
14413 | { | ||
14414 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c); | ||
14415 | } | ||
14416 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14417 | var_s) | ||
14418 | { | ||
14419 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s); | ||
14420 | } | ||
14421 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14422 | var_s) | ||
14423 | { | ||
14424 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s); | ||
14425 | } | ||
14426 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14427 | var_s, var_v1, var_v2) | ||
14428 | { | ||
14429 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2); | ||
14430 | } | ||
14431 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14432 | var_s) | ||
14433 | { | ||
14434 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s); | ||
14435 | } | ||
14436 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14437 | var_s, var_v1, var_v2) | ||
14438 | { | ||
14439 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2); | ||
14440 | } | ||
14441 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14442 | var_s, var_v) | ||
14443 | { | ||
14444 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v); | ||
14445 | } | ||
14446 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14447 | var_s) | ||
14448 | { | ||
14449 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s); | ||
14450 | } | ||
14451 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation, | ||
14452 | var_s1, var_s2) | ||
14453 | { | ||
14454 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2); | ||
14455 | } | ||
14456 | |||
14457 | ////////// | ||
14458 | // 4. Refinement Indexers | ||
14459 | ////////// | ||
14460 | // 4.1 Object constructors | ||
14461 | ////////// | ||
14462 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) | ||
14463 | { | ||
14464 | find interpretation(problem,interpretation); | ||
14465 | find mustInstanceOfPseudostate_class(problem,interpretation,root); | ||
14466 | find mustExist(problem, interpretation, root); | ||
14467 | }or{ | ||
14468 | find interpretation(problem,interpretation); | ||
14469 | find mustInstanceOfVertex_class(problem,interpretation,root); | ||
14470 | find mustExist(problem, interpretation, root); | ||
14471 | }or{ | ||
14472 | find interpretation(problem,interpretation); | ||
14473 | find mustInstanceOfCompositeElement_class(problem,interpretation,root); | ||
14474 | find mustExist(problem, interpretation, root); | ||
14475 | }or{ | ||
14476 | find interpretation(problem,interpretation); | ||
14477 | find mustInstanceOfFinalState_class(problem,interpretation,root); | ||
14478 | find mustExist(problem, interpretation, root); | ||
14479 | }or{ | ||
14480 | find interpretation(problem,interpretation); | ||
14481 | find mustInstanceOfTransition_class(problem,interpretation,root); | ||
14482 | find mustExist(problem, interpretation, root); | ||
14483 | }or{ | ||
14484 | find interpretation(problem,interpretation); | ||
14485 | find mustInstanceOfRegion_class(problem,interpretation,root); | ||
14486 | find mustExist(problem, interpretation, root); | ||
14487 | }or{ | ||
14488 | find interpretation(problem,interpretation); | ||
14489 | find mustInstanceOfStatechart_class(problem,interpretation,root); | ||
14490 | find mustExist(problem, interpretation, root); | ||
14491 | }or{ | ||
14492 | find interpretation(problem,interpretation); | ||
14493 | find mustInstanceOfExit_class(problem,interpretation,root); | ||
14494 | find mustExist(problem, interpretation, root); | ||
14495 | }or{ | ||
14496 | find interpretation(problem,interpretation); | ||
14497 | find mustInstanceOfChoice_class(problem,interpretation,root); | ||
14498 | find mustExist(problem, interpretation, root); | ||
14499 | }or{ | ||
14500 | find interpretation(problem,interpretation); | ||
14501 | find mustInstanceOfRegularState_class(problem,interpretation,root); | ||
14502 | find mustExist(problem, interpretation, root); | ||
14503 | }or{ | ||
14504 | find interpretation(problem,interpretation); | ||
14505 | find mustInstanceOfSynchronization_class(problem,interpretation,root); | ||
14506 | find mustExist(problem, interpretation, root); | ||
14507 | }or{ | ||
14508 | find interpretation(problem,interpretation); | ||
14509 | find mustInstanceOfEntry_class(problem,interpretation,root); | ||
14510 | find mustExist(problem, interpretation, root); | ||
14511 | }or{ | ||
14512 | find interpretation(problem,interpretation); | ||
14513 | find mustInstanceOfState_class(problem,interpretation,root); | ||
14514 | find mustExist(problem, interpretation, root); | ||
14515 | }or{ | ||
14516 | find interpretation(problem,interpretation); | ||
14517 | find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,root); | ||
14518 | find mustExist(problem, interpretation, root); | ||
14519 | }or{ | ||
14520 | find interpretation(problem,interpretation); | ||
14521 | find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,root); | ||
14522 | find mustExist(problem, interpretation, root); | ||
14523 | }or{ | ||
14524 | find interpretation(problem,interpretation); | ||
14525 | find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,root); | ||
14526 | find mustExist(problem, interpretation, root); | ||
14527 | }or{ | ||
14528 | find interpretation(problem,interpretation); | ||
14529 | find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,root); | ||
14530 | find mustExist(problem, interpretation, root); | ||
14531 | } | ||
14532 | pattern createObject_Transition_class_by_outgoingTransitions_reference_Vertex_with_source_reference_Transition( | ||
14533 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14534 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
14535 | container:DefinedElement) | ||
14536 | { | ||
14537 | find interpretation(problem,interpretation); | ||
14538 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
14539 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class"); | ||
14540 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
14541 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingTransitions reference Vertex"); | ||
14542 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
14543 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"source reference Transition"); | ||
14544 | find mustInstanceOfVertex_class(problem,interpretation,container); | ||
14545 | find mayInstanceOfTransition_class(problem,interpretation,newObject); | ||
14546 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,container,newObject); | ||
14547 | find mustExist(problem, interpretation, container); | ||
14548 | neg find mustExist(problem, interpretation, newObject); | ||
14549 | } | ||
14550 | pattern createObject_Transition_class( | ||
14551 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14552 | typeInterpretation:PartialComplexTypeInterpretation) | ||
14553 | { | ||
14554 | find interpretation(problem,interpretation); | ||
14555 | neg find hasElementInContainment(problem,interpretation); | ||
14556 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
14557 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class"); | ||
14558 | find mayInstanceOfTransition_class(problem,interpretation,newObject); | ||
14559 | find mayExist(problem, interpretation, newObject); | ||
14560 | neg find mustExist(problem, interpretation, newObject); | ||
14561 | } | ||
14562 | pattern createObject_Synchronization_class_by_vertices_reference_Region( | ||
14563 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14564 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
14565 | container:DefinedElement) | ||
14566 | { | ||
14567 | find interpretation(problem,interpretation); | ||
14568 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
14569 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class"); | ||
14570 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
14571 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
14572 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
14573 | find mayInstanceOfSynchronization_class(problem,interpretation,newObject); | ||
14574 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
14575 | find mustExist(problem, interpretation, container); | ||
14576 | neg find mustExist(problem, interpretation, newObject); | ||
14577 | } | ||
14578 | pattern createObject_Synchronization_class( | ||
14579 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14580 | typeInterpretation:PartialComplexTypeInterpretation) | ||
14581 | { | ||
14582 | find interpretation(problem,interpretation); | ||
14583 | neg find hasElementInContainment(problem,interpretation); | ||
14584 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
14585 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class"); | ||
14586 | find mayInstanceOfSynchronization_class(problem,interpretation,newObject); | ||
14587 | find mayExist(problem, interpretation, newObject); | ||
14588 | neg find mustExist(problem, interpretation, newObject); | ||
14589 | } | ||
14590 | pattern createObject_State_class_by_vertices_reference_Region( | ||
14591 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14592 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
14593 | container:DefinedElement) | ||
14594 | { | ||
14595 | find interpretation(problem,interpretation); | ||
14596 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
14597 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class"); | ||
14598 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
14599 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
14600 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
14601 | find mayInstanceOfState_class(problem,interpretation,newObject); | ||
14602 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
14603 | find mustExist(problem, interpretation, container); | ||
14604 | neg find mustExist(problem, interpretation, newObject); | ||
14605 | } | ||
14606 | pattern createObject_State_class( | ||
14607 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14608 | typeInterpretation:PartialComplexTypeInterpretation) | ||
14609 | { | ||
14610 | find interpretation(problem,interpretation); | ||
14611 | neg find hasElementInContainment(problem,interpretation); | ||
14612 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
14613 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class"); | ||
14614 | find mayInstanceOfState_class(problem,interpretation,newObject); | ||
14615 | find mayExist(problem, interpretation, newObject); | ||
14616 | neg find mustExist(problem, interpretation, newObject); | ||
14617 | } | ||
14618 | pattern createObject_Exit_class_by_vertices_reference_Region( | ||
14619 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14620 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
14621 | container:DefinedElement) | ||
14622 | { | ||
14623 | find interpretation(problem,interpretation); | ||
14624 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
14625 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class"); | ||
14626 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
14627 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
14628 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
14629 | find mayInstanceOfExit_class(problem,interpretation,newObject); | ||
14630 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
14631 | find mustExist(problem, interpretation, container); | ||
14632 | neg find mustExist(problem, interpretation, newObject); | ||
14633 | } | ||
14634 | pattern createObject_Exit_class( | ||
14635 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14636 | typeInterpretation:PartialComplexTypeInterpretation) | ||
14637 | { | ||
14638 | find interpretation(problem,interpretation); | ||
14639 | neg find hasElementInContainment(problem,interpretation); | ||
14640 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
14641 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class"); | ||
14642 | find mayInstanceOfExit_class(problem,interpretation,newObject); | ||
14643 | find mayExist(problem, interpretation, newObject); | ||
14644 | neg find mustExist(problem, interpretation, newObject); | ||
14645 | } | ||
14646 | pattern createObject_Choice_class_by_vertices_reference_Region( | ||
14647 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14648 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
14649 | container:DefinedElement) | ||
14650 | { | ||
14651 | find interpretation(problem,interpretation); | ||
14652 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
14653 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class"); | ||
14654 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
14655 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
14656 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
14657 | find mayInstanceOfChoice_class(problem,interpretation,newObject); | ||
14658 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
14659 | find mustExist(problem, interpretation, container); | ||
14660 | neg find mustExist(problem, interpretation, newObject); | ||
14661 | } | ||
14662 | pattern createObject_Choice_class( | ||
14663 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14664 | typeInterpretation:PartialComplexTypeInterpretation) | ||
14665 | { | ||
14666 | find interpretation(problem,interpretation); | ||
14667 | neg find hasElementInContainment(problem,interpretation); | ||
14668 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
14669 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class"); | ||
14670 | find mayInstanceOfChoice_class(problem,interpretation,newObject); | ||
14671 | find mayExist(problem, interpretation, newObject); | ||
14672 | neg find mustExist(problem, interpretation, newObject); | ||
14673 | } | ||
14674 | pattern createObject_FinalState_class_by_vertices_reference_Region( | ||
14675 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14676 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
14677 | container:DefinedElement) | ||
14678 | { | ||
14679 | find interpretation(problem,interpretation); | ||
14680 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
14681 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class"); | ||
14682 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
14683 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
14684 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
14685 | find mayInstanceOfFinalState_class(problem,interpretation,newObject); | ||
14686 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
14687 | find mustExist(problem, interpretation, container); | ||
14688 | neg find mustExist(problem, interpretation, newObject); | ||
14689 | } | ||
14690 | pattern createObject_FinalState_class( | ||
14691 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14692 | typeInterpretation:PartialComplexTypeInterpretation) | ||
14693 | { | ||
14694 | find interpretation(problem,interpretation); | ||
14695 | neg find hasElementInContainment(problem,interpretation); | ||
14696 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
14697 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class"); | ||
14698 | find mayInstanceOfFinalState_class(problem,interpretation,newObject); | ||
14699 | find mayExist(problem, interpretation, newObject); | ||
14700 | neg find mustExist(problem, interpretation, newObject); | ||
14701 | } | ||
14702 | pattern createObject_Region_class_by_regions_reference_CompositeElement( | ||
14703 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14704 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
14705 | container:DefinedElement) | ||
14706 | { | ||
14707 | find interpretation(problem,interpretation); | ||
14708 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
14709 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class"); | ||
14710 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
14711 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"regions reference CompositeElement"); | ||
14712 | find mustInstanceOfCompositeElement_class(problem,interpretation,container); | ||
14713 | find mayInstanceOfRegion_class(problem,interpretation,newObject); | ||
14714 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,container,newObject); | ||
14715 | find mustExist(problem, interpretation, container); | ||
14716 | neg find mustExist(problem, interpretation, newObject); | ||
14717 | } | ||
14718 | pattern createObject_Region_class( | ||
14719 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14720 | typeInterpretation:PartialComplexTypeInterpretation) | ||
14721 | { | ||
14722 | find interpretation(problem,interpretation); | ||
14723 | neg find hasElementInContainment(problem,interpretation); | ||
14724 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
14725 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class"); | ||
14726 | find mayInstanceOfRegion_class(problem,interpretation,newObject); | ||
14727 | find mayExist(problem, interpretation, newObject); | ||
14728 | neg find mustExist(problem, interpretation, newObject); | ||
14729 | } | ||
14730 | pattern createObject_Entry_class_by_vertices_reference_Region( | ||
14731 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14732 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
14733 | container:DefinedElement) | ||
14734 | { | ||
14735 | find interpretation(problem,interpretation); | ||
14736 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
14737 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class"); | ||
14738 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
14739 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
14740 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
14741 | find mayInstanceOfEntry_class(problem,interpretation,newObject); | ||
14742 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
14743 | find mustExist(problem, interpretation, container); | ||
14744 | neg find mustExist(problem, interpretation, newObject); | ||
14745 | } | ||
14746 | pattern createObject_Entry_class( | ||
14747 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14748 | typeInterpretation:PartialComplexTypeInterpretation) | ||
14749 | { | ||
14750 | find interpretation(problem,interpretation); | ||
14751 | neg find hasElementInContainment(problem,interpretation); | ||
14752 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
14753 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class"); | ||
14754 | find mayInstanceOfEntry_class(problem,interpretation,newObject); | ||
14755 | find mayExist(problem, interpretation, newObject); | ||
14756 | neg find mustExist(problem, interpretation, newObject); | ||
14757 | } | ||
14758 | pattern createObject_Statechart_class_UndefinedPart( | ||
14759 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14760 | typeInterpretation:PartialComplexTypeInterpretation) | ||
14761 | { | ||
14762 | find interpretation(problem,interpretation); | ||
14763 | neg find hasElementInContainment(problem,interpretation); | ||
14764 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
14765 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Statechart class UndefinedPart"); | ||
14766 | find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,newObject); | ||
14767 | find mayExist(problem, interpretation, newObject); | ||
14768 | neg find mustExist(problem, interpretation, newObject); | ||
14769 | } | ||
14770 | |||
14771 | ////////// | ||
14772 | // 4.2 Type refinement | ||
14773 | ////////// | ||
14774 | pattern refineTypeTo_Transition_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
14775 | find interpretation(problem,interpretation); | ||
14776 | PartialInterpretation.newElements(interpretation,element); | ||
14777 | find mayInstanceOfTransition_class(problem,interpretation,element); | ||
14778 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
14779 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
14780 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
14781 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
14782 | } | ||
14783 | pattern refineTypeTo_Synchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
14784 | find interpretation(problem,interpretation); | ||
14785 | PartialInterpretation.newElements(interpretation,element); | ||
14786 | find mayInstanceOfSynchronization_class(problem,interpretation,element); | ||
14787 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
14788 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
14789 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
14790 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
14791 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
14792 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
14793 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
14794 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
14795 | } | ||
14796 | pattern refineTypeTo_State_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
14797 | find interpretation(problem,interpretation); | ||
14798 | PartialInterpretation.newElements(interpretation,element); | ||
14799 | find mayInstanceOfState_class(problem,interpretation,element); | ||
14800 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
14801 | neg find mustInstanceOfState_class(problem,interpretation,element); | ||
14802 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
14803 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
14804 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
14805 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
14806 | } | ||
14807 | pattern refineTypeTo_Exit_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
14808 | find interpretation(problem,interpretation); | ||
14809 | PartialInterpretation.newElements(interpretation,element); | ||
14810 | find mayInstanceOfExit_class(problem,interpretation,element); | ||
14811 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
14812 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
14813 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
14814 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
14815 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
14816 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
14817 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
14818 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
14819 | } | ||
14820 | pattern refineTypeTo_Choice_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
14821 | find interpretation(problem,interpretation); | ||
14822 | PartialInterpretation.newElements(interpretation,element); | ||
14823 | find mayInstanceOfChoice_class(problem,interpretation,element); | ||
14824 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
14825 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
14826 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
14827 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
14828 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
14829 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
14830 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
14831 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
14832 | } | ||
14833 | pattern refineTypeTo_FinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
14834 | find interpretation(problem,interpretation); | ||
14835 | PartialInterpretation.newElements(interpretation,element); | ||
14836 | find mayInstanceOfFinalState_class(problem,interpretation,element); | ||
14837 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
14838 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
14839 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
14840 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
14841 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
14842 | } | ||
14843 | pattern refineTypeTo_Region_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
14844 | find interpretation(problem,interpretation); | ||
14845 | PartialInterpretation.newElements(interpretation,element); | ||
14846 | find mayInstanceOfRegion_class(problem,interpretation,element); | ||
14847 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
14848 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
14849 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
14850 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
14851 | } | ||
14852 | pattern refineTypeTo_Entry_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
14853 | find interpretation(problem,interpretation); | ||
14854 | PartialInterpretation.newElements(interpretation,element); | ||
14855 | find mayInstanceOfEntry_class(problem,interpretation,element); | ||
14856 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
14857 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
14858 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
14859 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
14860 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
14861 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
14862 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
14863 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
14864 | } | ||
14865 | pattern refineTypeTo_Statechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
14866 | find interpretation(problem,interpretation); | ||
14867 | PartialInterpretation.newElements(interpretation,element); | ||
14868 | find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); | ||
14869 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
14870 | neg find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); | ||
14871 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
14872 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
14873 | } | ||
14874 | |||
14875 | ////////// | ||
14876 | // 4.3 Relation refinement | ||
14877 | ////////// | ||
14878 | pattern refineRelation_incomingTransitions_reference_Vertex_and_target_reference_Transition( | ||
14879 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
14880 | relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, | ||
14881 | from: DefinedElement, to: DefinedElement) | ||
14882 | { | ||
14883 | find interpretation(problem,interpretation); | ||
14884 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
14885 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex"); | ||
14886 | PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); | ||
14887 | PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"target reference Transition"); | ||
14888 | find mustExist(problem, interpretation, from); | ||
14889 | find mustExist(problem, interpretation, to); | ||
14890 | find mustInstanceOfVertex_class(problem,interpretation,from); | ||
14891 | find mustInstanceOfTransition_class(problem,interpretation,to); | ||
14892 | find mayInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to); | ||
14893 | neg find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to); | ||
14894 | } | ||
14895 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
14896 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" | ||
14897 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
14898 | |||
14899 | ////////// | ||
14900 | // 0. Util | ||
14901 | ////////// | ||
14902 | private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
14903 | PartialInterpretation.problem(interpretation,problem); | ||
14904 | } | ||
14905 | |||
14906 | ///////////////////////// | ||
14907 | // 0.1 Existence | ||
14908 | ///////////////////////// | ||
14909 | private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
14910 | find interpretation(problem,interpretation); | ||
14911 | LogicProblem.elements(problem,element); | ||
14912 | } or { | ||
14913 | find interpretation(problem,interpretation); | ||
14914 | PartialInterpretation.newElements(interpretation,element); | ||
14915 | } | ||
14916 | |||
14917 | private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
14918 | find mustExist(problem,interpretation,element); | ||
14919 | } or { | ||
14920 | find interpretation(problem,interpretation); | ||
14921 | neg find elementCloseWorld(element); | ||
14922 | PartialInterpretation.openWorldElements(interpretation,element); | ||
14923 | } | ||
14924 | |||
14925 | private pattern elementCloseWorld(element:DefinedElement) { | ||
14926 | PartialInterpretation.openWorldElements(i,element); | ||
14927 | PartialInterpretation.maxNewElements(i,0); | ||
14928 | } or { | ||
14929 | Scope.targetTypeInterpretation(scope,interpretation); | ||
14930 | PartialTypeInterpratation.elements(interpretation,element); | ||
14931 | Scope.maxNewElements(scope,0); | ||
14932 | } | ||
14933 | |||
14934 | //////////////////////// | ||
14935 | // 0.2 Equivalence | ||
14936 | //////////////////////// | ||
14937 | pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { | ||
14938 | find mayExist(problem,interpretation,a); | ||
14939 | find mayExist(problem,interpretation,b); | ||
14940 | a == b; | ||
14941 | } | ||
14942 | |||
14943 | //////////////////////// | ||
14944 | // 0.3 Required Patterns by TypeIndexer | ||
14945 | //////////////////////// | ||
14946 | private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { | ||
14947 | find interpretation(problem,interpretation); | ||
14948 | LogicProblem.types(problem,type); | ||
14949 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
14950 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
14951 | } | ||
14952 | |||
14953 | private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
14954 | find interpretation(problem,interpretation); | ||
14955 | LogicProblem.types(problem,type); | ||
14956 | TypeDefinition.elements(type,element); | ||
14957 | } or { | ||
14958 | find interpretation(problem,interpretation); | ||
14959 | find typeInterpretation(problem,interpretation,type,typeInterpretation); | ||
14960 | PartialComplexTypeInterpretation.elements(typeInterpretation,element); | ||
14961 | } | ||
14962 | |||
14963 | private pattern isPrimitive(element: PrimitiveElement) { | ||
14964 | PrimitiveElement(element); | ||
14965 | } | ||
14966 | |||
14967 | ////////// | ||
14968 | // 1. Problem-Specific Base Indexers | ||
14969 | ////////// | ||
14970 | // 1.1 Type Indexers | ||
14971 | ////////// | ||
14972 | // 1.1.1 primitive Type Indexers | ||
14973 | ////////// | ||
14974 | |||
14975 | ////////// | ||
14976 | // 1.1.2 domain-specific Type Indexers | ||
14977 | ////////// | ||
14978 | /** | ||
14979 | * An element must be an instance of type "Pseudostate class". | ||
14980 | */ | ||
14981 | private pattern mustInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
14982 | Type.name(type,"Pseudostate class"); | ||
14983 | find directInstanceOf(problem,interpretation,element,type); | ||
14984 | } | ||
14985 | private pattern scopeDisallowsNewPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
14986 | find interpretation(problem,interpretation); | ||
14987 | PartialInterpretation.scopes(interpretation,scope); | ||
14988 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
14989 | Scope.maxNewElements(scope,0); | ||
14990 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
14991 | Type.name(type,"Pseudostate class"); | ||
14992 | } | ||
14993 | |||
14994 | /** | ||
14995 | * An element may be an instance of type "Pseudostate class". | ||
14996 | */ | ||
14997 | private pattern mayInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
14998 | { | ||
14999 | find interpretation(problem,interpretation); | ||
15000 | PartialInterpretation.newElements(interpretation,element); | ||
15001 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
15002 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15003 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
15004 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
15005 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
15006 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
15007 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15008 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
15009 | neg find scopeDisallowsNewPseudostate_class(problem, interpretation); | ||
15010 | neg find isPrimitive(element); | ||
15011 | } or { | ||
15012 | find interpretation(problem,interpretation); | ||
15013 | PartialInterpretation.openWorldElements(interpretation,element); | ||
15014 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
15015 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15016 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
15017 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
15018 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
15019 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
15020 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15021 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
15022 | neg find scopeDisallowsNewPseudostate_class(problem, interpretation); | ||
15023 | neg find isPrimitive(element); | ||
15024 | } or | ||
15025 | { find mustInstanceOfPseudostate_class(problem,interpretation,element); } | ||
15026 | /** | ||
15027 | * An element must be an instance of type "Vertex class". | ||
15028 | */ | ||
15029 | private pattern mustInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
15030 | Type.name(type,"Vertex class"); | ||
15031 | find directInstanceOf(problem,interpretation,element,type); | ||
15032 | } | ||
15033 | private pattern scopeDisallowsNewVertex_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
15034 | find interpretation(problem,interpretation); | ||
15035 | PartialInterpretation.scopes(interpretation,scope); | ||
15036 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
15037 | Scope.maxNewElements(scope,0); | ||
15038 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
15039 | Type.name(type,"Vertex class"); | ||
15040 | } | ||
15041 | |||
15042 | /** | ||
15043 | * An element may be an instance of type "Vertex class". | ||
15044 | */ | ||
15045 | private pattern mayInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
15046 | { | ||
15047 | find interpretation(problem,interpretation); | ||
15048 | PartialInterpretation.newElements(interpretation,element); | ||
15049 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
15050 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15051 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
15052 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15053 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
15054 | neg find scopeDisallowsNewVertex_class(problem, interpretation); | ||
15055 | neg find isPrimitive(element); | ||
15056 | } or { | ||
15057 | find interpretation(problem,interpretation); | ||
15058 | PartialInterpretation.openWorldElements(interpretation,element); | ||
15059 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
15060 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15061 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
15062 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15063 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
15064 | neg find scopeDisallowsNewVertex_class(problem, interpretation); | ||
15065 | neg find isPrimitive(element); | ||
15066 | } or | ||
15067 | { find mustInstanceOfVertex_class(problem,interpretation,element); } | ||
15068 | /** | ||
15069 | * An element must be an instance of type "Region class". | ||
15070 | */ | ||
15071 | private pattern mustInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
15072 | Type.name(type,"Region class"); | ||
15073 | find directInstanceOf(problem,interpretation,element,type); | ||
15074 | } | ||
15075 | private pattern scopeDisallowsNewRegion_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
15076 | find interpretation(problem,interpretation); | ||
15077 | PartialInterpretation.scopes(interpretation,scope); | ||
15078 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
15079 | Scope.maxNewElements(scope,0); | ||
15080 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
15081 | Type.name(type,"Region class"); | ||
15082 | } | ||
15083 | |||
15084 | /** | ||
15085 | * An element may be an instance of type "Region class". | ||
15086 | */ | ||
15087 | private pattern mayInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
15088 | { | ||
15089 | find interpretation(problem,interpretation); | ||
15090 | PartialInterpretation.newElements(interpretation,element); | ||
15091 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15092 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
15093 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
15094 | neg find scopeDisallowsNewRegion_class(problem, interpretation); | ||
15095 | neg find isPrimitive(element); | ||
15096 | } or { | ||
15097 | find interpretation(problem,interpretation); | ||
15098 | PartialInterpretation.openWorldElements(interpretation,element); | ||
15099 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15100 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
15101 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
15102 | neg find scopeDisallowsNewRegion_class(problem, interpretation); | ||
15103 | neg find isPrimitive(element); | ||
15104 | } or | ||
15105 | { find mustInstanceOfRegion_class(problem,interpretation,element); } | ||
15106 | /** | ||
15107 | * An element must be an instance of type "Transition class". | ||
15108 | */ | ||
15109 | private pattern mustInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
15110 | Type.name(type,"Transition class"); | ||
15111 | find directInstanceOf(problem,interpretation,element,type); | ||
15112 | } | ||
15113 | private pattern scopeDisallowsNewTransition_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
15114 | find interpretation(problem,interpretation); | ||
15115 | PartialInterpretation.scopes(interpretation,scope); | ||
15116 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
15117 | Scope.maxNewElements(scope,0); | ||
15118 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
15119 | Type.name(type,"Transition class"); | ||
15120 | } | ||
15121 | |||
15122 | /** | ||
15123 | * An element may be an instance of type "Transition class". | ||
15124 | */ | ||
15125 | private pattern mayInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
15126 | { | ||
15127 | find interpretation(problem,interpretation); | ||
15128 | PartialInterpretation.newElements(interpretation,element); | ||
15129 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15130 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
15131 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
15132 | neg find scopeDisallowsNewTransition_class(problem, interpretation); | ||
15133 | neg find isPrimitive(element); | ||
15134 | } or { | ||
15135 | find interpretation(problem,interpretation); | ||
15136 | PartialInterpretation.openWorldElements(interpretation,element); | ||
15137 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15138 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
15139 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
15140 | neg find scopeDisallowsNewTransition_class(problem, interpretation); | ||
15141 | neg find isPrimitive(element); | ||
15142 | } or | ||
15143 | { find mustInstanceOfTransition_class(problem,interpretation,element); } | ||
15144 | /** | ||
15145 | * An element must be an instance of type "Statechart class". | ||
15146 | */ | ||
15147 | private pattern mustInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
15148 | Type.name(type,"Statechart class"); | ||
15149 | find directInstanceOf(problem,interpretation,element,type); | ||
15150 | } | ||
15151 | private pattern scopeDisallowsNewStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
15152 | find interpretation(problem,interpretation); | ||
15153 | PartialInterpretation.scopes(interpretation,scope); | ||
15154 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
15155 | Scope.maxNewElements(scope,0); | ||
15156 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
15157 | Type.name(type,"Statechart class"); | ||
15158 | } | ||
15159 | |||
15160 | /** | ||
15161 | * An element may be an instance of type "Statechart class". | ||
15162 | */ | ||
15163 | private pattern mayInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
15164 | { | ||
15165 | find interpretation(problem,interpretation); | ||
15166 | PartialInterpretation.newElements(interpretation,element); | ||
15167 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15168 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15169 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
15170 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
15171 | neg find scopeDisallowsNewStatechart_class(problem, interpretation); | ||
15172 | neg find isPrimitive(element); | ||
15173 | } or { | ||
15174 | find interpretation(problem,interpretation); | ||
15175 | PartialInterpretation.openWorldElements(interpretation,element); | ||
15176 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15177 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15178 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
15179 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
15180 | neg find scopeDisallowsNewStatechart_class(problem, interpretation); | ||
15181 | neg find isPrimitive(element); | ||
15182 | } or | ||
15183 | { find mustInstanceOfStatechart_class(problem,interpretation,element); } | ||
15184 | /** | ||
15185 | * An element must be an instance of type "Entry class". | ||
15186 | */ | ||
15187 | private pattern mustInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
15188 | Type.name(type,"Entry class"); | ||
15189 | find directInstanceOf(problem,interpretation,element,type); | ||
15190 | } | ||
15191 | private pattern scopeDisallowsNewEntry_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
15192 | find interpretation(problem,interpretation); | ||
15193 | PartialInterpretation.scopes(interpretation,scope); | ||
15194 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
15195 | Scope.maxNewElements(scope,0); | ||
15196 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
15197 | Type.name(type,"Entry class"); | ||
15198 | } | ||
15199 | |||
15200 | /** | ||
15201 | * An element may be an instance of type "Entry class". | ||
15202 | */ | ||
15203 | private pattern mayInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
15204 | { | ||
15205 | find interpretation(problem,interpretation); | ||
15206 | PartialInterpretation.newElements(interpretation,element); | ||
15207 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
15208 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15209 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
15210 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
15211 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
15212 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15213 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
15214 | neg find scopeDisallowsNewEntry_class(problem, interpretation); | ||
15215 | neg find isPrimitive(element); | ||
15216 | } or { | ||
15217 | find interpretation(problem,interpretation); | ||
15218 | PartialInterpretation.openWorldElements(interpretation,element); | ||
15219 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
15220 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15221 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
15222 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
15223 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
15224 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15225 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
15226 | neg find scopeDisallowsNewEntry_class(problem, interpretation); | ||
15227 | neg find isPrimitive(element); | ||
15228 | } or | ||
15229 | { find mustInstanceOfEntry_class(problem,interpretation,element); } | ||
15230 | /** | ||
15231 | * An element must be an instance of type "Synchronization class". | ||
15232 | */ | ||
15233 | private pattern mustInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
15234 | Type.name(type,"Synchronization class"); | ||
15235 | find directInstanceOf(problem,interpretation,element,type); | ||
15236 | } | ||
15237 | private pattern scopeDisallowsNewSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
15238 | find interpretation(problem,interpretation); | ||
15239 | PartialInterpretation.scopes(interpretation,scope); | ||
15240 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
15241 | Scope.maxNewElements(scope,0); | ||
15242 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
15243 | Type.name(type,"Synchronization class"); | ||
15244 | } | ||
15245 | |||
15246 | /** | ||
15247 | * An element may be an instance of type "Synchronization class". | ||
15248 | */ | ||
15249 | private pattern mayInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
15250 | { | ||
15251 | find interpretation(problem,interpretation); | ||
15252 | PartialInterpretation.newElements(interpretation,element); | ||
15253 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
15254 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15255 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
15256 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
15257 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
15258 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15259 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
15260 | neg find scopeDisallowsNewSynchronization_class(problem, interpretation); | ||
15261 | neg find isPrimitive(element); | ||
15262 | } or { | ||
15263 | find interpretation(problem,interpretation); | ||
15264 | PartialInterpretation.openWorldElements(interpretation,element); | ||
15265 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
15266 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15267 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
15268 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
15269 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
15270 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15271 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
15272 | neg find scopeDisallowsNewSynchronization_class(problem, interpretation); | ||
15273 | neg find isPrimitive(element); | ||
15274 | } or | ||
15275 | { find mustInstanceOfSynchronization_class(problem,interpretation,element); } | ||
15276 | /** | ||
15277 | * An element must be an instance of type "State class". | ||
15278 | */ | ||
15279 | private pattern mustInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
15280 | Type.name(type,"State class"); | ||
15281 | find directInstanceOf(problem,interpretation,element,type); | ||
15282 | } | ||
15283 | private pattern scopeDisallowsNewState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
15284 | find interpretation(problem,interpretation); | ||
15285 | PartialInterpretation.scopes(interpretation,scope); | ||
15286 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
15287 | Scope.maxNewElements(scope,0); | ||
15288 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
15289 | Type.name(type,"State class"); | ||
15290 | } | ||
15291 | |||
15292 | /** | ||
15293 | * An element may be an instance of type "State class". | ||
15294 | */ | ||
15295 | private pattern mayInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
15296 | { | ||
15297 | find interpretation(problem,interpretation); | ||
15298 | PartialInterpretation.newElements(interpretation,element); | ||
15299 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
15300 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
15301 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15302 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15303 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
15304 | neg find scopeDisallowsNewState_class(problem, interpretation); | ||
15305 | neg find isPrimitive(element); | ||
15306 | } or { | ||
15307 | find interpretation(problem,interpretation); | ||
15308 | PartialInterpretation.openWorldElements(interpretation,element); | ||
15309 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
15310 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
15311 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15312 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15313 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
15314 | neg find scopeDisallowsNewState_class(problem, interpretation); | ||
15315 | neg find isPrimitive(element); | ||
15316 | } or | ||
15317 | { find mustInstanceOfState_class(problem,interpretation,element); } | ||
15318 | /** | ||
15319 | * An element must be an instance of type "RegularState class". | ||
15320 | */ | ||
15321 | private pattern mustInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
15322 | Type.name(type,"RegularState class"); | ||
15323 | find directInstanceOf(problem,interpretation,element,type); | ||
15324 | } | ||
15325 | private pattern scopeDisallowsNewRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
15326 | find interpretation(problem,interpretation); | ||
15327 | PartialInterpretation.scopes(interpretation,scope); | ||
15328 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
15329 | Scope.maxNewElements(scope,0); | ||
15330 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
15331 | Type.name(type,"RegularState class"); | ||
15332 | } | ||
15333 | |||
15334 | /** | ||
15335 | * An element may be an instance of type "RegularState class". | ||
15336 | */ | ||
15337 | private pattern mayInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
15338 | { | ||
15339 | find interpretation(problem,interpretation); | ||
15340 | PartialInterpretation.newElements(interpretation,element); | ||
15341 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
15342 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
15343 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15344 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15345 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
15346 | neg find scopeDisallowsNewRegularState_class(problem, interpretation); | ||
15347 | neg find isPrimitive(element); | ||
15348 | } or { | ||
15349 | find interpretation(problem,interpretation); | ||
15350 | PartialInterpretation.openWorldElements(interpretation,element); | ||
15351 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
15352 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
15353 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15354 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15355 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
15356 | neg find scopeDisallowsNewRegularState_class(problem, interpretation); | ||
15357 | neg find isPrimitive(element); | ||
15358 | } or | ||
15359 | { find mustInstanceOfRegularState_class(problem,interpretation,element); } | ||
15360 | /** | ||
15361 | * An element must be an instance of type "CompositeElement class". | ||
15362 | */ | ||
15363 | private pattern mustInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
15364 | Type.name(type,"CompositeElement class"); | ||
15365 | find directInstanceOf(problem,interpretation,element,type); | ||
15366 | } | ||
15367 | private pattern scopeDisallowsNewCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
15368 | find interpretation(problem,interpretation); | ||
15369 | PartialInterpretation.scopes(interpretation,scope); | ||
15370 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
15371 | Scope.maxNewElements(scope,0); | ||
15372 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
15373 | Type.name(type,"CompositeElement class"); | ||
15374 | } | ||
15375 | |||
15376 | /** | ||
15377 | * An element may be an instance of type "CompositeElement class". | ||
15378 | */ | ||
15379 | private pattern mayInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
15380 | { | ||
15381 | find interpretation(problem,interpretation); | ||
15382 | PartialInterpretation.newElements(interpretation,element); | ||
15383 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15384 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15385 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
15386 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
15387 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
15388 | neg find scopeDisallowsNewCompositeElement_class(problem, interpretation); | ||
15389 | neg find isPrimitive(element); | ||
15390 | } or { | ||
15391 | find interpretation(problem,interpretation); | ||
15392 | PartialInterpretation.openWorldElements(interpretation,element); | ||
15393 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15394 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15395 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
15396 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
15397 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
15398 | neg find scopeDisallowsNewCompositeElement_class(problem, interpretation); | ||
15399 | neg find isPrimitive(element); | ||
15400 | } or | ||
15401 | { find mustInstanceOfCompositeElement_class(problem,interpretation,element); } | ||
15402 | /** | ||
15403 | * An element must be an instance of type "Choice class". | ||
15404 | */ | ||
15405 | private pattern mustInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
15406 | Type.name(type,"Choice class"); | ||
15407 | find directInstanceOf(problem,interpretation,element,type); | ||
15408 | } | ||
15409 | private pattern scopeDisallowsNewChoice_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
15410 | find interpretation(problem,interpretation); | ||
15411 | PartialInterpretation.scopes(interpretation,scope); | ||
15412 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
15413 | Scope.maxNewElements(scope,0); | ||
15414 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
15415 | Type.name(type,"Choice class"); | ||
15416 | } | ||
15417 | |||
15418 | /** | ||
15419 | * An element may be an instance of type "Choice class". | ||
15420 | */ | ||
15421 | private pattern mayInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
15422 | { | ||
15423 | find interpretation(problem,interpretation); | ||
15424 | PartialInterpretation.newElements(interpretation,element); | ||
15425 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
15426 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
15427 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15428 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
15429 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
15430 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15431 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
15432 | neg find scopeDisallowsNewChoice_class(problem, interpretation); | ||
15433 | neg find isPrimitive(element); | ||
15434 | } or { | ||
15435 | find interpretation(problem,interpretation); | ||
15436 | PartialInterpretation.openWorldElements(interpretation,element); | ||
15437 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
15438 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
15439 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15440 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
15441 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
15442 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15443 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
15444 | neg find scopeDisallowsNewChoice_class(problem, interpretation); | ||
15445 | neg find isPrimitive(element); | ||
15446 | } or | ||
15447 | { find mustInstanceOfChoice_class(problem,interpretation,element); } | ||
15448 | /** | ||
15449 | * An element must be an instance of type "Exit class". | ||
15450 | */ | ||
15451 | private pattern mustInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
15452 | Type.name(type,"Exit class"); | ||
15453 | find directInstanceOf(problem,interpretation,element,type); | ||
15454 | } | ||
15455 | private pattern scopeDisallowsNewExit_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
15456 | find interpretation(problem,interpretation); | ||
15457 | PartialInterpretation.scopes(interpretation,scope); | ||
15458 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
15459 | Scope.maxNewElements(scope,0); | ||
15460 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
15461 | Type.name(type,"Exit class"); | ||
15462 | } | ||
15463 | |||
15464 | /** | ||
15465 | * An element may be an instance of type "Exit class". | ||
15466 | */ | ||
15467 | private pattern mayInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
15468 | { | ||
15469 | find interpretation(problem,interpretation); | ||
15470 | PartialInterpretation.newElements(interpretation,element); | ||
15471 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
15472 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15473 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
15474 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
15475 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
15476 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15477 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
15478 | neg find scopeDisallowsNewExit_class(problem, interpretation); | ||
15479 | neg find isPrimitive(element); | ||
15480 | } or { | ||
15481 | find interpretation(problem,interpretation); | ||
15482 | PartialInterpretation.openWorldElements(interpretation,element); | ||
15483 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
15484 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15485 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
15486 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
15487 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
15488 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15489 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
15490 | neg find scopeDisallowsNewExit_class(problem, interpretation); | ||
15491 | neg find isPrimitive(element); | ||
15492 | } or | ||
15493 | { find mustInstanceOfExit_class(problem,interpretation,element); } | ||
15494 | /** | ||
15495 | * An element must be an instance of type "FinalState class". | ||
15496 | */ | ||
15497 | private pattern mustInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
15498 | Type.name(type,"FinalState class"); | ||
15499 | find directInstanceOf(problem,interpretation,element,type); | ||
15500 | } | ||
15501 | private pattern scopeDisallowsNewFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
15502 | find interpretation(problem,interpretation); | ||
15503 | PartialInterpretation.scopes(interpretation,scope); | ||
15504 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
15505 | Scope.maxNewElements(scope,0); | ||
15506 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
15507 | Type.name(type,"FinalState class"); | ||
15508 | } | ||
15509 | |||
15510 | /** | ||
15511 | * An element may be an instance of type "FinalState class". | ||
15512 | */ | ||
15513 | private pattern mayInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
15514 | { | ||
15515 | find interpretation(problem,interpretation); | ||
15516 | PartialInterpretation.newElements(interpretation,element); | ||
15517 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
15518 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15519 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15520 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
15521 | neg find scopeDisallowsNewFinalState_class(problem, interpretation); | ||
15522 | neg find isPrimitive(element); | ||
15523 | } or { | ||
15524 | find interpretation(problem,interpretation); | ||
15525 | PartialInterpretation.openWorldElements(interpretation,element); | ||
15526 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
15527 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15528 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15529 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
15530 | neg find scopeDisallowsNewFinalState_class(problem, interpretation); | ||
15531 | neg find isPrimitive(element); | ||
15532 | } or | ||
15533 | { find mustInstanceOfFinalState_class(problem,interpretation,element); } | ||
15534 | /** | ||
15535 | * An element must be an instance of type "Statechart class DefinedPart". | ||
15536 | */ | ||
15537 | private pattern mustInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
15538 | Type.name(type,"Statechart class DefinedPart"); | ||
15539 | find directInstanceOf(problem,interpretation,element,type); | ||
15540 | } | ||
15541 | private pattern scopeDisallowsNewStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
15542 | find interpretation(problem,interpretation); | ||
15543 | PartialInterpretation.scopes(interpretation,scope); | ||
15544 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
15545 | Scope.maxNewElements(scope,0); | ||
15546 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
15547 | Type.name(type,"Statechart class DefinedPart"); | ||
15548 | } | ||
15549 | |||
15550 | /** | ||
15551 | * An element may be an instance of type "Statechart class DefinedPart". | ||
15552 | */ | ||
15553 | private pattern mayInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
15554 | { find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,element); } | ||
15555 | /** | ||
15556 | * An element must be an instance of type "Statechart class UndefinedPart". | ||
15557 | */ | ||
15558 | private pattern mustInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
15559 | Type.name(type,"Statechart class UndefinedPart"); | ||
15560 | find directInstanceOf(problem,interpretation,element,type); | ||
15561 | } | ||
15562 | private pattern scopeDisallowsNewStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
15563 | find interpretation(problem,interpretation); | ||
15564 | PartialInterpretation.scopes(interpretation,scope); | ||
15565 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
15566 | Scope.maxNewElements(scope,0); | ||
15567 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
15568 | Type.name(type,"Statechart class UndefinedPart"); | ||
15569 | } | ||
15570 | |||
15571 | /** | ||
15572 | * An element may be an instance of type "Statechart class UndefinedPart". | ||
15573 | */ | ||
15574 | private pattern mayInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
15575 | { | ||
15576 | find interpretation(problem,interpretation); | ||
15577 | PartialInterpretation.newElements(interpretation,element); | ||
15578 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15579 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15580 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
15581 | neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation); | ||
15582 | neg find isPrimitive(element); | ||
15583 | } or { | ||
15584 | find interpretation(problem,interpretation); | ||
15585 | PartialInterpretation.openWorldElements(interpretation,element); | ||
15586 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15587 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15588 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
15589 | neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation); | ||
15590 | neg find isPrimitive(element); | ||
15591 | } or | ||
15592 | { find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); } | ||
15593 | /** | ||
15594 | * An element must be an instance of type "CompositeElement class DefinedPart". | ||
15595 | */ | ||
15596 | private pattern mustInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
15597 | Type.name(type,"CompositeElement class DefinedPart"); | ||
15598 | find directInstanceOf(problem,interpretation,element,type); | ||
15599 | } | ||
15600 | private pattern scopeDisallowsNewCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
15601 | find interpretation(problem,interpretation); | ||
15602 | PartialInterpretation.scopes(interpretation,scope); | ||
15603 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
15604 | Scope.maxNewElements(scope,0); | ||
15605 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
15606 | Type.name(type,"CompositeElement class DefinedPart"); | ||
15607 | } | ||
15608 | |||
15609 | /** | ||
15610 | * An element may be an instance of type "CompositeElement class DefinedPart". | ||
15611 | */ | ||
15612 | private pattern mayInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
15613 | { find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,element); } | ||
15614 | /** | ||
15615 | * An element must be an instance of type "CompositeElement class UndefinedPart". | ||
15616 | */ | ||
15617 | private pattern mustInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
15618 | Type.name(type,"CompositeElement class UndefinedPart"); | ||
15619 | find directInstanceOf(problem,interpretation,element,type); | ||
15620 | } | ||
15621 | private pattern scopeDisallowsNewCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
15622 | find interpretation(problem,interpretation); | ||
15623 | PartialInterpretation.scopes(interpretation,scope); | ||
15624 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
15625 | Scope.maxNewElements(scope,0); | ||
15626 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
15627 | Type.name(type,"CompositeElement class UndefinedPart"); | ||
15628 | } | ||
15629 | |||
15630 | /** | ||
15631 | * An element may be an instance of type "CompositeElement class UndefinedPart". | ||
15632 | */ | ||
15633 | private pattern mayInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
15634 | { | ||
15635 | find interpretation(problem,interpretation); | ||
15636 | PartialInterpretation.newElements(interpretation,element); | ||
15637 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15638 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15639 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
15640 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
15641 | neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation); | ||
15642 | neg find isPrimitive(element); | ||
15643 | } or { | ||
15644 | find interpretation(problem,interpretation); | ||
15645 | PartialInterpretation.openWorldElements(interpretation,element); | ||
15646 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
15647 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
15648 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
15649 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
15650 | neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation); | ||
15651 | neg find isPrimitive(element); | ||
15652 | } or | ||
15653 | { find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); } | ||
15654 | |||
15655 | ////////// | ||
15656 | // 1.2 Relation Declaration Indexers | ||
15657 | ////////// | ||
15658 | /** | ||
15659 | * Matcher for detecting tuples t where []incomingTransitions reference Vertex(source,target) | ||
15660 | */ | ||
15661 | private pattern mustInRelationincomingTransitions_reference_Vertex( | ||
15662 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15663 | source: DefinedElement, target:DefinedElement) | ||
15664 | { | ||
15665 | find interpretation(problem,interpretation); | ||
15666 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
15667 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex"); | ||
15668 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
15669 | BinaryElementRelationLink.param1(link,source); | ||
15670 | BinaryElementRelationLink.param2(link,target); | ||
15671 | } | ||
15672 | /** | ||
15673 | * Matcher for detecting tuples t where <>incomingTransitions reference Vertex(source,target) | ||
15674 | */ | ||
15675 | private pattern mayInRelationincomingTransitions_reference_Vertex( | ||
15676 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15677 | source: DefinedElement, target:DefinedElement) | ||
15678 | { | ||
15679 | find interpretation(problem,interpretation); | ||
15680 | // The two endpoint of the link have to exist | ||
15681 | find mayExist(problem, interpretation, source); | ||
15682 | find mayExist(problem, interpretation, target); | ||
15683 | // Type consistency | ||
15684 | find mayInstanceOfVertex_class(problem,interpretation,source); | ||
15685 | find mayInstanceOfTransition_class(problem,interpretation,target); | ||
15686 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
15687 | // the upper bound of the opposite reference multiplicity should be considered. | ||
15688 | numberOfExistingOppositeReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,target,_); | ||
15689 | check(numberOfExistingOppositeReferences < 1); | ||
15690 | } or { | ||
15691 | find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,source,target); | ||
15692 | } | ||
15693 | /** | ||
15694 | * Matcher for detecting tuples t where []outgoingTransitions reference Vertex(source,target) | ||
15695 | */ | ||
15696 | private pattern mustInRelationoutgoingTransitions_reference_Vertex( | ||
15697 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15698 | source: DefinedElement, target:DefinedElement) | ||
15699 | { | ||
15700 | find interpretation(problem,interpretation); | ||
15701 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
15702 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingTransitions reference Vertex"); | ||
15703 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
15704 | BinaryElementRelationLink.param1(link,source); | ||
15705 | BinaryElementRelationLink.param2(link,target); | ||
15706 | } | ||
15707 | /** | ||
15708 | * Matcher for detecting tuples t where <>outgoingTransitions reference Vertex(source,target) | ||
15709 | */ | ||
15710 | private pattern mayInRelationoutgoingTransitions_reference_Vertex( | ||
15711 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15712 | source: DefinedElement, target:DefinedElement) | ||
15713 | { | ||
15714 | find interpretation(problem,interpretation); | ||
15715 | // The two endpoint of the link have to exist | ||
15716 | find mayExist(problem, interpretation, source); | ||
15717 | find mayExist(problem, interpretation, target); | ||
15718 | // Type consistency | ||
15719 | find mayInstanceOfVertex_class(problem,interpretation,source); | ||
15720 | find mayInstanceOfTransition_class(problem,interpretation,target); | ||
15721 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
15722 | // the upper bound of the opposite reference multiplicity should be considered. | ||
15723 | numberOfExistingOppositeReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,target,_); | ||
15724 | check(numberOfExistingOppositeReferences < 1); | ||
15725 | // The reference is containment, then a new reference cannot be create if: | ||
15726 | // 1. Multiple parents | ||
15727 | neg find mustContains4(problem,interpretation,_,target); | ||
15728 | // 2. Circle in the containment hierarchy | ||
15729 | neg find mustTransitiveContains(source,target); | ||
15730 | } or { | ||
15731 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target); | ||
15732 | } | ||
15733 | /** | ||
15734 | * Matcher for detecting tuples t where []vertices reference Region(source,target) | ||
15735 | */ | ||
15736 | private pattern mustInRelationvertices_reference_Region( | ||
15737 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15738 | source: DefinedElement, target:DefinedElement) | ||
15739 | { | ||
15740 | find interpretation(problem,interpretation); | ||
15741 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
15742 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"vertices reference Region"); | ||
15743 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
15744 | BinaryElementRelationLink.param1(link,source); | ||
15745 | BinaryElementRelationLink.param2(link,target); | ||
15746 | } | ||
15747 | /** | ||
15748 | * Matcher for detecting tuples t where <>vertices reference Region(source,target) | ||
15749 | */ | ||
15750 | private pattern mayInRelationvertices_reference_Region( | ||
15751 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15752 | source: DefinedElement, target:DefinedElement) | ||
15753 | { | ||
15754 | find interpretation(problem,interpretation); | ||
15755 | // The two endpoint of the link have to exist | ||
15756 | find mayExist(problem, interpretation, source); | ||
15757 | find mayExist(problem, interpretation, target); | ||
15758 | // Type consistency | ||
15759 | find mayInstanceOfRegion_class(problem,interpretation,source); | ||
15760 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
15761 | // The reference is containment, then a new reference cannot be create if: | ||
15762 | // 1. Multiple parents | ||
15763 | neg find mustContains4(problem,interpretation,_,target); | ||
15764 | // 2. Circle in the containment hierarchy | ||
15765 | neg find mustTransitiveContains(source,target); | ||
15766 | } or { | ||
15767 | find mustInRelationvertices_reference_Region(problem,interpretation,source,target); | ||
15768 | } | ||
15769 | /** | ||
15770 | * Matcher for detecting tuples t where []target reference Transition(source,target) | ||
15771 | */ | ||
15772 | private pattern mustInRelationtarget_reference_Transition( | ||
15773 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15774 | source: DefinedElement, target:DefinedElement) | ||
15775 | { | ||
15776 | find interpretation(problem,interpretation); | ||
15777 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
15778 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition"); | ||
15779 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
15780 | BinaryElementRelationLink.param1(link,source); | ||
15781 | BinaryElementRelationLink.param2(link,target); | ||
15782 | } | ||
15783 | /** | ||
15784 | * Matcher for detecting tuples t where <>target reference Transition(source,target) | ||
15785 | */ | ||
15786 | private pattern mayInRelationtarget_reference_Transition( | ||
15787 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15788 | source: DefinedElement, target:DefinedElement) | ||
15789 | { | ||
15790 | find interpretation(problem,interpretation); | ||
15791 | // The two endpoint of the link have to exist | ||
15792 | find mayExist(problem, interpretation, source); | ||
15793 | find mayExist(problem, interpretation, target); | ||
15794 | // Type consistency | ||
15795 | find mayInstanceOfTransition_class(problem,interpretation,source); | ||
15796 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
15797 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
15798 | // the upper bound of the multiplicity should be considered. | ||
15799 | numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,source,_); | ||
15800 | check(numberOfExistingReferences < 1); | ||
15801 | } or { | ||
15802 | find mustInRelationtarget_reference_Transition(problem,interpretation,source,target); | ||
15803 | } | ||
15804 | /** | ||
15805 | * Matcher for detecting tuples t where []source reference Transition(source,target) | ||
15806 | */ | ||
15807 | private pattern mustInRelationsource_reference_Transition( | ||
15808 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15809 | source: DefinedElement, target:DefinedElement) | ||
15810 | { | ||
15811 | find interpretation(problem,interpretation); | ||
15812 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
15813 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"source reference Transition"); | ||
15814 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
15815 | BinaryElementRelationLink.param1(link,source); | ||
15816 | BinaryElementRelationLink.param2(link,target); | ||
15817 | } | ||
15818 | /** | ||
15819 | * Matcher for detecting tuples t where <>source reference Transition(source,target) | ||
15820 | */ | ||
15821 | private pattern mayInRelationsource_reference_Transition( | ||
15822 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15823 | source: DefinedElement, target:DefinedElement) | ||
15824 | { | ||
15825 | find interpretation(problem,interpretation); | ||
15826 | // The two endpoint of the link have to exist | ||
15827 | find mayExist(problem, interpretation, source); | ||
15828 | find mayExist(problem, interpretation, target); | ||
15829 | // Type consistency | ||
15830 | find mayInstanceOfTransition_class(problem,interpretation,source); | ||
15831 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
15832 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
15833 | // the upper bound of the multiplicity should be considered. | ||
15834 | numberOfExistingReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,source,_); | ||
15835 | check(numberOfExistingReferences < 1); | ||
15836 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
15837 | // 1. Multiple parents | ||
15838 | neg find mustContains4(problem,interpretation,source,_); | ||
15839 | // 2. Circle in the containment hierarchy | ||
15840 | neg find mustTransitiveContains(source,target); | ||
15841 | } or { | ||
15842 | find mustInRelationsource_reference_Transition(problem,interpretation,source,target); | ||
15843 | } | ||
15844 | /** | ||
15845 | * Matcher for detecting tuples t where []regions reference CompositeElement(source,target) | ||
15846 | */ | ||
15847 | private pattern mustInRelationregions_reference_CompositeElement( | ||
15848 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15849 | source: DefinedElement, target:DefinedElement) | ||
15850 | { | ||
15851 | find interpretation(problem,interpretation); | ||
15852 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
15853 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"regions reference CompositeElement"); | ||
15854 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
15855 | BinaryElementRelationLink.param1(link,source); | ||
15856 | BinaryElementRelationLink.param2(link,target); | ||
15857 | } | ||
15858 | /** | ||
15859 | * Matcher for detecting tuples t where <>regions reference CompositeElement(source,target) | ||
15860 | */ | ||
15861 | private pattern mayInRelationregions_reference_CompositeElement( | ||
15862 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15863 | source: DefinedElement, target:DefinedElement) | ||
15864 | { | ||
15865 | find interpretation(problem,interpretation); | ||
15866 | // The two endpoint of the link have to exist | ||
15867 | find mayExist(problem, interpretation, source); | ||
15868 | find mayExist(problem, interpretation, target); | ||
15869 | // Type consistency | ||
15870 | find mayInstanceOfCompositeElement_class(problem,interpretation,source); | ||
15871 | find mayInstanceOfRegion_class(problem,interpretation,target); | ||
15872 | // The reference is containment, then a new reference cannot be create if: | ||
15873 | // 1. Multiple parents | ||
15874 | neg find mustContains4(problem,interpretation,_,target); | ||
15875 | // 2. Circle in the containment hierarchy | ||
15876 | neg find mustTransitiveContains(source,target); | ||
15877 | } or { | ||
15878 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target); | ||
15879 | } | ||
15880 | |||
15881 | ////////// | ||
15882 | // 1.3 Relation Definition Indexers | ||
15883 | ////////// | ||
15884 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries entryInRegion | ||
15885 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
15886 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15887 | var_r1, var_e1) | ||
15888 | { | ||
15889 | find interpretation(problem,interpretation); | ||
15890 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
15891 | find mustInstanceOfEntry_class(problem,interpretation,var_e1); | ||
15892 | // r1 is exported | ||
15893 | // e1 is exported | ||
15894 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
15895 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
15896 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
15897 | var_virtual0 == var_e1; | ||
15898 | } | ||
15899 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
15900 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15901 | var_r1, var_e1) | ||
15902 | { | ||
15903 | find interpretation(problem,interpretation); | ||
15904 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
15905 | find mayInstanceOfEntry_class(problem,interpretation,var_e1); | ||
15906 | // r1 is exported | ||
15907 | // e1 is exported | ||
15908 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
15909 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
15910 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
15911 | find mayEquivalent(problem, interpretation, var_virtual0, var_e1); | ||
15912 | } | ||
15913 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
15914 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15915 | var_r1, var_e1) | ||
15916 | { | ||
15917 | find interpretation(problem,interpretation); | ||
15918 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
15919 | find mustInstanceOfEntry_class(problem,interpretation,var_e1); | ||
15920 | // r1 is exported | ||
15921 | // e1 is exported | ||
15922 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
15923 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
15924 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
15925 | var_virtual0 == var_e1; | ||
15926 | } | ||
15927 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noEntryInRegion | ||
15928 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
15929 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15930 | var_r1) | ||
15931 | { | ||
15932 | find interpretation(problem,interpretation); | ||
15933 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
15934 | // r1 is exported | ||
15935 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
15936 | } | ||
15937 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
15938 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15939 | var_r1) | ||
15940 | { | ||
15941 | find interpretation(problem,interpretation); | ||
15942 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
15943 | // r1 is exported | ||
15944 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
15945 | } | ||
15946 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
15947 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15948 | var_r1) | ||
15949 | { | ||
15950 | find interpretation(problem,interpretation); | ||
15951 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
15952 | // r1 is exported | ||
15953 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
15954 | } | ||
15955 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleEntryInRegion | ||
15956 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
15957 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15958 | var_r) | ||
15959 | { | ||
15960 | find interpretation(problem,interpretation); | ||
15961 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
15962 | // r is exported | ||
15963 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
15964 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
15965 | neg find mayEquivalent(problem, interpretation, var_e1, var_e2); | ||
15966 | } | ||
15967 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
15968 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15969 | var_r) | ||
15970 | { | ||
15971 | find interpretation(problem,interpretation); | ||
15972 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
15973 | // r is exported | ||
15974 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
15975 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
15976 | var_e1 != var_e2; | ||
15977 | } | ||
15978 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
15979 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15980 | var_r) | ||
15981 | { | ||
15982 | find interpretation(problem,interpretation); | ||
15983 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
15984 | // r is exported | ||
15985 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
15986 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
15987 | var_e1 != var_e2; | ||
15988 | } | ||
15989 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries transition | ||
15990 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
15991 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
15992 | var_t, var_src, var_trg) | ||
15993 | { | ||
15994 | find interpretation(problem,interpretation); | ||
15995 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
15996 | find mustInstanceOfVertex_class(problem,interpretation,var_src); | ||
15997 | find mustInstanceOfVertex_class(problem,interpretation,var_trg); | ||
15998 | // t is exported | ||
15999 | // src is exported | ||
16000 | // trg is exported | ||
16001 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
16002 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
16003 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
16004 | var_virtual0 == var_src; | ||
16005 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
16006 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
16007 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
16008 | var_virtual1 == var_trg; | ||
16009 | } | ||
16010 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
16011 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16012 | var_t, var_src, var_trg) | ||
16013 | { | ||
16014 | find interpretation(problem,interpretation); | ||
16015 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
16016 | find mayInstanceOfVertex_class(problem,interpretation,var_src); | ||
16017 | find mayInstanceOfVertex_class(problem,interpretation,var_trg); | ||
16018 | // t is exported | ||
16019 | // src is exported | ||
16020 | // trg is exported | ||
16021 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
16022 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
16023 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
16024 | find mayEquivalent(problem, interpretation, var_virtual0, var_src); | ||
16025 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
16026 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
16027 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
16028 | find mayEquivalent(problem, interpretation, var_virtual1, var_trg); | ||
16029 | } | ||
16030 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
16031 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16032 | var_t, var_src, var_trg) | ||
16033 | { | ||
16034 | find interpretation(problem,interpretation); | ||
16035 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
16036 | find mustInstanceOfVertex_class(problem,interpretation,var_src); | ||
16037 | find mustInstanceOfVertex_class(problem,interpretation,var_trg); | ||
16038 | // t is exported | ||
16039 | // src is exported | ||
16040 | // trg is exported | ||
16041 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
16042 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
16043 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
16044 | var_virtual0 == var_src; | ||
16045 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
16046 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
16047 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
16048 | var_virtual1 == var_trg; | ||
16049 | } | ||
16050 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries incomingToEntry | ||
16051 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
16052 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16053 | var_t, var_e) | ||
16054 | { | ||
16055 | find interpretation(problem,interpretation); | ||
16056 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
16057 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
16058 | // t is exported | ||
16059 | // e is exported | ||
16060 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
16061 | } | ||
16062 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
16063 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16064 | var_t, var_e) | ||
16065 | { | ||
16066 | find interpretation(problem,interpretation); | ||
16067 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
16068 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
16069 | // t is exported | ||
16070 | // e is exported | ||
16071 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
16072 | } | ||
16073 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
16074 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16075 | var_t, var_e) | ||
16076 | { | ||
16077 | find interpretation(problem,interpretation); | ||
16078 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
16079 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
16080 | // t is exported | ||
16081 | // e is exported | ||
16082 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
16083 | } | ||
16084 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noOutgoingTransitionFromEntry | ||
16085 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
16086 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16087 | var_e) | ||
16088 | { | ||
16089 | find interpretation(problem,interpretation); | ||
16090 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
16091 | // e is exported | ||
16092 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
16093 | } | ||
16094 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
16095 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16096 | var_e) | ||
16097 | { | ||
16098 | find interpretation(problem,interpretation); | ||
16099 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
16100 | // e is exported | ||
16101 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
16102 | } | ||
16103 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
16104 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16105 | var_e) | ||
16106 | { | ||
16107 | find interpretation(problem,interpretation); | ||
16108 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
16109 | // e is exported | ||
16110 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
16111 | } | ||
16112 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleTransitionFromEntry | ||
16113 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
16114 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16115 | var_e, var_t1, var_t2) | ||
16116 | { | ||
16117 | find interpretation(problem,interpretation); | ||
16118 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
16119 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
16120 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
16121 | // e is exported | ||
16122 | // t1 is exported | ||
16123 | // t2 is exported | ||
16124 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
16125 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
16126 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
16127 | var_virtual0 == var_t1; | ||
16128 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
16129 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
16130 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
16131 | var_virtual1 == var_t2; | ||
16132 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
16133 | } | ||
16134 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
16135 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16136 | var_e, var_t1, var_t2) | ||
16137 | { | ||
16138 | find interpretation(problem,interpretation); | ||
16139 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
16140 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
16141 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
16142 | // e is exported | ||
16143 | // t1 is exported | ||
16144 | // t2 is exported | ||
16145 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
16146 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
16147 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
16148 | find mayEquivalent(problem, interpretation, var_virtual0, var_t1); | ||
16149 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
16150 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
16151 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
16152 | find mayEquivalent(problem, interpretation, var_virtual1, var_t2); | ||
16153 | var_t1 != var_t2; | ||
16154 | } | ||
16155 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
16156 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16157 | var_e, var_t1, var_t2) | ||
16158 | { | ||
16159 | find interpretation(problem,interpretation); | ||
16160 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
16161 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
16162 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
16163 | // e is exported | ||
16164 | // t1 is exported | ||
16165 | // t2 is exported | ||
16166 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
16167 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
16168 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
16169 | var_virtual0 == var_t1; | ||
16170 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
16171 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
16172 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
16173 | var_virtual1 == var_t2; | ||
16174 | var_t1 != var_t2; | ||
16175 | } | ||
16176 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromExit | ||
16177 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
16178 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16179 | var_t, var_e) | ||
16180 | { | ||
16181 | find interpretation(problem,interpretation); | ||
16182 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
16183 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
16184 | // t is exported | ||
16185 | // e is exported | ||
16186 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
16187 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
16188 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
16189 | var_virtual0 == var_t; | ||
16190 | } | ||
16191 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
16192 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16193 | var_t, var_e) | ||
16194 | { | ||
16195 | find interpretation(problem,interpretation); | ||
16196 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
16197 | find mayInstanceOfExit_class(problem,interpretation,var_e); | ||
16198 | // t is exported | ||
16199 | // e is exported | ||
16200 | find mayInstanceOfExit_class(problem,interpretation,var_e); | ||
16201 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
16202 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
16203 | find mayEquivalent(problem, interpretation, var_virtual0, var_t); | ||
16204 | } | ||
16205 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
16206 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16207 | var_t, var_e) | ||
16208 | { | ||
16209 | find interpretation(problem,interpretation); | ||
16210 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
16211 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
16212 | // t is exported | ||
16213 | // e is exported | ||
16214 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
16215 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
16216 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
16217 | var_virtual0 == var_t; | ||
16218 | } | ||
16219 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromFinal | ||
16220 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
16221 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16222 | var_t, var_f) | ||
16223 | { | ||
16224 | find interpretation(problem,interpretation); | ||
16225 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
16226 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
16227 | // t is exported | ||
16228 | // f is exported | ||
16229 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
16230 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
16231 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
16232 | var_virtual0 == var_t; | ||
16233 | } | ||
16234 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
16235 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16236 | var_t, var_f) | ||
16237 | { | ||
16238 | find interpretation(problem,interpretation); | ||
16239 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
16240 | find mayInstanceOfFinalState_class(problem,interpretation,var_f); | ||
16241 | // t is exported | ||
16242 | // f is exported | ||
16243 | find mayInstanceOfFinalState_class(problem,interpretation,var_f); | ||
16244 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
16245 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
16246 | find mayEquivalent(problem, interpretation, var_virtual0, var_t); | ||
16247 | } | ||
16248 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
16249 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16250 | var_t, var_f) | ||
16251 | { | ||
16252 | find interpretation(problem,interpretation); | ||
16253 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
16254 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
16255 | // t is exported | ||
16256 | // f is exported | ||
16257 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
16258 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
16259 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
16260 | var_virtual0 == var_t; | ||
16261 | } | ||
16262 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noStateInRegion | ||
16263 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
16264 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16265 | var_region) | ||
16266 | { | ||
16267 | find interpretation(problem,interpretation); | ||
16268 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
16269 | // region is exported | ||
16270 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
16271 | } | ||
16272 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
16273 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16274 | var_region) | ||
16275 | { | ||
16276 | find interpretation(problem,interpretation); | ||
16277 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
16278 | // region is exported | ||
16279 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
16280 | } | ||
16281 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
16282 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16283 | var_region) | ||
16284 | { | ||
16285 | find interpretation(problem,interpretation); | ||
16286 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
16287 | // region is exported | ||
16288 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
16289 | } | ||
16290 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries StateInRegion | ||
16291 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
16292 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16293 | var_region, var_state) | ||
16294 | { | ||
16295 | find interpretation(problem,interpretation); | ||
16296 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
16297 | find mustInstanceOfState_class(problem,interpretation,var_state); | ||
16298 | // region is exported | ||
16299 | // state is exported | ||
16300 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
16301 | find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
16302 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
16303 | var_virtual0 == var_state; | ||
16304 | } | ||
16305 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
16306 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16307 | var_region, var_state) | ||
16308 | { | ||
16309 | find interpretation(problem,interpretation); | ||
16310 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
16311 | find mayInstanceOfState_class(problem,interpretation,var_state); | ||
16312 | // region is exported | ||
16313 | // state is exported | ||
16314 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
16315 | find mayInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
16316 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
16317 | find mayEquivalent(problem, interpretation, var_virtual0, var_state); | ||
16318 | } | ||
16319 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
16320 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16321 | var_region, var_state) | ||
16322 | { | ||
16323 | find interpretation(problem,interpretation); | ||
16324 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
16325 | find mustInstanceOfState_class(problem,interpretation,var_state); | ||
16326 | // region is exported | ||
16327 | // state is exported | ||
16328 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
16329 | find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
16330 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
16331 | var_virtual0 == var_state; | ||
16332 | } | ||
16333 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoOutgoing | ||
16334 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
16335 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16336 | var_c) | ||
16337 | { | ||
16338 | find interpretation(problem,interpretation); | ||
16339 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
16340 | // c is exported | ||
16341 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
16342 | } | ||
16343 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
16344 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16345 | var_c) | ||
16346 | { | ||
16347 | find interpretation(problem,interpretation); | ||
16348 | find mayInstanceOfChoice_class(problem,interpretation,var_c); | ||
16349 | // c is exported | ||
16350 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
16351 | } | ||
16352 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
16353 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16354 | var_c) | ||
16355 | { | ||
16356 | find interpretation(problem,interpretation); | ||
16357 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
16358 | // c is exported | ||
16359 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
16360 | } | ||
16361 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoIncoming | ||
16362 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
16363 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16364 | var_c) | ||
16365 | { | ||
16366 | find interpretation(problem,interpretation); | ||
16367 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
16368 | // c is exported | ||
16369 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
16370 | } | ||
16371 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
16372 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16373 | var_c) | ||
16374 | { | ||
16375 | find interpretation(problem,interpretation); | ||
16376 | find mayInstanceOfChoice_class(problem,interpretation,var_c); | ||
16377 | // c is exported | ||
16378 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
16379 | } | ||
16380 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
16381 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16382 | var_c) | ||
16383 | { | ||
16384 | find interpretation(problem,interpretation); | ||
16385 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
16386 | // c is exported | ||
16387 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
16388 | } | ||
16389 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoOutgoing | ||
16390 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
16391 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16392 | var_s) | ||
16393 | { | ||
16394 | find interpretation(problem,interpretation); | ||
16395 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16396 | // s is exported | ||
16397 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
16398 | } | ||
16399 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
16400 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16401 | var_s) | ||
16402 | { | ||
16403 | find interpretation(problem,interpretation); | ||
16404 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16405 | // s is exported | ||
16406 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
16407 | } | ||
16408 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
16409 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16410 | var_s) | ||
16411 | { | ||
16412 | find interpretation(problem,interpretation); | ||
16413 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16414 | // s is exported | ||
16415 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
16416 | } | ||
16417 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoIncoming | ||
16418 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
16419 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16420 | var_s) | ||
16421 | { | ||
16422 | find interpretation(problem,interpretation); | ||
16423 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16424 | // s is exported | ||
16425 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
16426 | } | ||
16427 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
16428 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16429 | var_s) | ||
16430 | { | ||
16431 | find interpretation(problem,interpretation); | ||
16432 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16433 | // s is exported | ||
16434 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
16435 | } | ||
16436 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
16437 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16438 | var_s) | ||
16439 | { | ||
16440 | find interpretation(problem,interpretation); | ||
16441 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16442 | // s is exported | ||
16443 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
16444 | } | ||
16445 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedIncomingInSameRegion | ||
16446 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
16447 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16448 | var_s, var_v1, var_v2) | ||
16449 | { | ||
16450 | find interpretation(problem,interpretation); | ||
16451 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16452 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
16453 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
16454 | // s is exported | ||
16455 | // v1 is exported | ||
16456 | // v2 is exported | ||
16457 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
16458 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
16459 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
16460 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
16461 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
16462 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
16463 | var_virtual0 == var_v1; | ||
16464 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
16465 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
16466 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
16467 | var_virtual1 == var_v2; | ||
16468 | }or{ | ||
16469 | find interpretation(problem,interpretation); | ||
16470 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16471 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
16472 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
16473 | // s is exported | ||
16474 | // v1 is exported | ||
16475 | // v2 is exported | ||
16476 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
16477 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
16478 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
16479 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
16480 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
16481 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
16482 | var_virtual0 == var_v1; | ||
16483 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
16484 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
16485 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
16486 | var_virtual1 == var_v2; | ||
16487 | } | ||
16488 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
16489 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16490 | var_s, var_v1, var_v2) | ||
16491 | { | ||
16492 | find interpretation(problem,interpretation); | ||
16493 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16494 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
16495 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
16496 | // s is exported | ||
16497 | // v1 is exported | ||
16498 | // v2 is exported | ||
16499 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
16500 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
16501 | var_t1 != var_t2; | ||
16502 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
16503 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
16504 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
16505 | find mayEquivalent(problem, interpretation, var_virtual0, var_v1); | ||
16506 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
16507 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
16508 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
16509 | find mayEquivalent(problem, interpretation, var_virtual1, var_v2); | ||
16510 | }or{ | ||
16511 | find interpretation(problem,interpretation); | ||
16512 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16513 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
16514 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
16515 | // s is exported | ||
16516 | // v1 is exported | ||
16517 | // v2 is exported | ||
16518 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
16519 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
16520 | var_t1 != var_t2; | ||
16521 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
16522 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
16523 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
16524 | find mayEquivalent(problem, interpretation, var_virtual0, var_v1); | ||
16525 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
16526 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
16527 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
16528 | find mayEquivalent(problem, interpretation, var_virtual1, var_v2); | ||
16529 | } | ||
16530 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
16531 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16532 | var_s, var_v1, var_v2) | ||
16533 | { | ||
16534 | find interpretation(problem,interpretation); | ||
16535 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16536 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
16537 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
16538 | // s is exported | ||
16539 | // v1 is exported | ||
16540 | // v2 is exported | ||
16541 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
16542 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
16543 | var_t1 != var_t2; | ||
16544 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
16545 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
16546 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
16547 | var_virtual0 == var_v1; | ||
16548 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
16549 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
16550 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
16551 | var_virtual1 == var_v2; | ||
16552 | }or{ | ||
16553 | find interpretation(problem,interpretation); | ||
16554 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16555 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
16556 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
16557 | // s is exported | ||
16558 | // v1 is exported | ||
16559 | // v2 is exported | ||
16560 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
16561 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
16562 | var_t1 != var_t2; | ||
16563 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
16564 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
16565 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
16566 | var_virtual0 == var_v1; | ||
16567 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
16568 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
16569 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
16570 | var_virtual1 == var_v2; | ||
16571 | } | ||
16572 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries notSynchronizingStates | ||
16573 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
16574 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16575 | var_s) | ||
16576 | { | ||
16577 | find interpretation(problem,interpretation); | ||
16578 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16579 | // s is exported | ||
16580 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
16581 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
16582 | } | ||
16583 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
16584 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16585 | var_s) | ||
16586 | { | ||
16587 | find interpretation(problem,interpretation); | ||
16588 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16589 | // s is exported | ||
16590 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
16591 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
16592 | } | ||
16593 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
16594 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16595 | var_s) | ||
16596 | { | ||
16597 | find interpretation(problem,interpretation); | ||
16598 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16599 | // s is exported | ||
16600 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
16601 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
16602 | } | ||
16603 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleOutgoingTrainsition | ||
16604 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
16605 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16606 | var_v) | ||
16607 | { | ||
16608 | find interpretation(problem,interpretation); | ||
16609 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
16610 | // v is exported | ||
16611 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
16612 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
16613 | neg find mayEquivalent(problem, interpretation, var_trg1, var_trg2); | ||
16614 | } | ||
16615 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
16616 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16617 | var_v) | ||
16618 | { | ||
16619 | find interpretation(problem,interpretation); | ||
16620 | find mayInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
16621 | // v is exported | ||
16622 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
16623 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
16624 | var_trg1 != var_trg2; | ||
16625 | } | ||
16626 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
16627 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16628 | var_v) | ||
16629 | { | ||
16630 | find interpretation(problem,interpretation); | ||
16631 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
16632 | // v is exported | ||
16633 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
16634 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
16635 | var_trg1 != var_trg2; | ||
16636 | } | ||
16637 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleIncomingTrainsition | ||
16638 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
16639 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16640 | var_v) | ||
16641 | { | ||
16642 | find interpretation(problem,interpretation); | ||
16643 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
16644 | // v is exported | ||
16645 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
16646 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
16647 | neg find mayEquivalent(problem, interpretation, var_src1, var_src2); | ||
16648 | } | ||
16649 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
16650 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16651 | var_v) | ||
16652 | { | ||
16653 | find interpretation(problem,interpretation); | ||
16654 | find mayInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
16655 | // v is exported | ||
16656 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
16657 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
16658 | var_src1 != var_src2; | ||
16659 | } | ||
16660 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
16661 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16662 | var_v) | ||
16663 | { | ||
16664 | find interpretation(problem,interpretation); | ||
16665 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
16666 | // v is exported | ||
16667 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
16668 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
16669 | var_src1 != var_src2; | ||
16670 | } | ||
16671 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionsAreNotSiblings | ||
16672 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
16673 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16674 | var_s, var_v1, var_v2) | ||
16675 | { | ||
16676 | find interpretation(problem,interpretation); | ||
16677 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16678 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
16679 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
16680 | // s is exported | ||
16681 | // v1 is exported | ||
16682 | // v2 is exported | ||
16683 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
16684 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
16685 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
16686 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
16687 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
16688 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
16689 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
16690 | var_virtual1 == var_v1; | ||
16691 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
16692 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
16693 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
16694 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
16695 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
16696 | var_virtual3 == var_v2; | ||
16697 | neg find mayEquivalent(problem, interpretation, var_r1, var_r2); | ||
16698 | }or{ | ||
16699 | find interpretation(problem,interpretation); | ||
16700 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16701 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
16702 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
16703 | // s is exported | ||
16704 | // v1 is exported | ||
16705 | // v2 is exported | ||
16706 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
16707 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
16708 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
16709 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
16710 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
16711 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
16712 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
16713 | var_virtual1 == var_v1; | ||
16714 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
16715 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
16716 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
16717 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
16718 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
16719 | var_virtual3 == var_v2; | ||
16720 | neg find mayEquivalent(problem, interpretation, var_r1, var_r2); | ||
16721 | } | ||
16722 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
16723 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16724 | var_s, var_v1, var_v2) | ||
16725 | { | ||
16726 | find interpretation(problem,interpretation); | ||
16727 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16728 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
16729 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
16730 | // s is exported | ||
16731 | // v1 is exported | ||
16732 | // v2 is exported | ||
16733 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
16734 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
16735 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
16736 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
16737 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
16738 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
16739 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
16740 | find mayEquivalent(problem, interpretation, var_virtual1, var_v1); | ||
16741 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
16742 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
16743 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
16744 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
16745 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
16746 | find mayEquivalent(problem, interpretation, var_virtual3, var_v2); | ||
16747 | var_r1 != var_r2; | ||
16748 | }or{ | ||
16749 | find interpretation(problem,interpretation); | ||
16750 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16751 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
16752 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
16753 | // s is exported | ||
16754 | // v1 is exported | ||
16755 | // v2 is exported | ||
16756 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
16757 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
16758 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
16759 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
16760 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
16761 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
16762 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
16763 | find mayEquivalent(problem, interpretation, var_virtual1, var_v1); | ||
16764 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
16765 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
16766 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
16767 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
16768 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
16769 | find mayEquivalent(problem, interpretation, var_virtual3, var_v2); | ||
16770 | var_r1 != var_r2; | ||
16771 | } | ||
16772 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
16773 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16774 | var_s, var_v1, var_v2) | ||
16775 | { | ||
16776 | find interpretation(problem,interpretation); | ||
16777 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16778 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
16779 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
16780 | // s is exported | ||
16781 | // v1 is exported | ||
16782 | // v2 is exported | ||
16783 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
16784 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
16785 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
16786 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
16787 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
16788 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
16789 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
16790 | var_virtual1 == var_v1; | ||
16791 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
16792 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
16793 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
16794 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
16795 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
16796 | var_virtual3 == var_v2; | ||
16797 | var_r1 != var_r2; | ||
16798 | }or{ | ||
16799 | find interpretation(problem,interpretation); | ||
16800 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16801 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
16802 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
16803 | // s is exported | ||
16804 | // v1 is exported | ||
16805 | // v2 is exported | ||
16806 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
16807 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
16808 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
16809 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
16810 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
16811 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
16812 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
16813 | var_virtual1 == var_v1; | ||
16814 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
16815 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
16816 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
16817 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
16818 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
16819 | var_virtual3 == var_v2; | ||
16820 | var_r1 != var_r2; | ||
16821 | } | ||
16822 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries child | ||
16823 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
16824 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16825 | var_parent, var_child) | ||
16826 | { | ||
16827 | find interpretation(problem,interpretation); | ||
16828 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
16829 | find mustInstanceOfVertex_class(problem,interpretation,var_child); | ||
16830 | // parent is exported | ||
16831 | // child is exported | ||
16832 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
16833 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
16834 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
16835 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
16836 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
16837 | var_virtual1 == var_child; | ||
16838 | } | ||
16839 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
16840 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16841 | var_parent, var_child) | ||
16842 | { | ||
16843 | find interpretation(problem,interpretation); | ||
16844 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
16845 | find mayInstanceOfVertex_class(problem,interpretation,var_child); | ||
16846 | // parent is exported | ||
16847 | // child is exported | ||
16848 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
16849 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
16850 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
16851 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
16852 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
16853 | find mayEquivalent(problem, interpretation, var_virtual1, var_child); | ||
16854 | } | ||
16855 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
16856 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16857 | var_parent, var_child) | ||
16858 | { | ||
16859 | find interpretation(problem,interpretation); | ||
16860 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
16861 | find mustInstanceOfVertex_class(problem,interpretation,var_child); | ||
16862 | // parent is exported | ||
16863 | // child is exported | ||
16864 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
16865 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
16866 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
16867 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
16868 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
16869 | var_virtual1 == var_child; | ||
16870 | } | ||
16871 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionDoesNotHaveMultipleRegions | ||
16872 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
16873 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16874 | var_s, var_v) | ||
16875 | { | ||
16876 | find interpretation(problem,interpretation); | ||
16877 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16878 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
16879 | // s is exported | ||
16880 | // v is exported | ||
16881 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
16882 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
16883 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
16884 | }or{ | ||
16885 | find interpretation(problem,interpretation); | ||
16886 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16887 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
16888 | // s is exported | ||
16889 | // v is exported | ||
16890 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
16891 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
16892 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
16893 | } | ||
16894 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
16895 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16896 | var_s, var_v) | ||
16897 | { | ||
16898 | find interpretation(problem,interpretation); | ||
16899 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16900 | find mayInstanceOfVertex_class(problem,interpretation,var_v); | ||
16901 | // s is exported | ||
16902 | // v is exported | ||
16903 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
16904 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
16905 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
16906 | }or{ | ||
16907 | find interpretation(problem,interpretation); | ||
16908 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16909 | find mayInstanceOfVertex_class(problem,interpretation,var_v); | ||
16910 | // s is exported | ||
16911 | // v is exported | ||
16912 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
16913 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
16914 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
16915 | } | ||
16916 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
16917 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16918 | var_s, var_v) | ||
16919 | { | ||
16920 | find interpretation(problem,interpretation); | ||
16921 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16922 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
16923 | // s is exported | ||
16924 | // v is exported | ||
16925 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
16926 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
16927 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
16928 | }or{ | ||
16929 | find interpretation(problem,interpretation); | ||
16930 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16931 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
16932 | // s is exported | ||
16933 | // v is exported | ||
16934 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
16935 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
16936 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
16937 | } | ||
16938 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleRegions | ||
16939 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
16940 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16941 | var_composite) | ||
16942 | { | ||
16943 | find interpretation(problem,interpretation); | ||
16944 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
16945 | // composite is exported | ||
16946 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
16947 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
16948 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
16949 | var_virtual0 == var_region1; | ||
16950 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
16951 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
16952 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
16953 | var_virtual1 == var_region2; | ||
16954 | neg find mayEquivalent(problem, interpretation, var_region1, var_region2); | ||
16955 | } | ||
16956 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
16957 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16958 | var_composite) | ||
16959 | { | ||
16960 | find interpretation(problem,interpretation); | ||
16961 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
16962 | // composite is exported | ||
16963 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
16964 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
16965 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
16966 | find mayEquivalent(problem, interpretation, var_virtual0, var_region1); | ||
16967 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
16968 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
16969 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
16970 | find mayEquivalent(problem, interpretation, var_virtual1, var_region2); | ||
16971 | var_region1 != var_region2; | ||
16972 | } | ||
16973 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
16974 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16975 | var_composite) | ||
16976 | { | ||
16977 | find interpretation(problem,interpretation); | ||
16978 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
16979 | // composite is exported | ||
16980 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
16981 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
16982 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
16983 | var_virtual0 == var_region1; | ||
16984 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
16985 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
16986 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
16987 | var_virtual1 == var_region2; | ||
16988 | var_region1 != var_region2; | ||
16989 | } | ||
16990 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchThree | ||
16991 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
16992 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
16993 | var_s) | ||
16994 | { | ||
16995 | find interpretation(problem,interpretation); | ||
16996 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
16997 | // s is exported | ||
16998 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
16999 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
17000 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
17001 | var_virtual0 == var_s; | ||
17002 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
17003 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
17004 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
17005 | var_virtual1 == var_s; | ||
17006 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
17007 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
17008 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
17009 | var_virtual2 == var_s; | ||
17010 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
17011 | neg find mayEquivalent(problem, interpretation, var_t2, var_t3); | ||
17012 | neg find mayEquivalent(problem, interpretation, var_t1, var_t3); | ||
17013 | }or{ | ||
17014 | find interpretation(problem,interpretation); | ||
17015 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
17016 | // s is exported | ||
17017 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
17018 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
17019 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
17020 | var_virtual0 == var_s; | ||
17021 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
17022 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
17023 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
17024 | var_virtual1 == var_s; | ||
17025 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
17026 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
17027 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
17028 | var_virtual2 == var_s; | ||
17029 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
17030 | neg find mayEquivalent(problem, interpretation, var_t2, var_t3); | ||
17031 | neg find mayEquivalent(problem, interpretation, var_t1, var_t3); | ||
17032 | } | ||
17033 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
17034 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17035 | var_s) | ||
17036 | { | ||
17037 | find interpretation(problem,interpretation); | ||
17038 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
17039 | // s is exported | ||
17040 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
17041 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
17042 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
17043 | find mayEquivalent(problem, interpretation, var_virtual0, var_s); | ||
17044 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
17045 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
17046 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
17047 | find mayEquivalent(problem, interpretation, var_virtual1, var_s); | ||
17048 | find mayInstanceOfTransition_class(problem,interpretation,var_t3); | ||
17049 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
17050 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
17051 | find mayEquivalent(problem, interpretation, var_virtual2, var_s); | ||
17052 | var_t1 != var_t2; | ||
17053 | var_t2 != var_t3; | ||
17054 | var_t1 != var_t3; | ||
17055 | }or{ | ||
17056 | find interpretation(problem,interpretation); | ||
17057 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
17058 | // s is exported | ||
17059 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
17060 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
17061 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
17062 | find mayEquivalent(problem, interpretation, var_virtual0, var_s); | ||
17063 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
17064 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
17065 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
17066 | find mayEquivalent(problem, interpretation, var_virtual1, var_s); | ||
17067 | find mayInstanceOfTransition_class(problem,interpretation,var_t3); | ||
17068 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
17069 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
17070 | find mayEquivalent(problem, interpretation, var_virtual2, var_s); | ||
17071 | var_t1 != var_t2; | ||
17072 | var_t2 != var_t3; | ||
17073 | var_t1 != var_t3; | ||
17074 | } | ||
17075 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
17076 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17077 | var_s) | ||
17078 | { | ||
17079 | find interpretation(problem,interpretation); | ||
17080 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
17081 | // s is exported | ||
17082 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
17083 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
17084 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
17085 | var_virtual0 == var_s; | ||
17086 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
17087 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
17088 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
17089 | var_virtual1 == var_s; | ||
17090 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
17091 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
17092 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
17093 | var_virtual2 == var_s; | ||
17094 | var_t1 != var_t2; | ||
17095 | var_t2 != var_t3; | ||
17096 | var_t1 != var_t3; | ||
17097 | }or{ | ||
17098 | find interpretation(problem,interpretation); | ||
17099 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
17100 | // s is exported | ||
17101 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
17102 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
17103 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
17104 | var_virtual0 == var_s; | ||
17105 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
17106 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
17107 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
17108 | var_virtual1 == var_s; | ||
17109 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
17110 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
17111 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
17112 | var_virtual2 == var_s; | ||
17113 | var_t1 != var_t2; | ||
17114 | var_t2 != var_t3; | ||
17115 | var_t1 != var_t3; | ||
17116 | } | ||
17117 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries twoSynch | ||
17118 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
17119 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17120 | var_s1, var_s2) | ||
17121 | { | ||
17122 | find interpretation(problem,interpretation); | ||
17123 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
17124 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
17125 | // s1 is exported | ||
17126 | // s2 is exported | ||
17127 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
17128 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
17129 | neg find mayEquivalent(problem, interpretation, var_s1, var_s2); | ||
17130 | } | ||
17131 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
17132 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17133 | var_s1, var_s2) | ||
17134 | { | ||
17135 | find interpretation(problem,interpretation); | ||
17136 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
17137 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
17138 | // s1 is exported | ||
17139 | // s2 is exported | ||
17140 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
17141 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
17142 | var_s1 != var_s2; | ||
17143 | } | ||
17144 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
17145 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17146 | var_s1, var_s2) | ||
17147 | { | ||
17148 | find interpretation(problem,interpretation); | ||
17149 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
17150 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
17151 | // s1 is exported | ||
17152 | // s2 is exported | ||
17153 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
17154 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
17155 | var_s1 != var_s2; | ||
17156 | } | ||
17157 | |||
17158 | ////////// | ||
17159 | // 1.4 Containment Indexer | ||
17160 | ////////// | ||
17161 | private pattern mustContains2(source: DefinedElement, target: DefinedElement) { | ||
17162 | find mustContains4(_,_,source,target); | ||
17163 | } | ||
17164 | |||
17165 | private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17166 | source: DefinedElement, target: DefinedElement) | ||
17167 | { find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target); }or | ||
17168 | |||
17169 | { find mustInRelationvertices_reference_Region(problem,interpretation,source,target); }or | ||
17170 | |||
17171 | { find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target); } | ||
17172 | |||
17173 | private pattern mustTransitiveContains(source,target) { | ||
17174 | find mustContains2+(source,target); | ||
17175 | } | ||
17176 | |||
17177 | ////////// | ||
17178 | // 2. Invalidation Indexers | ||
17179 | ////////// | ||
17180 | // 2.1 Invalidated by WF Queries | ||
17181 | ////////// | ||
17182 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17183 | var_r1) | ||
17184 | { | ||
17185 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1); | ||
17186 | } | ||
17187 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17188 | var_r) | ||
17189 | { | ||
17190 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r); | ||
17191 | } | ||
17192 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17193 | var_t, var_e) | ||
17194 | { | ||
17195 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e); | ||
17196 | } | ||
17197 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17198 | var_e) | ||
17199 | { | ||
17200 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e); | ||
17201 | } | ||
17202 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17203 | var_e, var_t1, var_t2) | ||
17204 | { | ||
17205 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2); | ||
17206 | } | ||
17207 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17208 | var_t, var_e) | ||
17209 | { | ||
17210 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e); | ||
17211 | } | ||
17212 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17213 | var_t, var_f) | ||
17214 | { | ||
17215 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f); | ||
17216 | } | ||
17217 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17218 | var_region) | ||
17219 | { | ||
17220 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region); | ||
17221 | } | ||
17222 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17223 | var_c) | ||
17224 | { | ||
17225 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c); | ||
17226 | } | ||
17227 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17228 | var_c) | ||
17229 | { | ||
17230 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c); | ||
17231 | } | ||
17232 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17233 | var_s) | ||
17234 | { | ||
17235 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s); | ||
17236 | } | ||
17237 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17238 | var_s) | ||
17239 | { | ||
17240 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s); | ||
17241 | } | ||
17242 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17243 | var_s, var_v1, var_v2) | ||
17244 | { | ||
17245 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2); | ||
17246 | } | ||
17247 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17248 | var_s) | ||
17249 | { | ||
17250 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s); | ||
17251 | } | ||
17252 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17253 | var_s, var_v1, var_v2) | ||
17254 | { | ||
17255 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2); | ||
17256 | } | ||
17257 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17258 | var_s, var_v) | ||
17259 | { | ||
17260 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v); | ||
17261 | } | ||
17262 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17263 | var_s) | ||
17264 | { | ||
17265 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s); | ||
17266 | } | ||
17267 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17268 | var_s1, var_s2) | ||
17269 | { | ||
17270 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2); | ||
17271 | } | ||
17272 | |||
17273 | ////////// | ||
17274 | // 3. Unfinishedness Indexers | ||
17275 | ////////// | ||
17276 | // 3.1 Unfinishedness Measured by Multiplicity | ||
17277 | ////////// | ||
17278 | pattern unfinishedLowerMultiplicity_target_reference_Transition(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
17279 | find interpretation(problem,interpretation); | ||
17280 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
17281 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition"); | ||
17282 | find mustInstanceOfTransition_class(problem,interpretation,object); | ||
17283 | numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,object,_); | ||
17284 | check(numberOfExistingReferences < 1); | ||
17285 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
17286 | } | ||
17287 | |||
17288 | ////////// | ||
17289 | // 3.2 Unfinishedness Measured by WF Queries | ||
17290 | ////////// | ||
17291 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17292 | var_r1) | ||
17293 | { | ||
17294 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1); | ||
17295 | } | ||
17296 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17297 | var_r) | ||
17298 | { | ||
17299 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r); | ||
17300 | } | ||
17301 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17302 | var_t, var_e) | ||
17303 | { | ||
17304 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e); | ||
17305 | } | ||
17306 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17307 | var_e) | ||
17308 | { | ||
17309 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e); | ||
17310 | } | ||
17311 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17312 | var_e, var_t1, var_t2) | ||
17313 | { | ||
17314 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2); | ||
17315 | } | ||
17316 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17317 | var_t, var_e) | ||
17318 | { | ||
17319 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e); | ||
17320 | } | ||
17321 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17322 | var_t, var_f) | ||
17323 | { | ||
17324 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f); | ||
17325 | } | ||
17326 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17327 | var_region) | ||
17328 | { | ||
17329 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region); | ||
17330 | } | ||
17331 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17332 | var_c) | ||
17333 | { | ||
17334 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c); | ||
17335 | } | ||
17336 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17337 | var_c) | ||
17338 | { | ||
17339 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c); | ||
17340 | } | ||
17341 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17342 | var_s) | ||
17343 | { | ||
17344 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s); | ||
17345 | } | ||
17346 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17347 | var_s) | ||
17348 | { | ||
17349 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s); | ||
17350 | } | ||
17351 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17352 | var_s, var_v1, var_v2) | ||
17353 | { | ||
17354 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2); | ||
17355 | } | ||
17356 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17357 | var_s) | ||
17358 | { | ||
17359 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s); | ||
17360 | } | ||
17361 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17362 | var_s, var_v1, var_v2) | ||
17363 | { | ||
17364 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2); | ||
17365 | } | ||
17366 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17367 | var_s, var_v) | ||
17368 | { | ||
17369 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v); | ||
17370 | } | ||
17371 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17372 | var_s) | ||
17373 | { | ||
17374 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s); | ||
17375 | } | ||
17376 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation, | ||
17377 | var_s1, var_s2) | ||
17378 | { | ||
17379 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2); | ||
17380 | } | ||
17381 | |||
17382 | ////////// | ||
17383 | // 4. Refinement Indexers | ||
17384 | ////////// | ||
17385 | // 4.1 Object constructors | ||
17386 | ////////// | ||
17387 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) | ||
17388 | { | ||
17389 | find interpretation(problem,interpretation); | ||
17390 | find mustInstanceOfPseudostate_class(problem,interpretation,root); | ||
17391 | find mustExist(problem, interpretation, root); | ||
17392 | }or{ | ||
17393 | find interpretation(problem,interpretation); | ||
17394 | find mustInstanceOfEntry_class(problem,interpretation,root); | ||
17395 | find mustExist(problem, interpretation, root); | ||
17396 | }or{ | ||
17397 | find interpretation(problem,interpretation); | ||
17398 | find mustInstanceOfTransition_class(problem,interpretation,root); | ||
17399 | find mustExist(problem, interpretation, root); | ||
17400 | }or{ | ||
17401 | find interpretation(problem,interpretation); | ||
17402 | find mustInstanceOfCompositeElement_class(problem,interpretation,root); | ||
17403 | find mustExist(problem, interpretation, root); | ||
17404 | }or{ | ||
17405 | find interpretation(problem,interpretation); | ||
17406 | find mustInstanceOfState_class(problem,interpretation,root); | ||
17407 | find mustExist(problem, interpretation, root); | ||
17408 | }or{ | ||
17409 | find interpretation(problem,interpretation); | ||
17410 | find mustInstanceOfChoice_class(problem,interpretation,root); | ||
17411 | find mustExist(problem, interpretation, root); | ||
17412 | }or{ | ||
17413 | find interpretation(problem,interpretation); | ||
17414 | find mustInstanceOfRegularState_class(problem,interpretation,root); | ||
17415 | find mustExist(problem, interpretation, root); | ||
17416 | }or{ | ||
17417 | find interpretation(problem,interpretation); | ||
17418 | find mustInstanceOfRegion_class(problem,interpretation,root); | ||
17419 | find mustExist(problem, interpretation, root); | ||
17420 | }or{ | ||
17421 | find interpretation(problem,interpretation); | ||
17422 | find mustInstanceOfVertex_class(problem,interpretation,root); | ||
17423 | find mustExist(problem, interpretation, root); | ||
17424 | }or{ | ||
17425 | find interpretation(problem,interpretation); | ||
17426 | find mustInstanceOfExit_class(problem,interpretation,root); | ||
17427 | find mustExist(problem, interpretation, root); | ||
17428 | }or{ | ||
17429 | find interpretation(problem,interpretation); | ||
17430 | find mustInstanceOfFinalState_class(problem,interpretation,root); | ||
17431 | find mustExist(problem, interpretation, root); | ||
17432 | }or{ | ||
17433 | find interpretation(problem,interpretation); | ||
17434 | find mustInstanceOfSynchronization_class(problem,interpretation,root); | ||
17435 | find mustExist(problem, interpretation, root); | ||
17436 | }or{ | ||
17437 | find interpretation(problem,interpretation); | ||
17438 | find mustInstanceOfStatechart_class(problem,interpretation,root); | ||
17439 | find mustExist(problem, interpretation, root); | ||
17440 | }or{ | ||
17441 | find interpretation(problem,interpretation); | ||
17442 | find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,root); | ||
17443 | find mustExist(problem, interpretation, root); | ||
17444 | }or{ | ||
17445 | find interpretation(problem,interpretation); | ||
17446 | find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,root); | ||
17447 | find mustExist(problem, interpretation, root); | ||
17448 | }or{ | ||
17449 | find interpretation(problem,interpretation); | ||
17450 | find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,root); | ||
17451 | find mustExist(problem, interpretation, root); | ||
17452 | }or{ | ||
17453 | find interpretation(problem,interpretation); | ||
17454 | find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,root); | ||
17455 | find mustExist(problem, interpretation, root); | ||
17456 | } | ||
17457 | pattern createObject_State_class_by_vertices_reference_Region( | ||
17458 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17459 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
17460 | container:DefinedElement) | ||
17461 | { | ||
17462 | find interpretation(problem,interpretation); | ||
17463 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17464 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class"); | ||
17465 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
17466 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
17467 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
17468 | find mayInstanceOfState_class(problem,interpretation,newObject); | ||
17469 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
17470 | find mustExist(problem, interpretation, container); | ||
17471 | neg find mustExist(problem, interpretation, newObject); | ||
17472 | } | ||
17473 | pattern createObject_State_class( | ||
17474 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17475 | typeInterpretation:PartialComplexTypeInterpretation) | ||
17476 | { | ||
17477 | find interpretation(problem,interpretation); | ||
17478 | neg find hasElementInContainment(problem,interpretation); | ||
17479 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17480 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class"); | ||
17481 | find mayInstanceOfState_class(problem,interpretation,newObject); | ||
17482 | find mayExist(problem, interpretation, newObject); | ||
17483 | neg find mustExist(problem, interpretation, newObject); | ||
17484 | } | ||
17485 | pattern createObject_FinalState_class_by_vertices_reference_Region( | ||
17486 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17487 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
17488 | container:DefinedElement) | ||
17489 | { | ||
17490 | find interpretation(problem,interpretation); | ||
17491 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17492 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class"); | ||
17493 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
17494 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
17495 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
17496 | find mayInstanceOfFinalState_class(problem,interpretation,newObject); | ||
17497 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
17498 | find mustExist(problem, interpretation, container); | ||
17499 | neg find mustExist(problem, interpretation, newObject); | ||
17500 | } | ||
17501 | pattern createObject_FinalState_class( | ||
17502 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17503 | typeInterpretation:PartialComplexTypeInterpretation) | ||
17504 | { | ||
17505 | find interpretation(problem,interpretation); | ||
17506 | neg find hasElementInContainment(problem,interpretation); | ||
17507 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17508 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class"); | ||
17509 | find mayInstanceOfFinalState_class(problem,interpretation,newObject); | ||
17510 | find mayExist(problem, interpretation, newObject); | ||
17511 | neg find mustExist(problem, interpretation, newObject); | ||
17512 | } | ||
17513 | pattern createObject_Synchronization_class_by_vertices_reference_Region( | ||
17514 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17515 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
17516 | container:DefinedElement) | ||
17517 | { | ||
17518 | find interpretation(problem,interpretation); | ||
17519 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17520 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class"); | ||
17521 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
17522 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
17523 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
17524 | find mayInstanceOfSynchronization_class(problem,interpretation,newObject); | ||
17525 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
17526 | find mustExist(problem, interpretation, container); | ||
17527 | neg find mustExist(problem, interpretation, newObject); | ||
17528 | } | ||
17529 | pattern createObject_Synchronization_class( | ||
17530 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17531 | typeInterpretation:PartialComplexTypeInterpretation) | ||
17532 | { | ||
17533 | find interpretation(problem,interpretation); | ||
17534 | neg find hasElementInContainment(problem,interpretation); | ||
17535 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17536 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class"); | ||
17537 | find mayInstanceOfSynchronization_class(problem,interpretation,newObject); | ||
17538 | find mayExist(problem, interpretation, newObject); | ||
17539 | neg find mustExist(problem, interpretation, newObject); | ||
17540 | } | ||
17541 | pattern createObject_Region_class_by_regions_reference_CompositeElement( | ||
17542 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17543 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
17544 | container:DefinedElement) | ||
17545 | { | ||
17546 | find interpretation(problem,interpretation); | ||
17547 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17548 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class"); | ||
17549 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
17550 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"regions reference CompositeElement"); | ||
17551 | find mustInstanceOfCompositeElement_class(problem,interpretation,container); | ||
17552 | find mayInstanceOfRegion_class(problem,interpretation,newObject); | ||
17553 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,container,newObject); | ||
17554 | find mustExist(problem, interpretation, container); | ||
17555 | neg find mustExist(problem, interpretation, newObject); | ||
17556 | } | ||
17557 | pattern createObject_Region_class( | ||
17558 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17559 | typeInterpretation:PartialComplexTypeInterpretation) | ||
17560 | { | ||
17561 | find interpretation(problem,interpretation); | ||
17562 | neg find hasElementInContainment(problem,interpretation); | ||
17563 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17564 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class"); | ||
17565 | find mayInstanceOfRegion_class(problem,interpretation,newObject); | ||
17566 | find mayExist(problem, interpretation, newObject); | ||
17567 | neg find mustExist(problem, interpretation, newObject); | ||
17568 | } | ||
17569 | pattern createObject_Entry_class_by_vertices_reference_Region( | ||
17570 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17571 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
17572 | container:DefinedElement) | ||
17573 | { | ||
17574 | find interpretation(problem,interpretation); | ||
17575 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17576 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class"); | ||
17577 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
17578 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
17579 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
17580 | find mayInstanceOfEntry_class(problem,interpretation,newObject); | ||
17581 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
17582 | find mustExist(problem, interpretation, container); | ||
17583 | neg find mustExist(problem, interpretation, newObject); | ||
17584 | } | ||
17585 | pattern createObject_Entry_class( | ||
17586 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17587 | typeInterpretation:PartialComplexTypeInterpretation) | ||
17588 | { | ||
17589 | find interpretation(problem,interpretation); | ||
17590 | neg find hasElementInContainment(problem,interpretation); | ||
17591 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17592 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class"); | ||
17593 | find mayInstanceOfEntry_class(problem,interpretation,newObject); | ||
17594 | find mayExist(problem, interpretation, newObject); | ||
17595 | neg find mustExist(problem, interpretation, newObject); | ||
17596 | } | ||
17597 | pattern createObject_Exit_class_by_vertices_reference_Region( | ||
17598 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17599 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
17600 | container:DefinedElement) | ||
17601 | { | ||
17602 | find interpretation(problem,interpretation); | ||
17603 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17604 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class"); | ||
17605 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
17606 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
17607 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
17608 | find mayInstanceOfExit_class(problem,interpretation,newObject); | ||
17609 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
17610 | find mustExist(problem, interpretation, container); | ||
17611 | neg find mustExist(problem, interpretation, newObject); | ||
17612 | } | ||
17613 | pattern createObject_Exit_class( | ||
17614 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17615 | typeInterpretation:PartialComplexTypeInterpretation) | ||
17616 | { | ||
17617 | find interpretation(problem,interpretation); | ||
17618 | neg find hasElementInContainment(problem,interpretation); | ||
17619 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17620 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class"); | ||
17621 | find mayInstanceOfExit_class(problem,interpretation,newObject); | ||
17622 | find mayExist(problem, interpretation, newObject); | ||
17623 | neg find mustExist(problem, interpretation, newObject); | ||
17624 | } | ||
17625 | pattern createObject_Choice_class_by_vertices_reference_Region( | ||
17626 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17627 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
17628 | container:DefinedElement) | ||
17629 | { | ||
17630 | find interpretation(problem,interpretation); | ||
17631 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17632 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class"); | ||
17633 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
17634 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
17635 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
17636 | find mayInstanceOfChoice_class(problem,interpretation,newObject); | ||
17637 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
17638 | find mustExist(problem, interpretation, container); | ||
17639 | neg find mustExist(problem, interpretation, newObject); | ||
17640 | } | ||
17641 | pattern createObject_Choice_class( | ||
17642 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17643 | typeInterpretation:PartialComplexTypeInterpretation) | ||
17644 | { | ||
17645 | find interpretation(problem,interpretation); | ||
17646 | neg find hasElementInContainment(problem,interpretation); | ||
17647 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17648 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class"); | ||
17649 | find mayInstanceOfChoice_class(problem,interpretation,newObject); | ||
17650 | find mayExist(problem, interpretation, newObject); | ||
17651 | neg find mustExist(problem, interpretation, newObject); | ||
17652 | } | ||
17653 | pattern createObject_Transition_class_by_outgoingTransitions_reference_Vertex_with_source_reference_Transition( | ||
17654 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17655 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
17656 | container:DefinedElement) | ||
17657 | { | ||
17658 | find interpretation(problem,interpretation); | ||
17659 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17660 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class"); | ||
17661 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
17662 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingTransitions reference Vertex"); | ||
17663 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
17664 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"source reference Transition"); | ||
17665 | find mustInstanceOfVertex_class(problem,interpretation,container); | ||
17666 | find mayInstanceOfTransition_class(problem,interpretation,newObject); | ||
17667 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,container,newObject); | ||
17668 | find mustExist(problem, interpretation, container); | ||
17669 | neg find mustExist(problem, interpretation, newObject); | ||
17670 | } | ||
17671 | pattern createObject_Transition_class( | ||
17672 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17673 | typeInterpretation:PartialComplexTypeInterpretation) | ||
17674 | { | ||
17675 | find interpretation(problem,interpretation); | ||
17676 | neg find hasElementInContainment(problem,interpretation); | ||
17677 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17678 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class"); | ||
17679 | find mayInstanceOfTransition_class(problem,interpretation,newObject); | ||
17680 | find mayExist(problem, interpretation, newObject); | ||
17681 | neg find mustExist(problem, interpretation, newObject); | ||
17682 | } | ||
17683 | pattern createObject_Statechart_class_UndefinedPart( | ||
17684 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17685 | typeInterpretation:PartialComplexTypeInterpretation) | ||
17686 | { | ||
17687 | find interpretation(problem,interpretation); | ||
17688 | neg find hasElementInContainment(problem,interpretation); | ||
17689 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17690 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Statechart class UndefinedPart"); | ||
17691 | find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,newObject); | ||
17692 | find mayExist(problem, interpretation, newObject); | ||
17693 | neg find mustExist(problem, interpretation, newObject); | ||
17694 | } | ||
17695 | |||
17696 | ////////// | ||
17697 | // 4.2 Type refinement | ||
17698 | ////////// | ||
17699 | pattern refineTypeTo_State_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
17700 | find interpretation(problem,interpretation); | ||
17701 | PartialInterpretation.newElements(interpretation,element); | ||
17702 | find mayInstanceOfState_class(problem,interpretation,element); | ||
17703 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
17704 | neg find mustInstanceOfState_class(problem,interpretation,element); | ||
17705 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
17706 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
17707 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
17708 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
17709 | } | ||
17710 | pattern refineTypeTo_FinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
17711 | find interpretation(problem,interpretation); | ||
17712 | PartialInterpretation.newElements(interpretation,element); | ||
17713 | find mayInstanceOfFinalState_class(problem,interpretation,element); | ||
17714 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
17715 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
17716 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
17717 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
17718 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
17719 | } | ||
17720 | pattern refineTypeTo_Synchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
17721 | find interpretation(problem,interpretation); | ||
17722 | PartialInterpretation.newElements(interpretation,element); | ||
17723 | find mayInstanceOfSynchronization_class(problem,interpretation,element); | ||
17724 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
17725 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
17726 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
17727 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
17728 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
17729 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
17730 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
17731 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
17732 | } | ||
17733 | pattern refineTypeTo_Region_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
17734 | find interpretation(problem,interpretation); | ||
17735 | PartialInterpretation.newElements(interpretation,element); | ||
17736 | find mayInstanceOfRegion_class(problem,interpretation,element); | ||
17737 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
17738 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
17739 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
17740 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
17741 | } | ||
17742 | pattern refineTypeTo_Entry_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
17743 | find interpretation(problem,interpretation); | ||
17744 | PartialInterpretation.newElements(interpretation,element); | ||
17745 | find mayInstanceOfEntry_class(problem,interpretation,element); | ||
17746 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
17747 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
17748 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
17749 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
17750 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
17751 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
17752 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
17753 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
17754 | } | ||
17755 | pattern refineTypeTo_Exit_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
17756 | find interpretation(problem,interpretation); | ||
17757 | PartialInterpretation.newElements(interpretation,element); | ||
17758 | find mayInstanceOfExit_class(problem,interpretation,element); | ||
17759 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
17760 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
17761 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
17762 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
17763 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
17764 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
17765 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
17766 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
17767 | } | ||
17768 | pattern refineTypeTo_Choice_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
17769 | find interpretation(problem,interpretation); | ||
17770 | PartialInterpretation.newElements(interpretation,element); | ||
17771 | find mayInstanceOfChoice_class(problem,interpretation,element); | ||
17772 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
17773 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
17774 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
17775 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
17776 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
17777 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
17778 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
17779 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
17780 | } | ||
17781 | pattern refineTypeTo_Transition_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
17782 | find interpretation(problem,interpretation); | ||
17783 | PartialInterpretation.newElements(interpretation,element); | ||
17784 | find mayInstanceOfTransition_class(problem,interpretation,element); | ||
17785 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
17786 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
17787 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
17788 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
17789 | } | ||
17790 | pattern refineTypeTo_Statechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
17791 | find interpretation(problem,interpretation); | ||
17792 | PartialInterpretation.newElements(interpretation,element); | ||
17793 | find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); | ||
17794 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
17795 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
17796 | neg find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); | ||
17797 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
17798 | } | ||
17799 | |||
17800 | ////////// | ||
17801 | // 4.3 Relation refinement | ||
17802 | ////////// | ||
17803 | pattern refineRelation_incomingTransitions_reference_Vertex_and_target_reference_Transition( | ||
17804 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
17805 | relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, | ||
17806 | from: DefinedElement, to: DefinedElement) | ||
17807 | { | ||
17808 | find interpretation(problem,interpretation); | ||
17809 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
17810 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex"); | ||
17811 | PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); | ||
17812 | PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"target reference Transition"); | ||
17813 | find mustExist(problem, interpretation, from); | ||
17814 | find mustExist(problem, interpretation, to); | ||
17815 | find mustInstanceOfVertex_class(problem,interpretation,from); | ||
17816 | find mustInstanceOfTransition_class(problem,interpretation,to); | ||
17817 | find mayInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to); | ||
17818 | neg find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to); | ||
17819 | } | ||
17820 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
17821 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" | ||
17822 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
17823 | |||
17824 | ////////// | ||
17825 | // 0. Util | ||
17826 | ////////// | ||
17827 | private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
17828 | PartialInterpretation.problem(interpretation,problem); | ||
17829 | } | ||
17830 | |||
17831 | ///////////////////////// | ||
17832 | // 0.1 Existence | ||
17833 | ///////////////////////// | ||
17834 | private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
17835 | find interpretation(problem,interpretation); | ||
17836 | LogicProblem.elements(problem,element); | ||
17837 | } or { | ||
17838 | find interpretation(problem,interpretation); | ||
17839 | PartialInterpretation.newElements(interpretation,element); | ||
17840 | } | ||
17841 | |||
17842 | private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
17843 | find mustExist(problem,interpretation,element); | ||
17844 | } or { | ||
17845 | find interpretation(problem,interpretation); | ||
17846 | neg find elementCloseWorld(element); | ||
17847 | PartialInterpretation.openWorldElements(interpretation,element); | ||
17848 | } | ||
17849 | |||
17850 | private pattern elementCloseWorld(element:DefinedElement) { | ||
17851 | PartialInterpretation.openWorldElements(i,element); | ||
17852 | PartialInterpretation.maxNewElements(i,0); | ||
17853 | } or { | ||
17854 | Scope.targetTypeInterpretation(scope,interpretation); | ||
17855 | PartialTypeInterpratation.elements(interpretation,element); | ||
17856 | Scope.maxNewElements(scope,0); | ||
17857 | } | ||
17858 | |||
17859 | //////////////////////// | ||
17860 | // 0.2 Equivalence | ||
17861 | //////////////////////// | ||
17862 | pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { | ||
17863 | find mayExist(problem,interpretation,a); | ||
17864 | find mayExist(problem,interpretation,b); | ||
17865 | a == b; | ||
17866 | } | ||
17867 | |||
17868 | //////////////////////// | ||
17869 | // 0.3 Required Patterns by TypeIndexer | ||
17870 | //////////////////////// | ||
17871 | private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { | ||
17872 | find interpretation(problem,interpretation); | ||
17873 | LogicProblem.types(problem,type); | ||
17874 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
17875 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
17876 | } | ||
17877 | |||
17878 | private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
17879 | find interpretation(problem,interpretation); | ||
17880 | LogicProblem.types(problem,type); | ||
17881 | TypeDefinition.elements(type,element); | ||
17882 | } or { | ||
17883 | find interpretation(problem,interpretation); | ||
17884 | find typeInterpretation(problem,interpretation,type,typeInterpretation); | ||
17885 | PartialComplexTypeInterpretation.elements(typeInterpretation,element); | ||
17886 | } | ||
17887 | |||
17888 | private pattern isPrimitive(element: PrimitiveElement) { | ||
17889 | PrimitiveElement(element); | ||
17890 | } | ||
17891 | |||
17892 | ////////// | ||
17893 | // 1. Problem-Specific Base Indexers | ||
17894 | ////////// | ||
17895 | // 1.1 Type Indexers | ||
17896 | ////////// | ||
17897 | // 1.1.1 primitive Type Indexers | ||
17898 | ////////// | ||
17899 | |||
17900 | ////////// | ||
17901 | // 1.1.2 domain-specific Type Indexers | ||
17902 | ////////// | ||
17903 | /** | ||
17904 | * An element must be an instance of type "Pseudostate class". | ||
17905 | */ | ||
17906 | private pattern mustInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
17907 | Type.name(type,"Pseudostate class"); | ||
17908 | find directInstanceOf(problem,interpretation,element,type); | ||
17909 | } | ||
17910 | private pattern scopeDisallowsNewPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
17911 | find interpretation(problem,interpretation); | ||
17912 | PartialInterpretation.scopes(interpretation,scope); | ||
17913 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
17914 | Scope.maxNewElements(scope,0); | ||
17915 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
17916 | Type.name(type,"Pseudostate class"); | ||
17917 | } | ||
17918 | |||
17919 | /** | ||
17920 | * An element may be an instance of type "Pseudostate class". | ||
17921 | */ | ||
17922 | private pattern mayInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
17923 | { | ||
17924 | find interpretation(problem,interpretation); | ||
17925 | PartialInterpretation.newElements(interpretation,element); | ||
17926 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
17927 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
17928 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
17929 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
17930 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
17931 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
17932 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
17933 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
17934 | neg find scopeDisallowsNewPseudostate_class(problem, interpretation); | ||
17935 | neg find isPrimitive(element); | ||
17936 | } or { | ||
17937 | find interpretation(problem,interpretation); | ||
17938 | PartialInterpretation.openWorldElements(interpretation,element); | ||
17939 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
17940 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
17941 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
17942 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
17943 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
17944 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
17945 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
17946 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
17947 | neg find scopeDisallowsNewPseudostate_class(problem, interpretation); | ||
17948 | neg find isPrimitive(element); | ||
17949 | } or | ||
17950 | { find mustInstanceOfPseudostate_class(problem,interpretation,element); } | ||
17951 | /** | ||
17952 | * An element must be an instance of type "Vertex class". | ||
17953 | */ | ||
17954 | private pattern mustInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
17955 | Type.name(type,"Vertex class"); | ||
17956 | find directInstanceOf(problem,interpretation,element,type); | ||
17957 | } | ||
17958 | private pattern scopeDisallowsNewVertex_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
17959 | find interpretation(problem,interpretation); | ||
17960 | PartialInterpretation.scopes(interpretation,scope); | ||
17961 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
17962 | Scope.maxNewElements(scope,0); | ||
17963 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
17964 | Type.name(type,"Vertex class"); | ||
17965 | } | ||
17966 | |||
17967 | /** | ||
17968 | * An element may be an instance of type "Vertex class". | ||
17969 | */ | ||
17970 | private pattern mayInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
17971 | { | ||
17972 | find interpretation(problem,interpretation); | ||
17973 | PartialInterpretation.newElements(interpretation,element); | ||
17974 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
17975 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
17976 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
17977 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
17978 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
17979 | neg find scopeDisallowsNewVertex_class(problem, interpretation); | ||
17980 | neg find isPrimitive(element); | ||
17981 | } or { | ||
17982 | find interpretation(problem,interpretation); | ||
17983 | PartialInterpretation.openWorldElements(interpretation,element); | ||
17984 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
17985 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
17986 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
17987 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
17988 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
17989 | neg find scopeDisallowsNewVertex_class(problem, interpretation); | ||
17990 | neg find isPrimitive(element); | ||
17991 | } or | ||
17992 | { find mustInstanceOfVertex_class(problem,interpretation,element); } | ||
17993 | /** | ||
17994 | * An element must be an instance of type "Region class". | ||
17995 | */ | ||
17996 | private pattern mustInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
17997 | Type.name(type,"Region class"); | ||
17998 | find directInstanceOf(problem,interpretation,element,type); | ||
17999 | } | ||
18000 | private pattern scopeDisallowsNewRegion_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
18001 | find interpretation(problem,interpretation); | ||
18002 | PartialInterpretation.scopes(interpretation,scope); | ||
18003 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
18004 | Scope.maxNewElements(scope,0); | ||
18005 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
18006 | Type.name(type,"Region class"); | ||
18007 | } | ||
18008 | |||
18009 | /** | ||
18010 | * An element may be an instance of type "Region class". | ||
18011 | */ | ||
18012 | private pattern mayInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
18013 | { | ||
18014 | find interpretation(problem,interpretation); | ||
18015 | PartialInterpretation.newElements(interpretation,element); | ||
18016 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
18017 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
18018 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
18019 | neg find scopeDisallowsNewRegion_class(problem, interpretation); | ||
18020 | neg find isPrimitive(element); | ||
18021 | } or { | ||
18022 | find interpretation(problem,interpretation); | ||
18023 | PartialInterpretation.openWorldElements(interpretation,element); | ||
18024 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
18025 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
18026 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
18027 | neg find scopeDisallowsNewRegion_class(problem, interpretation); | ||
18028 | neg find isPrimitive(element); | ||
18029 | } or | ||
18030 | { find mustInstanceOfRegion_class(problem,interpretation,element); } | ||
18031 | /** | ||
18032 | * An element must be an instance of type "Transition class". | ||
18033 | */ | ||
18034 | private pattern mustInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
18035 | Type.name(type,"Transition class"); | ||
18036 | find directInstanceOf(problem,interpretation,element,type); | ||
18037 | } | ||
18038 | private pattern scopeDisallowsNewTransition_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
18039 | find interpretation(problem,interpretation); | ||
18040 | PartialInterpretation.scopes(interpretation,scope); | ||
18041 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
18042 | Scope.maxNewElements(scope,0); | ||
18043 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
18044 | Type.name(type,"Transition class"); | ||
18045 | } | ||
18046 | |||
18047 | /** | ||
18048 | * An element may be an instance of type "Transition class". | ||
18049 | */ | ||
18050 | private pattern mayInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
18051 | { | ||
18052 | find interpretation(problem,interpretation); | ||
18053 | PartialInterpretation.newElements(interpretation,element); | ||
18054 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
18055 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
18056 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
18057 | neg find scopeDisallowsNewTransition_class(problem, interpretation); | ||
18058 | neg find isPrimitive(element); | ||
18059 | } or { | ||
18060 | find interpretation(problem,interpretation); | ||
18061 | PartialInterpretation.openWorldElements(interpretation,element); | ||
18062 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
18063 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
18064 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
18065 | neg find scopeDisallowsNewTransition_class(problem, interpretation); | ||
18066 | neg find isPrimitive(element); | ||
18067 | } or | ||
18068 | { find mustInstanceOfTransition_class(problem,interpretation,element); } | ||
18069 | /** | ||
18070 | * An element must be an instance of type "Statechart class". | ||
18071 | */ | ||
18072 | private pattern mustInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
18073 | Type.name(type,"Statechart class"); | ||
18074 | find directInstanceOf(problem,interpretation,element,type); | ||
18075 | } | ||
18076 | private pattern scopeDisallowsNewStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
18077 | find interpretation(problem,interpretation); | ||
18078 | PartialInterpretation.scopes(interpretation,scope); | ||
18079 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
18080 | Scope.maxNewElements(scope,0); | ||
18081 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
18082 | Type.name(type,"Statechart class"); | ||
18083 | } | ||
18084 | |||
18085 | /** | ||
18086 | * An element may be an instance of type "Statechart class". | ||
18087 | */ | ||
18088 | private pattern mayInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
18089 | { | ||
18090 | find interpretation(problem,interpretation); | ||
18091 | PartialInterpretation.newElements(interpretation,element); | ||
18092 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
18093 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
18094 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
18095 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
18096 | neg find scopeDisallowsNewStatechart_class(problem, interpretation); | ||
18097 | neg find isPrimitive(element); | ||
18098 | } or { | ||
18099 | find interpretation(problem,interpretation); | ||
18100 | PartialInterpretation.openWorldElements(interpretation,element); | ||
18101 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
18102 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
18103 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
18104 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
18105 | neg find scopeDisallowsNewStatechart_class(problem, interpretation); | ||
18106 | neg find isPrimitive(element); | ||
18107 | } or | ||
18108 | { find mustInstanceOfStatechart_class(problem,interpretation,element); } | ||
18109 | /** | ||
18110 | * An element must be an instance of type "Entry class". | ||
18111 | */ | ||
18112 | private pattern mustInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
18113 | Type.name(type,"Entry class"); | ||
18114 | find directInstanceOf(problem,interpretation,element,type); | ||
18115 | } | ||
18116 | private pattern scopeDisallowsNewEntry_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
18117 | find interpretation(problem,interpretation); | ||
18118 | PartialInterpretation.scopes(interpretation,scope); | ||
18119 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
18120 | Scope.maxNewElements(scope,0); | ||
18121 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
18122 | Type.name(type,"Entry class"); | ||
18123 | } | ||
18124 | |||
18125 | /** | ||
18126 | * An element may be an instance of type "Entry class". | ||
18127 | */ | ||
18128 | private pattern mayInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
18129 | { | ||
18130 | find interpretation(problem,interpretation); | ||
18131 | PartialInterpretation.newElements(interpretation,element); | ||
18132 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
18133 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
18134 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
18135 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
18136 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
18137 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
18138 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
18139 | neg find scopeDisallowsNewEntry_class(problem, interpretation); | ||
18140 | neg find isPrimitive(element); | ||
18141 | } or { | ||
18142 | find interpretation(problem,interpretation); | ||
18143 | PartialInterpretation.openWorldElements(interpretation,element); | ||
18144 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
18145 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
18146 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
18147 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
18148 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
18149 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
18150 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
18151 | neg find scopeDisallowsNewEntry_class(problem, interpretation); | ||
18152 | neg find isPrimitive(element); | ||
18153 | } or | ||
18154 | { find mustInstanceOfEntry_class(problem,interpretation,element); } | ||
18155 | /** | ||
18156 | * An element must be an instance of type "Synchronization class". | ||
18157 | */ | ||
18158 | private pattern mustInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
18159 | Type.name(type,"Synchronization class"); | ||
18160 | find directInstanceOf(problem,interpretation,element,type); | ||
18161 | } | ||
18162 | private pattern scopeDisallowsNewSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
18163 | find interpretation(problem,interpretation); | ||
18164 | PartialInterpretation.scopes(interpretation,scope); | ||
18165 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
18166 | Scope.maxNewElements(scope,0); | ||
18167 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
18168 | Type.name(type,"Synchronization class"); | ||
18169 | } | ||
18170 | |||
18171 | /** | ||
18172 | * An element may be an instance of type "Synchronization class". | ||
18173 | */ | ||
18174 | private pattern mayInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
18175 | { | ||
18176 | find interpretation(problem,interpretation); | ||
18177 | PartialInterpretation.newElements(interpretation,element); | ||
18178 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
18179 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
18180 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
18181 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
18182 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
18183 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
18184 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
18185 | neg find scopeDisallowsNewSynchronization_class(problem, interpretation); | ||
18186 | neg find isPrimitive(element); | ||
18187 | } or { | ||
18188 | find interpretation(problem,interpretation); | ||
18189 | PartialInterpretation.openWorldElements(interpretation,element); | ||
18190 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
18191 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
18192 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
18193 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
18194 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
18195 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
18196 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
18197 | neg find scopeDisallowsNewSynchronization_class(problem, interpretation); | ||
18198 | neg find isPrimitive(element); | ||
18199 | } or | ||
18200 | { find mustInstanceOfSynchronization_class(problem,interpretation,element); } | ||
18201 | /** | ||
18202 | * An element must be an instance of type "State class". | ||
18203 | */ | ||
18204 | private pattern mustInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
18205 | Type.name(type,"State class"); | ||
18206 | find directInstanceOf(problem,interpretation,element,type); | ||
18207 | } | ||
18208 | private pattern scopeDisallowsNewState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
18209 | find interpretation(problem,interpretation); | ||
18210 | PartialInterpretation.scopes(interpretation,scope); | ||
18211 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
18212 | Scope.maxNewElements(scope,0); | ||
18213 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
18214 | Type.name(type,"State class"); | ||
18215 | } | ||
18216 | |||
18217 | /** | ||
18218 | * An element may be an instance of type "State class". | ||
18219 | */ | ||
18220 | private pattern mayInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
18221 | { | ||
18222 | find interpretation(problem,interpretation); | ||
18223 | PartialInterpretation.newElements(interpretation,element); | ||
18224 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
18225 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
18226 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
18227 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
18228 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
18229 | neg find scopeDisallowsNewState_class(problem, interpretation); | ||
18230 | neg find isPrimitive(element); | ||
18231 | } or { | ||
18232 | find interpretation(problem,interpretation); | ||
18233 | PartialInterpretation.openWorldElements(interpretation,element); | ||
18234 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
18235 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
18236 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
18237 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
18238 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
18239 | neg find scopeDisallowsNewState_class(problem, interpretation); | ||
18240 | neg find isPrimitive(element); | ||
18241 | } or | ||
18242 | { find mustInstanceOfState_class(problem,interpretation,element); } | ||
18243 | /** | ||
18244 | * An element must be an instance of type "RegularState class". | ||
18245 | */ | ||
18246 | private pattern mustInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
18247 | Type.name(type,"RegularState class"); | ||
18248 | find directInstanceOf(problem,interpretation,element,type); | ||
18249 | } | ||
18250 | private pattern scopeDisallowsNewRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
18251 | find interpretation(problem,interpretation); | ||
18252 | PartialInterpretation.scopes(interpretation,scope); | ||
18253 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
18254 | Scope.maxNewElements(scope,0); | ||
18255 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
18256 | Type.name(type,"RegularState class"); | ||
18257 | } | ||
18258 | |||
18259 | /** | ||
18260 | * An element may be an instance of type "RegularState class". | ||
18261 | */ | ||
18262 | private pattern mayInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
18263 | { | ||
18264 | find interpretation(problem,interpretation); | ||
18265 | PartialInterpretation.newElements(interpretation,element); | ||
18266 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
18267 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
18268 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
18269 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
18270 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
18271 | neg find scopeDisallowsNewRegularState_class(problem, interpretation); | ||
18272 | neg find isPrimitive(element); | ||
18273 | } or { | ||
18274 | find interpretation(problem,interpretation); | ||
18275 | PartialInterpretation.openWorldElements(interpretation,element); | ||
18276 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
18277 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
18278 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
18279 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
18280 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
18281 | neg find scopeDisallowsNewRegularState_class(problem, interpretation); | ||
18282 | neg find isPrimitive(element); | ||
18283 | } or | ||
18284 | { find mustInstanceOfRegularState_class(problem,interpretation,element); } | ||
18285 | /** | ||
18286 | * An element must be an instance of type "CompositeElement class". | ||
18287 | */ | ||
18288 | private pattern mustInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
18289 | Type.name(type,"CompositeElement class"); | ||
18290 | find directInstanceOf(problem,interpretation,element,type); | ||
18291 | } | ||
18292 | private pattern scopeDisallowsNewCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
18293 | find interpretation(problem,interpretation); | ||
18294 | PartialInterpretation.scopes(interpretation,scope); | ||
18295 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
18296 | Scope.maxNewElements(scope,0); | ||
18297 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
18298 | Type.name(type,"CompositeElement class"); | ||
18299 | } | ||
18300 | |||
18301 | /** | ||
18302 | * An element may be an instance of type "CompositeElement class". | ||
18303 | */ | ||
18304 | private pattern mayInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
18305 | { | ||
18306 | find interpretation(problem,interpretation); | ||
18307 | PartialInterpretation.newElements(interpretation,element); | ||
18308 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
18309 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
18310 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
18311 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
18312 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
18313 | neg find scopeDisallowsNewCompositeElement_class(problem, interpretation); | ||
18314 | neg find isPrimitive(element); | ||
18315 | } or { | ||
18316 | find interpretation(problem,interpretation); | ||
18317 | PartialInterpretation.openWorldElements(interpretation,element); | ||
18318 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
18319 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
18320 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
18321 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
18322 | neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); | ||
18323 | neg find scopeDisallowsNewCompositeElement_class(problem, interpretation); | ||
18324 | neg find isPrimitive(element); | ||
18325 | } or | ||
18326 | { find mustInstanceOfCompositeElement_class(problem,interpretation,element); } | ||
18327 | /** | ||
18328 | * An element must be an instance of type "Choice class". | ||
18329 | */ | ||
18330 | private pattern mustInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
18331 | Type.name(type,"Choice class"); | ||
18332 | find directInstanceOf(problem,interpretation,element,type); | ||
18333 | } | ||
18334 | private pattern scopeDisallowsNewChoice_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
18335 | find interpretation(problem,interpretation); | ||
18336 | PartialInterpretation.scopes(interpretation,scope); | ||
18337 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
18338 | Scope.maxNewElements(scope,0); | ||
18339 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
18340 | Type.name(type,"Choice class"); | ||
18341 | } | ||
18342 | |||
18343 | /** | ||
18344 | * An element may be an instance of type "Choice class". | ||
18345 | */ | ||
18346 | private pattern mayInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
18347 | { | ||
18348 | find interpretation(problem,interpretation); | ||
18349 | PartialInterpretation.newElements(interpretation,element); | ||
18350 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
18351 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
18352 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
18353 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
18354 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
18355 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
18356 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
18357 | neg find scopeDisallowsNewChoice_class(problem, interpretation); | ||
18358 | neg find isPrimitive(element); | ||
18359 | } or { | ||
18360 | find interpretation(problem,interpretation); | ||
18361 | PartialInterpretation.openWorldElements(interpretation,element); | ||
18362 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
18363 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
18364 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
18365 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
18366 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
18367 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
18368 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
18369 | neg find scopeDisallowsNewChoice_class(problem, interpretation); | ||
18370 | neg find isPrimitive(element); | ||
18371 | } or | ||
18372 | { find mustInstanceOfChoice_class(problem,interpretation,element); } | ||
18373 | /** | ||
18374 | * An element must be an instance of type "Exit class". | ||
18375 | */ | ||
18376 | private pattern mustInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
18377 | Type.name(type,"Exit class"); | ||
18378 | find directInstanceOf(problem,interpretation,element,type); | ||
18379 | } | ||
18380 | private pattern scopeDisallowsNewExit_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
18381 | find interpretation(problem,interpretation); | ||
18382 | PartialInterpretation.scopes(interpretation,scope); | ||
18383 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
18384 | Scope.maxNewElements(scope,0); | ||
18385 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
18386 | Type.name(type,"Exit class"); | ||
18387 | } | ||
18388 | |||
18389 | /** | ||
18390 | * An element may be an instance of type "Exit class". | ||
18391 | */ | ||
18392 | private pattern mayInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
18393 | { | ||
18394 | find interpretation(problem,interpretation); | ||
18395 | PartialInterpretation.newElements(interpretation,element); | ||
18396 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
18397 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
18398 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
18399 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
18400 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
18401 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
18402 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
18403 | neg find scopeDisallowsNewExit_class(problem, interpretation); | ||
18404 | neg find isPrimitive(element); | ||
18405 | } or { | ||
18406 | find interpretation(problem,interpretation); | ||
18407 | PartialInterpretation.openWorldElements(interpretation,element); | ||
18408 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
18409 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
18410 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
18411 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
18412 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
18413 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
18414 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
18415 | neg find scopeDisallowsNewExit_class(problem, interpretation); | ||
18416 | neg find isPrimitive(element); | ||
18417 | } or | ||
18418 | { find mustInstanceOfExit_class(problem,interpretation,element); } | ||
18419 | /** | ||
18420 | * An element must be an instance of type "FinalState class". | ||
18421 | */ | ||
18422 | private pattern mustInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
18423 | Type.name(type,"FinalState class"); | ||
18424 | find directInstanceOf(problem,interpretation,element,type); | ||
18425 | } | ||
18426 | private pattern scopeDisallowsNewFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
18427 | find interpretation(problem,interpretation); | ||
18428 | PartialInterpretation.scopes(interpretation,scope); | ||
18429 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
18430 | Scope.maxNewElements(scope,0); | ||
18431 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
18432 | Type.name(type,"FinalState class"); | ||
18433 | } | ||
18434 | |||
18435 | /** | ||
18436 | * An element may be an instance of type "FinalState class". | ||
18437 | */ | ||
18438 | private pattern mayInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
18439 | { | ||
18440 | find interpretation(problem,interpretation); | ||
18441 | PartialInterpretation.newElements(interpretation,element); | ||
18442 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
18443 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
18444 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
18445 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
18446 | neg find scopeDisallowsNewFinalState_class(problem, interpretation); | ||
18447 | neg find isPrimitive(element); | ||
18448 | } or { | ||
18449 | find interpretation(problem,interpretation); | ||
18450 | PartialInterpretation.openWorldElements(interpretation,element); | ||
18451 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
18452 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
18453 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
18454 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
18455 | neg find scopeDisallowsNewFinalState_class(problem, interpretation); | ||
18456 | neg find isPrimitive(element); | ||
18457 | } or | ||
18458 | { find mustInstanceOfFinalState_class(problem,interpretation,element); } | ||
18459 | /** | ||
18460 | * An element must be an instance of type "Statechart class DefinedPart". | ||
18461 | */ | ||
18462 | private pattern mustInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
18463 | Type.name(type,"Statechart class DefinedPart"); | ||
18464 | find directInstanceOf(problem,interpretation,element,type); | ||
18465 | } | ||
18466 | private pattern scopeDisallowsNewStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
18467 | find interpretation(problem,interpretation); | ||
18468 | PartialInterpretation.scopes(interpretation,scope); | ||
18469 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
18470 | Scope.maxNewElements(scope,0); | ||
18471 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
18472 | Type.name(type,"Statechart class DefinedPart"); | ||
18473 | } | ||
18474 | |||
18475 | /** | ||
18476 | * An element may be an instance of type "Statechart class DefinedPart". | ||
18477 | */ | ||
18478 | private pattern mayInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
18479 | { find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,element); } | ||
18480 | /** | ||
18481 | * An element must be an instance of type "Statechart class UndefinedPart". | ||
18482 | */ | ||
18483 | private pattern mustInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
18484 | Type.name(type,"Statechart class UndefinedPart"); | ||
18485 | find directInstanceOf(problem,interpretation,element,type); | ||
18486 | } | ||
18487 | private pattern scopeDisallowsNewStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
18488 | find interpretation(problem,interpretation); | ||
18489 | PartialInterpretation.scopes(interpretation,scope); | ||
18490 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
18491 | Scope.maxNewElements(scope,0); | ||
18492 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
18493 | Type.name(type,"Statechart class UndefinedPart"); | ||
18494 | } | ||
18495 | |||
18496 | /** | ||
18497 | * An element may be an instance of type "Statechart class UndefinedPart". | ||
18498 | */ | ||
18499 | private pattern mayInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
18500 | { | ||
18501 | find interpretation(problem,interpretation); | ||
18502 | PartialInterpretation.newElements(interpretation,element); | ||
18503 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
18504 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
18505 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
18506 | neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation); | ||
18507 | neg find isPrimitive(element); | ||
18508 | } or { | ||
18509 | find interpretation(problem,interpretation); | ||
18510 | PartialInterpretation.openWorldElements(interpretation,element); | ||
18511 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
18512 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
18513 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
18514 | neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation); | ||
18515 | neg find isPrimitive(element); | ||
18516 | } or | ||
18517 | { find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); } | ||
18518 | /** | ||
18519 | * An element must be an instance of type "CompositeElement class DefinedPart". | ||
18520 | */ | ||
18521 | private pattern mustInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
18522 | Type.name(type,"CompositeElement class DefinedPart"); | ||
18523 | find directInstanceOf(problem,interpretation,element,type); | ||
18524 | } | ||
18525 | private pattern scopeDisallowsNewCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
18526 | find interpretation(problem,interpretation); | ||
18527 | PartialInterpretation.scopes(interpretation,scope); | ||
18528 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
18529 | Scope.maxNewElements(scope,0); | ||
18530 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
18531 | Type.name(type,"CompositeElement class DefinedPart"); | ||
18532 | } | ||
18533 | |||
18534 | /** | ||
18535 | * An element may be an instance of type "CompositeElement class DefinedPart". | ||
18536 | */ | ||
18537 | private pattern mayInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
18538 | { find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,element); } | ||
18539 | /** | ||
18540 | * An element must be an instance of type "CompositeElement class UndefinedPart". | ||
18541 | */ | ||
18542 | private pattern mustInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
18543 | Type.name(type,"CompositeElement class UndefinedPart"); | ||
18544 | find directInstanceOf(problem,interpretation,element,type); | ||
18545 | } | ||
18546 | private pattern scopeDisallowsNewCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
18547 | find interpretation(problem,interpretation); | ||
18548 | PartialInterpretation.scopes(interpretation,scope); | ||
18549 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
18550 | Scope.maxNewElements(scope,0); | ||
18551 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
18552 | Type.name(type,"CompositeElement class UndefinedPart"); | ||
18553 | } | ||
18554 | |||
18555 | /** | ||
18556 | * An element may be an instance of type "CompositeElement class UndefinedPart". | ||
18557 | */ | ||
18558 | private pattern mayInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
18559 | { | ||
18560 | find interpretation(problem,interpretation); | ||
18561 | PartialInterpretation.newElements(interpretation,element); | ||
18562 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
18563 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
18564 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
18565 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
18566 | neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation); | ||
18567 | neg find isPrimitive(element); | ||
18568 | } or { | ||
18569 | find interpretation(problem,interpretation); | ||
18570 | PartialInterpretation.openWorldElements(interpretation,element); | ||
18571 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
18572 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
18573 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
18574 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
18575 | neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation); | ||
18576 | neg find isPrimitive(element); | ||
18577 | } or | ||
18578 | { find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); } | ||
18579 | |||
18580 | ////////// | ||
18581 | // 1.2 Relation Declaration Indexers | ||
18582 | ////////// | ||
18583 | /** | ||
18584 | * Matcher for detecting tuples t where []incomingTransitions reference Vertex(source,target) | ||
18585 | */ | ||
18586 | private pattern mustInRelationincomingTransitions_reference_Vertex( | ||
18587 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18588 | source: DefinedElement, target:DefinedElement) | ||
18589 | { | ||
18590 | find interpretation(problem,interpretation); | ||
18591 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
18592 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex"); | ||
18593 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
18594 | BinaryElementRelationLink.param1(link,source); | ||
18595 | BinaryElementRelationLink.param2(link,target); | ||
18596 | } | ||
18597 | /** | ||
18598 | * Matcher for detecting tuples t where <>incomingTransitions reference Vertex(source,target) | ||
18599 | */ | ||
18600 | private pattern mayInRelationincomingTransitions_reference_Vertex( | ||
18601 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18602 | source: DefinedElement, target:DefinedElement) | ||
18603 | { | ||
18604 | find interpretation(problem,interpretation); | ||
18605 | // The two endpoint of the link have to exist | ||
18606 | find mayExist(problem, interpretation, source); | ||
18607 | find mayExist(problem, interpretation, target); | ||
18608 | // Type consistency | ||
18609 | find mayInstanceOfVertex_class(problem,interpretation,source); | ||
18610 | find mayInstanceOfTransition_class(problem,interpretation,target); | ||
18611 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
18612 | // the upper bound of the opposite reference multiplicity should be considered. | ||
18613 | numberOfExistingOppositeReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,target,_); | ||
18614 | check(numberOfExistingOppositeReferences < 1); | ||
18615 | } or { | ||
18616 | find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,source,target); | ||
18617 | } | ||
18618 | /** | ||
18619 | * Matcher for detecting tuples t where []outgoingTransitions reference Vertex(source,target) | ||
18620 | */ | ||
18621 | private pattern mustInRelationoutgoingTransitions_reference_Vertex( | ||
18622 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18623 | source: DefinedElement, target:DefinedElement) | ||
18624 | { | ||
18625 | find interpretation(problem,interpretation); | ||
18626 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
18627 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingTransitions reference Vertex"); | ||
18628 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
18629 | BinaryElementRelationLink.param1(link,source); | ||
18630 | BinaryElementRelationLink.param2(link,target); | ||
18631 | } | ||
18632 | /** | ||
18633 | * Matcher for detecting tuples t where <>outgoingTransitions reference Vertex(source,target) | ||
18634 | */ | ||
18635 | private pattern mayInRelationoutgoingTransitions_reference_Vertex( | ||
18636 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18637 | source: DefinedElement, target:DefinedElement) | ||
18638 | { | ||
18639 | find interpretation(problem,interpretation); | ||
18640 | // The two endpoint of the link have to exist | ||
18641 | find mayExist(problem, interpretation, source); | ||
18642 | find mayExist(problem, interpretation, target); | ||
18643 | // Type consistency | ||
18644 | find mayInstanceOfVertex_class(problem,interpretation,source); | ||
18645 | find mayInstanceOfTransition_class(problem,interpretation,target); | ||
18646 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
18647 | // the upper bound of the opposite reference multiplicity should be considered. | ||
18648 | numberOfExistingOppositeReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,target,_); | ||
18649 | check(numberOfExistingOppositeReferences < 1); | ||
18650 | // The reference is containment, then a new reference cannot be create if: | ||
18651 | // 1. Multiple parents | ||
18652 | neg find mustContains4(problem,interpretation,_,target); | ||
18653 | // 2. Circle in the containment hierarchy | ||
18654 | neg find mustTransitiveContains(source,target); | ||
18655 | } or { | ||
18656 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target); | ||
18657 | } | ||
18658 | /** | ||
18659 | * Matcher for detecting tuples t where []vertices reference Region(source,target) | ||
18660 | */ | ||
18661 | private pattern mustInRelationvertices_reference_Region( | ||
18662 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18663 | source: DefinedElement, target:DefinedElement) | ||
18664 | { | ||
18665 | find interpretation(problem,interpretation); | ||
18666 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
18667 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"vertices reference Region"); | ||
18668 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
18669 | BinaryElementRelationLink.param1(link,source); | ||
18670 | BinaryElementRelationLink.param2(link,target); | ||
18671 | } | ||
18672 | /** | ||
18673 | * Matcher for detecting tuples t where <>vertices reference Region(source,target) | ||
18674 | */ | ||
18675 | private pattern mayInRelationvertices_reference_Region( | ||
18676 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18677 | source: DefinedElement, target:DefinedElement) | ||
18678 | { | ||
18679 | find interpretation(problem,interpretation); | ||
18680 | // The two endpoint of the link have to exist | ||
18681 | find mayExist(problem, interpretation, source); | ||
18682 | find mayExist(problem, interpretation, target); | ||
18683 | // Type consistency | ||
18684 | find mayInstanceOfRegion_class(problem,interpretation,source); | ||
18685 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
18686 | // The reference is containment, then a new reference cannot be create if: | ||
18687 | // 1. Multiple parents | ||
18688 | neg find mustContains4(problem,interpretation,_,target); | ||
18689 | // 2. Circle in the containment hierarchy | ||
18690 | neg find mustTransitiveContains(source,target); | ||
18691 | } or { | ||
18692 | find mustInRelationvertices_reference_Region(problem,interpretation,source,target); | ||
18693 | } | ||
18694 | /** | ||
18695 | * Matcher for detecting tuples t where []target reference Transition(source,target) | ||
18696 | */ | ||
18697 | private pattern mustInRelationtarget_reference_Transition( | ||
18698 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18699 | source: DefinedElement, target:DefinedElement) | ||
18700 | { | ||
18701 | find interpretation(problem,interpretation); | ||
18702 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
18703 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition"); | ||
18704 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
18705 | BinaryElementRelationLink.param1(link,source); | ||
18706 | BinaryElementRelationLink.param2(link,target); | ||
18707 | } | ||
18708 | /** | ||
18709 | * Matcher for detecting tuples t where <>target reference Transition(source,target) | ||
18710 | */ | ||
18711 | private pattern mayInRelationtarget_reference_Transition( | ||
18712 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18713 | source: DefinedElement, target:DefinedElement) | ||
18714 | { | ||
18715 | find interpretation(problem,interpretation); | ||
18716 | // The two endpoint of the link have to exist | ||
18717 | find mayExist(problem, interpretation, source); | ||
18718 | find mayExist(problem, interpretation, target); | ||
18719 | // Type consistency | ||
18720 | find mayInstanceOfTransition_class(problem,interpretation,source); | ||
18721 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
18722 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
18723 | // the upper bound of the multiplicity should be considered. | ||
18724 | numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,source,_); | ||
18725 | check(numberOfExistingReferences < 1); | ||
18726 | } or { | ||
18727 | find mustInRelationtarget_reference_Transition(problem,interpretation,source,target); | ||
18728 | } | ||
18729 | /** | ||
18730 | * Matcher for detecting tuples t where []source reference Transition(source,target) | ||
18731 | */ | ||
18732 | private pattern mustInRelationsource_reference_Transition( | ||
18733 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18734 | source: DefinedElement, target:DefinedElement) | ||
18735 | { | ||
18736 | find interpretation(problem,interpretation); | ||
18737 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
18738 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"source reference Transition"); | ||
18739 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
18740 | BinaryElementRelationLink.param1(link,source); | ||
18741 | BinaryElementRelationLink.param2(link,target); | ||
18742 | } | ||
18743 | /** | ||
18744 | * Matcher for detecting tuples t where <>source reference Transition(source,target) | ||
18745 | */ | ||
18746 | private pattern mayInRelationsource_reference_Transition( | ||
18747 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18748 | source: DefinedElement, target:DefinedElement) | ||
18749 | { | ||
18750 | find interpretation(problem,interpretation); | ||
18751 | // The two endpoint of the link have to exist | ||
18752 | find mayExist(problem, interpretation, source); | ||
18753 | find mayExist(problem, interpretation, target); | ||
18754 | // Type consistency | ||
18755 | find mayInstanceOfTransition_class(problem,interpretation,source); | ||
18756 | find mayInstanceOfVertex_class(problem,interpretation,target); | ||
18757 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
18758 | // the upper bound of the multiplicity should be considered. | ||
18759 | numberOfExistingReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,source,_); | ||
18760 | check(numberOfExistingReferences < 1); | ||
18761 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
18762 | // 1. Multiple parents | ||
18763 | neg find mustContains4(problem,interpretation,source,_); | ||
18764 | // 2. Circle in the containment hierarchy | ||
18765 | neg find mustTransitiveContains(source,target); | ||
18766 | } or { | ||
18767 | find mustInRelationsource_reference_Transition(problem,interpretation,source,target); | ||
18768 | } | ||
18769 | /** | ||
18770 | * Matcher for detecting tuples t where []regions reference CompositeElement(source,target) | ||
18771 | */ | ||
18772 | private pattern mustInRelationregions_reference_CompositeElement( | ||
18773 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18774 | source: DefinedElement, target:DefinedElement) | ||
18775 | { | ||
18776 | find interpretation(problem,interpretation); | ||
18777 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
18778 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"regions reference CompositeElement"); | ||
18779 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
18780 | BinaryElementRelationLink.param1(link,source); | ||
18781 | BinaryElementRelationLink.param2(link,target); | ||
18782 | } | ||
18783 | /** | ||
18784 | * Matcher for detecting tuples t where <>regions reference CompositeElement(source,target) | ||
18785 | */ | ||
18786 | private pattern mayInRelationregions_reference_CompositeElement( | ||
18787 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18788 | source: DefinedElement, target:DefinedElement) | ||
18789 | { | ||
18790 | find interpretation(problem,interpretation); | ||
18791 | // The two endpoint of the link have to exist | ||
18792 | find mayExist(problem, interpretation, source); | ||
18793 | find mayExist(problem, interpretation, target); | ||
18794 | // Type consistency | ||
18795 | find mayInstanceOfCompositeElement_class(problem,interpretation,source); | ||
18796 | find mayInstanceOfRegion_class(problem,interpretation,target); | ||
18797 | // The reference is containment, then a new reference cannot be create if: | ||
18798 | // 1. Multiple parents | ||
18799 | neg find mustContains4(problem,interpretation,_,target); | ||
18800 | // 2. Circle in the containment hierarchy | ||
18801 | neg find mustTransitiveContains(source,target); | ||
18802 | } or { | ||
18803 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target); | ||
18804 | } | ||
18805 | |||
18806 | ////////// | ||
18807 | // 1.3 Relation Definition Indexers | ||
18808 | ////////// | ||
18809 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries entryInRegion | ||
18810 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
18811 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18812 | var_r1, var_e1) | ||
18813 | { | ||
18814 | find interpretation(problem,interpretation); | ||
18815 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
18816 | find mustInstanceOfEntry_class(problem,interpretation,var_e1); | ||
18817 | // r1 is exported | ||
18818 | // e1 is exported | ||
18819 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
18820 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
18821 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
18822 | var_virtual0 == var_e1; | ||
18823 | } | ||
18824 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
18825 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18826 | var_r1, var_e1) | ||
18827 | { | ||
18828 | find interpretation(problem,interpretation); | ||
18829 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
18830 | find mayInstanceOfEntry_class(problem,interpretation,var_e1); | ||
18831 | // r1 is exported | ||
18832 | // e1 is exported | ||
18833 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
18834 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
18835 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
18836 | find mayEquivalent(problem, interpretation, var_virtual0, var_e1); | ||
18837 | } | ||
18838 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion( | ||
18839 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18840 | var_r1, var_e1) | ||
18841 | { | ||
18842 | find interpretation(problem,interpretation); | ||
18843 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
18844 | find mustInstanceOfEntry_class(problem,interpretation,var_e1); | ||
18845 | // r1 is exported | ||
18846 | // e1 is exported | ||
18847 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
18848 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0); | ||
18849 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
18850 | var_virtual0 == var_e1; | ||
18851 | } | ||
18852 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noEntryInRegion | ||
18853 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
18854 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18855 | var_r1) | ||
18856 | { | ||
18857 | find interpretation(problem,interpretation); | ||
18858 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
18859 | // r1 is exported | ||
18860 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
18861 | } | ||
18862 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
18863 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18864 | var_r1) | ||
18865 | { | ||
18866 | find interpretation(problem,interpretation); | ||
18867 | find mayInstanceOfRegion_class(problem,interpretation,var_r1); | ||
18868 | // r1 is exported | ||
18869 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
18870 | } | ||
18871 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion( | ||
18872 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18873 | var_r1) | ||
18874 | { | ||
18875 | find interpretation(problem,interpretation); | ||
18876 | find mustInstanceOfRegion_class(problem,interpretation,var_r1); | ||
18877 | // r1 is exported | ||
18878 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0); | ||
18879 | } | ||
18880 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleEntryInRegion | ||
18881 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
18882 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18883 | var_r) | ||
18884 | { | ||
18885 | find interpretation(problem,interpretation); | ||
18886 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
18887 | // r is exported | ||
18888 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
18889 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
18890 | neg find mayEquivalent(problem, interpretation, var_e1, var_e2); | ||
18891 | } | ||
18892 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
18893 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18894 | var_r) | ||
18895 | { | ||
18896 | find interpretation(problem,interpretation); | ||
18897 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
18898 | // r is exported | ||
18899 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
18900 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
18901 | var_e1 != var_e2; | ||
18902 | } | ||
18903 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion( | ||
18904 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18905 | var_r) | ||
18906 | { | ||
18907 | find interpretation(problem,interpretation); | ||
18908 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
18909 | // r is exported | ||
18910 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1); | ||
18911 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2); | ||
18912 | var_e1 != var_e2; | ||
18913 | } | ||
18914 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries transition | ||
18915 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
18916 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18917 | var_t, var_src, var_trg) | ||
18918 | { | ||
18919 | find interpretation(problem,interpretation); | ||
18920 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
18921 | find mustInstanceOfVertex_class(problem,interpretation,var_src); | ||
18922 | find mustInstanceOfVertex_class(problem,interpretation,var_trg); | ||
18923 | // t is exported | ||
18924 | // src is exported | ||
18925 | // trg is exported | ||
18926 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
18927 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
18928 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
18929 | var_virtual0 == var_src; | ||
18930 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
18931 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
18932 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
18933 | var_virtual1 == var_trg; | ||
18934 | } | ||
18935 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
18936 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18937 | var_t, var_src, var_trg) | ||
18938 | { | ||
18939 | find interpretation(problem,interpretation); | ||
18940 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
18941 | find mayInstanceOfVertex_class(problem,interpretation,var_src); | ||
18942 | find mayInstanceOfVertex_class(problem,interpretation,var_trg); | ||
18943 | // t is exported | ||
18944 | // src is exported | ||
18945 | // trg is exported | ||
18946 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
18947 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
18948 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
18949 | find mayEquivalent(problem, interpretation, var_virtual0, var_src); | ||
18950 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
18951 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
18952 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
18953 | find mayEquivalent(problem, interpretation, var_virtual1, var_trg); | ||
18954 | } | ||
18955 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition( | ||
18956 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18957 | var_t, var_src, var_trg) | ||
18958 | { | ||
18959 | find interpretation(problem,interpretation); | ||
18960 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
18961 | find mustInstanceOfVertex_class(problem,interpretation,var_src); | ||
18962 | find mustInstanceOfVertex_class(problem,interpretation,var_trg); | ||
18963 | // t is exported | ||
18964 | // src is exported | ||
18965 | // trg is exported | ||
18966 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
18967 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0); | ||
18968 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
18969 | var_virtual0 == var_src; | ||
18970 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
18971 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1); | ||
18972 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
18973 | var_virtual1 == var_trg; | ||
18974 | } | ||
18975 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries incomingToEntry | ||
18976 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
18977 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18978 | var_t, var_e) | ||
18979 | { | ||
18980 | find interpretation(problem,interpretation); | ||
18981 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
18982 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
18983 | // t is exported | ||
18984 | // e is exported | ||
18985 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
18986 | } | ||
18987 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
18988 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
18989 | var_t, var_e) | ||
18990 | { | ||
18991 | find interpretation(problem,interpretation); | ||
18992 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
18993 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
18994 | // t is exported | ||
18995 | // e is exported | ||
18996 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
18997 | } | ||
18998 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry( | ||
18999 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19000 | var_t, var_e) | ||
19001 | { | ||
19002 | find interpretation(problem,interpretation); | ||
19003 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
19004 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
19005 | // t is exported | ||
19006 | // e is exported | ||
19007 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e); | ||
19008 | } | ||
19009 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noOutgoingTransitionFromEntry | ||
19010 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
19011 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19012 | var_e) | ||
19013 | { | ||
19014 | find interpretation(problem,interpretation); | ||
19015 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
19016 | // e is exported | ||
19017 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
19018 | } | ||
19019 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
19020 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19021 | var_e) | ||
19022 | { | ||
19023 | find interpretation(problem,interpretation); | ||
19024 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
19025 | // e is exported | ||
19026 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
19027 | } | ||
19028 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry( | ||
19029 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19030 | var_e) | ||
19031 | { | ||
19032 | find interpretation(problem,interpretation); | ||
19033 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
19034 | // e is exported | ||
19035 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1); | ||
19036 | } | ||
19037 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleTransitionFromEntry | ||
19038 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
19039 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19040 | var_e, var_t1, var_t2) | ||
19041 | { | ||
19042 | find interpretation(problem,interpretation); | ||
19043 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
19044 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
19045 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
19046 | // e is exported | ||
19047 | // t1 is exported | ||
19048 | // t2 is exported | ||
19049 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
19050 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
19051 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
19052 | var_virtual0 == var_t1; | ||
19053 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
19054 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
19055 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
19056 | var_virtual1 == var_t2; | ||
19057 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
19058 | } | ||
19059 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
19060 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19061 | var_e, var_t1, var_t2) | ||
19062 | { | ||
19063 | find interpretation(problem,interpretation); | ||
19064 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
19065 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
19066 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
19067 | // e is exported | ||
19068 | // t1 is exported | ||
19069 | // t2 is exported | ||
19070 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
19071 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
19072 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
19073 | find mayEquivalent(problem, interpretation, var_virtual0, var_t1); | ||
19074 | find mayInstanceOfEntry_class(problem,interpretation,var_e); | ||
19075 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
19076 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
19077 | find mayEquivalent(problem, interpretation, var_virtual1, var_t2); | ||
19078 | var_t1 != var_t2; | ||
19079 | } | ||
19080 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry( | ||
19081 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19082 | var_e, var_t1, var_t2) | ||
19083 | { | ||
19084 | find interpretation(problem,interpretation); | ||
19085 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
19086 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
19087 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
19088 | // e is exported | ||
19089 | // t1 is exported | ||
19090 | // t2 is exported | ||
19091 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
19092 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
19093 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
19094 | var_virtual0 == var_t1; | ||
19095 | find mustInstanceOfEntry_class(problem,interpretation,var_e); | ||
19096 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1); | ||
19097 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual1); | ||
19098 | var_virtual1 == var_t2; | ||
19099 | var_t1 != var_t2; | ||
19100 | } | ||
19101 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromExit | ||
19102 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
19103 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19104 | var_t, var_e) | ||
19105 | { | ||
19106 | find interpretation(problem,interpretation); | ||
19107 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
19108 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
19109 | // t is exported | ||
19110 | // e is exported | ||
19111 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
19112 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
19113 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
19114 | var_virtual0 == var_t; | ||
19115 | } | ||
19116 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
19117 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19118 | var_t, var_e) | ||
19119 | { | ||
19120 | find interpretation(problem,interpretation); | ||
19121 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
19122 | find mayInstanceOfExit_class(problem,interpretation,var_e); | ||
19123 | // t is exported | ||
19124 | // e is exported | ||
19125 | find mayInstanceOfExit_class(problem,interpretation,var_e); | ||
19126 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
19127 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
19128 | find mayEquivalent(problem, interpretation, var_virtual0, var_t); | ||
19129 | } | ||
19130 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit( | ||
19131 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19132 | var_t, var_e) | ||
19133 | { | ||
19134 | find interpretation(problem,interpretation); | ||
19135 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
19136 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
19137 | // t is exported | ||
19138 | // e is exported | ||
19139 | find mustInstanceOfExit_class(problem,interpretation,var_e); | ||
19140 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0); | ||
19141 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
19142 | var_virtual0 == var_t; | ||
19143 | } | ||
19144 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromFinal | ||
19145 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
19146 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19147 | var_t, var_f) | ||
19148 | { | ||
19149 | find interpretation(problem,interpretation); | ||
19150 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
19151 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
19152 | // t is exported | ||
19153 | // f is exported | ||
19154 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
19155 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
19156 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
19157 | var_virtual0 == var_t; | ||
19158 | } | ||
19159 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
19160 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19161 | var_t, var_f) | ||
19162 | { | ||
19163 | find interpretation(problem,interpretation); | ||
19164 | find mayInstanceOfTransition_class(problem,interpretation,var_t); | ||
19165 | find mayInstanceOfFinalState_class(problem,interpretation,var_f); | ||
19166 | // t is exported | ||
19167 | // f is exported | ||
19168 | find mayInstanceOfFinalState_class(problem,interpretation,var_f); | ||
19169 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
19170 | find mayInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
19171 | find mayEquivalent(problem, interpretation, var_virtual0, var_t); | ||
19172 | } | ||
19173 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal( | ||
19174 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19175 | var_t, var_f) | ||
19176 | { | ||
19177 | find interpretation(problem,interpretation); | ||
19178 | find mustInstanceOfTransition_class(problem,interpretation,var_t); | ||
19179 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
19180 | // t is exported | ||
19181 | // f is exported | ||
19182 | find mustInstanceOfFinalState_class(problem,interpretation,var_f); | ||
19183 | find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0); | ||
19184 | find mustInstanceOfTransition_class(problem,interpretation,var_virtual0); | ||
19185 | var_virtual0 == var_t; | ||
19186 | } | ||
19187 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noStateInRegion | ||
19188 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
19189 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19190 | var_region) | ||
19191 | { | ||
19192 | find interpretation(problem,interpretation); | ||
19193 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
19194 | // region is exported | ||
19195 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
19196 | } | ||
19197 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
19198 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19199 | var_region) | ||
19200 | { | ||
19201 | find interpretation(problem,interpretation); | ||
19202 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
19203 | // region is exported | ||
19204 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
19205 | } | ||
19206 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion( | ||
19207 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19208 | var_region) | ||
19209 | { | ||
19210 | find interpretation(problem,interpretation); | ||
19211 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
19212 | // region is exported | ||
19213 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0); | ||
19214 | } | ||
19215 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries StateInRegion | ||
19216 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
19217 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19218 | var_region, var_state) | ||
19219 | { | ||
19220 | find interpretation(problem,interpretation); | ||
19221 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
19222 | find mustInstanceOfState_class(problem,interpretation,var_state); | ||
19223 | // region is exported | ||
19224 | // state is exported | ||
19225 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
19226 | find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
19227 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
19228 | var_virtual0 == var_state; | ||
19229 | } | ||
19230 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
19231 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19232 | var_region, var_state) | ||
19233 | { | ||
19234 | find interpretation(problem,interpretation); | ||
19235 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
19236 | find mayInstanceOfState_class(problem,interpretation,var_state); | ||
19237 | // region is exported | ||
19238 | // state is exported | ||
19239 | find mayInstanceOfRegion_class(problem,interpretation,var_region); | ||
19240 | find mayInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
19241 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
19242 | find mayEquivalent(problem, interpretation, var_virtual0, var_state); | ||
19243 | } | ||
19244 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion( | ||
19245 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19246 | var_region, var_state) | ||
19247 | { | ||
19248 | find interpretation(problem,interpretation); | ||
19249 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
19250 | find mustInstanceOfState_class(problem,interpretation,var_state); | ||
19251 | // region is exported | ||
19252 | // state is exported | ||
19253 | find mustInstanceOfRegion_class(problem,interpretation,var_region); | ||
19254 | find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0); | ||
19255 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
19256 | var_virtual0 == var_state; | ||
19257 | } | ||
19258 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoOutgoing | ||
19259 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
19260 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19261 | var_c) | ||
19262 | { | ||
19263 | find interpretation(problem,interpretation); | ||
19264 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
19265 | // c is exported | ||
19266 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
19267 | } | ||
19268 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
19269 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19270 | var_c) | ||
19271 | { | ||
19272 | find interpretation(problem,interpretation); | ||
19273 | find mayInstanceOfChoice_class(problem,interpretation,var_c); | ||
19274 | // c is exported | ||
19275 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
19276 | } | ||
19277 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing( | ||
19278 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19279 | var_c) | ||
19280 | { | ||
19281 | find interpretation(problem,interpretation); | ||
19282 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
19283 | // c is exported | ||
19284 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1); | ||
19285 | } | ||
19286 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoIncoming | ||
19287 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
19288 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19289 | var_c) | ||
19290 | { | ||
19291 | find interpretation(problem,interpretation); | ||
19292 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
19293 | // c is exported | ||
19294 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
19295 | } | ||
19296 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
19297 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19298 | var_c) | ||
19299 | { | ||
19300 | find interpretation(problem,interpretation); | ||
19301 | find mayInstanceOfChoice_class(problem,interpretation,var_c); | ||
19302 | // c is exported | ||
19303 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
19304 | } | ||
19305 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming( | ||
19306 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19307 | var_c) | ||
19308 | { | ||
19309 | find interpretation(problem,interpretation); | ||
19310 | find mustInstanceOfChoice_class(problem,interpretation,var_c); | ||
19311 | // c is exported | ||
19312 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c); | ||
19313 | } | ||
19314 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoOutgoing | ||
19315 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
19316 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19317 | var_s) | ||
19318 | { | ||
19319 | find interpretation(problem,interpretation); | ||
19320 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19321 | // s is exported | ||
19322 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
19323 | } | ||
19324 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
19325 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19326 | var_s) | ||
19327 | { | ||
19328 | find interpretation(problem,interpretation); | ||
19329 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19330 | // s is exported | ||
19331 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
19332 | } | ||
19333 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing( | ||
19334 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19335 | var_s) | ||
19336 | { | ||
19337 | find interpretation(problem,interpretation); | ||
19338 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19339 | // s is exported | ||
19340 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1); | ||
19341 | } | ||
19342 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoIncoming | ||
19343 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
19344 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19345 | var_s) | ||
19346 | { | ||
19347 | find interpretation(problem,interpretation); | ||
19348 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19349 | // s is exported | ||
19350 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
19351 | } | ||
19352 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
19353 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19354 | var_s) | ||
19355 | { | ||
19356 | find interpretation(problem,interpretation); | ||
19357 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19358 | // s is exported | ||
19359 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
19360 | } | ||
19361 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming( | ||
19362 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19363 | var_s) | ||
19364 | { | ||
19365 | find interpretation(problem,interpretation); | ||
19366 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19367 | // s is exported | ||
19368 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s); | ||
19369 | } | ||
19370 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedIncomingInSameRegion | ||
19371 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
19372 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19373 | var_s, var_v1, var_v2) | ||
19374 | { | ||
19375 | find interpretation(problem,interpretation); | ||
19376 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19377 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
19378 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
19379 | // s is exported | ||
19380 | // v1 is exported | ||
19381 | // v2 is exported | ||
19382 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
19383 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
19384 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
19385 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
19386 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
19387 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
19388 | var_virtual0 == var_v1; | ||
19389 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
19390 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
19391 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19392 | var_virtual1 == var_v2; | ||
19393 | }or{ | ||
19394 | find interpretation(problem,interpretation); | ||
19395 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19396 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
19397 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
19398 | // s is exported | ||
19399 | // v1 is exported | ||
19400 | // v2 is exported | ||
19401 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
19402 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
19403 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
19404 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
19405 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
19406 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
19407 | var_virtual0 == var_v1; | ||
19408 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
19409 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
19410 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19411 | var_virtual1 == var_v2; | ||
19412 | } | ||
19413 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
19414 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19415 | var_s, var_v1, var_v2) | ||
19416 | { | ||
19417 | find interpretation(problem,interpretation); | ||
19418 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19419 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
19420 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
19421 | // s is exported | ||
19422 | // v1 is exported | ||
19423 | // v2 is exported | ||
19424 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
19425 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
19426 | var_t1 != var_t2; | ||
19427 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
19428 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
19429 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
19430 | find mayEquivalent(problem, interpretation, var_virtual0, var_v1); | ||
19431 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
19432 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
19433 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19434 | find mayEquivalent(problem, interpretation, var_virtual1, var_v2); | ||
19435 | }or{ | ||
19436 | find interpretation(problem,interpretation); | ||
19437 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19438 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
19439 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
19440 | // s is exported | ||
19441 | // v1 is exported | ||
19442 | // v2 is exported | ||
19443 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
19444 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
19445 | var_t1 != var_t2; | ||
19446 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
19447 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
19448 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
19449 | find mayEquivalent(problem, interpretation, var_virtual0, var_v1); | ||
19450 | find mayInstanceOfRegion_class(problem,interpretation,var_r); | ||
19451 | find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
19452 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19453 | find mayEquivalent(problem, interpretation, var_virtual1, var_v2); | ||
19454 | } | ||
19455 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion( | ||
19456 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19457 | var_s, var_v1, var_v2) | ||
19458 | { | ||
19459 | find interpretation(problem,interpretation); | ||
19460 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19461 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
19462 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
19463 | // s is exported | ||
19464 | // v1 is exported | ||
19465 | // v2 is exported | ||
19466 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s); | ||
19467 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s); | ||
19468 | var_t1 != var_t2; | ||
19469 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
19470 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
19471 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
19472 | var_virtual0 == var_v1; | ||
19473 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
19474 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
19475 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19476 | var_virtual1 == var_v2; | ||
19477 | }or{ | ||
19478 | find interpretation(problem,interpretation); | ||
19479 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19480 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
19481 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
19482 | // s is exported | ||
19483 | // v1 is exported | ||
19484 | // v2 is exported | ||
19485 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1); | ||
19486 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2); | ||
19487 | var_t1 != var_t2; | ||
19488 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
19489 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0); | ||
19490 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
19491 | var_virtual0 == var_v1; | ||
19492 | find mustInstanceOfRegion_class(problem,interpretation,var_r); | ||
19493 | find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1); | ||
19494 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19495 | var_virtual1 == var_v2; | ||
19496 | } | ||
19497 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries notSynchronizingStates | ||
19498 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
19499 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19500 | var_s) | ||
19501 | { | ||
19502 | find interpretation(problem,interpretation); | ||
19503 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19504 | // s is exported | ||
19505 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
19506 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
19507 | } | ||
19508 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
19509 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19510 | var_s) | ||
19511 | { | ||
19512 | find interpretation(problem,interpretation); | ||
19513 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19514 | // s is exported | ||
19515 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
19516 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
19517 | } | ||
19518 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates( | ||
19519 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19520 | var_s) | ||
19521 | { | ||
19522 | find interpretation(problem,interpretation); | ||
19523 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19524 | // s is exported | ||
19525 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s); | ||
19526 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s); | ||
19527 | } | ||
19528 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleOutgoingTrainsition | ||
19529 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
19530 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19531 | var_v) | ||
19532 | { | ||
19533 | find interpretation(problem,interpretation); | ||
19534 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
19535 | // v is exported | ||
19536 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
19537 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
19538 | neg find mayEquivalent(problem, interpretation, var_trg1, var_trg2); | ||
19539 | } | ||
19540 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
19541 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19542 | var_v) | ||
19543 | { | ||
19544 | find interpretation(problem,interpretation); | ||
19545 | find mayInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
19546 | // v is exported | ||
19547 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
19548 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
19549 | var_trg1 != var_trg2; | ||
19550 | } | ||
19551 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition( | ||
19552 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19553 | var_v) | ||
19554 | { | ||
19555 | find interpretation(problem,interpretation); | ||
19556 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
19557 | // v is exported | ||
19558 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1); | ||
19559 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2); | ||
19560 | var_trg1 != var_trg2; | ||
19561 | } | ||
19562 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleIncomingTrainsition | ||
19563 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
19564 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19565 | var_v) | ||
19566 | { | ||
19567 | find interpretation(problem,interpretation); | ||
19568 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
19569 | // v is exported | ||
19570 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
19571 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
19572 | neg find mayEquivalent(problem, interpretation, var_src1, var_src2); | ||
19573 | } | ||
19574 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
19575 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19576 | var_v) | ||
19577 | { | ||
19578 | find interpretation(problem,interpretation); | ||
19579 | find mayInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
19580 | // v is exported | ||
19581 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
19582 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
19583 | var_src1 != var_src2; | ||
19584 | } | ||
19585 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition( | ||
19586 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19587 | var_v) | ||
19588 | { | ||
19589 | find interpretation(problem,interpretation); | ||
19590 | find mustInstanceOfSynchronization_class(problem,interpretation,var_v); | ||
19591 | // v is exported | ||
19592 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v); | ||
19593 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v); | ||
19594 | var_src1 != var_src2; | ||
19595 | } | ||
19596 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionsAreNotSiblings | ||
19597 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
19598 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19599 | var_s, var_v1, var_v2) | ||
19600 | { | ||
19601 | find interpretation(problem,interpretation); | ||
19602 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19603 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
19604 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
19605 | // s is exported | ||
19606 | // v1 is exported | ||
19607 | // v2 is exported | ||
19608 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
19609 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
19610 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
19611 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
19612 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
19613 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
19614 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19615 | var_virtual1 == var_v1; | ||
19616 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
19617 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
19618 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
19619 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
19620 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
19621 | var_virtual3 == var_v2; | ||
19622 | neg find mayEquivalent(problem, interpretation, var_r1, var_r2); | ||
19623 | }or{ | ||
19624 | find interpretation(problem,interpretation); | ||
19625 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19626 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
19627 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
19628 | // s is exported | ||
19629 | // v1 is exported | ||
19630 | // v2 is exported | ||
19631 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
19632 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
19633 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
19634 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
19635 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
19636 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
19637 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19638 | var_virtual1 == var_v1; | ||
19639 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
19640 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
19641 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
19642 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
19643 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
19644 | var_virtual3 == var_v2; | ||
19645 | neg find mayEquivalent(problem, interpretation, var_r1, var_r2); | ||
19646 | } | ||
19647 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
19648 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19649 | var_s, var_v1, var_v2) | ||
19650 | { | ||
19651 | find interpretation(problem,interpretation); | ||
19652 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19653 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
19654 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
19655 | // s is exported | ||
19656 | // v1 is exported | ||
19657 | // v2 is exported | ||
19658 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
19659 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
19660 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
19661 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
19662 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
19663 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
19664 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19665 | find mayEquivalent(problem, interpretation, var_virtual1, var_v1); | ||
19666 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
19667 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
19668 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
19669 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
19670 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
19671 | find mayEquivalent(problem, interpretation, var_virtual3, var_v2); | ||
19672 | var_r1 != var_r2; | ||
19673 | }or{ | ||
19674 | find interpretation(problem,interpretation); | ||
19675 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19676 | find mayInstanceOfVertex_class(problem,interpretation,var_v1); | ||
19677 | find mayInstanceOfVertex_class(problem,interpretation,var_v2); | ||
19678 | // s is exported | ||
19679 | // v1 is exported | ||
19680 | // v2 is exported | ||
19681 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
19682 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
19683 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
19684 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
19685 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
19686 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
19687 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19688 | find mayEquivalent(problem, interpretation, var_virtual1, var_v1); | ||
19689 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
19690 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
19691 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
19692 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
19693 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
19694 | find mayEquivalent(problem, interpretation, var_virtual3, var_v2); | ||
19695 | var_r1 != var_r2; | ||
19696 | } | ||
19697 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings( | ||
19698 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19699 | var_s, var_v1, var_v2) | ||
19700 | { | ||
19701 | find interpretation(problem,interpretation); | ||
19702 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19703 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
19704 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
19705 | // s is exported | ||
19706 | // v1 is exported | ||
19707 | // v2 is exported | ||
19708 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s); | ||
19709 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s); | ||
19710 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
19711 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
19712 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
19713 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
19714 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19715 | var_virtual1 == var_v1; | ||
19716 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
19717 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
19718 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
19719 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
19720 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
19721 | var_virtual3 == var_v2; | ||
19722 | var_r1 != var_r2; | ||
19723 | }or{ | ||
19724 | find interpretation(problem,interpretation); | ||
19725 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19726 | find mustInstanceOfVertex_class(problem,interpretation,var_v1); | ||
19727 | find mustInstanceOfVertex_class(problem,interpretation,var_v2); | ||
19728 | // s is exported | ||
19729 | // v1 is exported | ||
19730 | // v2 is exported | ||
19731 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1); | ||
19732 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2); | ||
19733 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1); | ||
19734 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0); | ||
19735 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
19736 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
19737 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19738 | var_virtual1 == var_v1; | ||
19739 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2); | ||
19740 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2); | ||
19741 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual2); | ||
19742 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3); | ||
19743 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual3); | ||
19744 | var_virtual3 == var_v2; | ||
19745 | var_r1 != var_r2; | ||
19746 | } | ||
19747 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries child | ||
19748 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
19749 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19750 | var_parent, var_child) | ||
19751 | { | ||
19752 | find interpretation(problem,interpretation); | ||
19753 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
19754 | find mustInstanceOfVertex_class(problem,interpretation,var_child); | ||
19755 | // parent is exported | ||
19756 | // child is exported | ||
19757 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
19758 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
19759 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
19760 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
19761 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19762 | var_virtual1 == var_child; | ||
19763 | } | ||
19764 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
19765 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19766 | var_parent, var_child) | ||
19767 | { | ||
19768 | find interpretation(problem,interpretation); | ||
19769 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
19770 | find mayInstanceOfVertex_class(problem,interpretation,var_child); | ||
19771 | // parent is exported | ||
19772 | // child is exported | ||
19773 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
19774 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
19775 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
19776 | find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
19777 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19778 | find mayEquivalent(problem, interpretation, var_virtual1, var_child); | ||
19779 | } | ||
19780 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child( | ||
19781 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19782 | var_parent, var_child) | ||
19783 | { | ||
19784 | find interpretation(problem,interpretation); | ||
19785 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
19786 | find mustInstanceOfVertex_class(problem,interpretation,var_child); | ||
19787 | // parent is exported | ||
19788 | // child is exported | ||
19789 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent); | ||
19790 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0); | ||
19791 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
19792 | find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1); | ||
19793 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19794 | var_virtual1 == var_child; | ||
19795 | } | ||
19796 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionDoesNotHaveMultipleRegions | ||
19797 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
19798 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19799 | var_s, var_v) | ||
19800 | { | ||
19801 | find interpretation(problem,interpretation); | ||
19802 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19803 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
19804 | // s is exported | ||
19805 | // v is exported | ||
19806 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
19807 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
19808 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
19809 | }or{ | ||
19810 | find interpretation(problem,interpretation); | ||
19811 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19812 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
19813 | // s is exported | ||
19814 | // v is exported | ||
19815 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
19816 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
19817 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
19818 | } | ||
19819 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
19820 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19821 | var_s, var_v) | ||
19822 | { | ||
19823 | find interpretation(problem,interpretation); | ||
19824 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19825 | find mayInstanceOfVertex_class(problem,interpretation,var_v); | ||
19826 | // s is exported | ||
19827 | // v is exported | ||
19828 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
19829 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
19830 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
19831 | }or{ | ||
19832 | find interpretation(problem,interpretation); | ||
19833 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19834 | find mayInstanceOfVertex_class(problem,interpretation,var_v); | ||
19835 | // s is exported | ||
19836 | // v is exported | ||
19837 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
19838 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
19839 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
19840 | } | ||
19841 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions( | ||
19842 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19843 | var_s, var_v) | ||
19844 | { | ||
19845 | find interpretation(problem,interpretation); | ||
19846 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19847 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
19848 | // s is exported | ||
19849 | // v is exported | ||
19850 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s); | ||
19851 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
19852 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
19853 | }or{ | ||
19854 | find interpretation(problem,interpretation); | ||
19855 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19856 | find mustInstanceOfVertex_class(problem,interpretation,var_v); | ||
19857 | // s is exported | ||
19858 | // v is exported | ||
19859 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v); | ||
19860 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v); | ||
19861 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c); | ||
19862 | } | ||
19863 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleRegions | ||
19864 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
19865 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19866 | var_composite) | ||
19867 | { | ||
19868 | find interpretation(problem,interpretation); | ||
19869 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
19870 | // composite is exported | ||
19871 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
19872 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
19873 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
19874 | var_virtual0 == var_region1; | ||
19875 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
19876 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
19877 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
19878 | var_virtual1 == var_region2; | ||
19879 | neg find mayEquivalent(problem, interpretation, var_region1, var_region2); | ||
19880 | } | ||
19881 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
19882 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19883 | var_composite) | ||
19884 | { | ||
19885 | find interpretation(problem,interpretation); | ||
19886 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
19887 | // composite is exported | ||
19888 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
19889 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
19890 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
19891 | find mayEquivalent(problem, interpretation, var_virtual0, var_region1); | ||
19892 | find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
19893 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
19894 | find mayInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
19895 | find mayEquivalent(problem, interpretation, var_virtual1, var_region2); | ||
19896 | var_region1 != var_region2; | ||
19897 | } | ||
19898 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions( | ||
19899 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19900 | var_composite) | ||
19901 | { | ||
19902 | find interpretation(problem,interpretation); | ||
19903 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
19904 | // composite is exported | ||
19905 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
19906 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0); | ||
19907 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual0); | ||
19908 | var_virtual0 == var_region1; | ||
19909 | find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite); | ||
19910 | find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1); | ||
19911 | find mustInstanceOfRegion_class(problem,interpretation,var_virtual1); | ||
19912 | var_virtual1 == var_region2; | ||
19913 | var_region1 != var_region2; | ||
19914 | } | ||
19915 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchThree | ||
19916 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
19917 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19918 | var_s) | ||
19919 | { | ||
19920 | find interpretation(problem,interpretation); | ||
19921 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19922 | // s is exported | ||
19923 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
19924 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
19925 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
19926 | var_virtual0 == var_s; | ||
19927 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
19928 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
19929 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19930 | var_virtual1 == var_s; | ||
19931 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
19932 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
19933 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
19934 | var_virtual2 == var_s; | ||
19935 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
19936 | neg find mayEquivalent(problem, interpretation, var_t2, var_t3); | ||
19937 | neg find mayEquivalent(problem, interpretation, var_t1, var_t3); | ||
19938 | }or{ | ||
19939 | find interpretation(problem,interpretation); | ||
19940 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19941 | // s is exported | ||
19942 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
19943 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
19944 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
19945 | var_virtual0 == var_s; | ||
19946 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
19947 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
19948 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19949 | var_virtual1 == var_s; | ||
19950 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
19951 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
19952 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
19953 | var_virtual2 == var_s; | ||
19954 | neg find mayEquivalent(problem, interpretation, var_t1, var_t2); | ||
19955 | neg find mayEquivalent(problem, interpretation, var_t2, var_t3); | ||
19956 | neg find mayEquivalent(problem, interpretation, var_t1, var_t3); | ||
19957 | } | ||
19958 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
19959 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
19960 | var_s) | ||
19961 | { | ||
19962 | find interpretation(problem,interpretation); | ||
19963 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19964 | // s is exported | ||
19965 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
19966 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
19967 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
19968 | find mayEquivalent(problem, interpretation, var_virtual0, var_s); | ||
19969 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
19970 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
19971 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19972 | find mayEquivalent(problem, interpretation, var_virtual1, var_s); | ||
19973 | find mayInstanceOfTransition_class(problem,interpretation,var_t3); | ||
19974 | find mayInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
19975 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
19976 | find mayEquivalent(problem, interpretation, var_virtual2, var_s); | ||
19977 | var_t1 != var_t2; | ||
19978 | var_t2 != var_t3; | ||
19979 | var_t1 != var_t3; | ||
19980 | }or{ | ||
19981 | find interpretation(problem,interpretation); | ||
19982 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
19983 | // s is exported | ||
19984 | find mayInstanceOfTransition_class(problem,interpretation,var_t1); | ||
19985 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
19986 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
19987 | find mayEquivalent(problem, interpretation, var_virtual0, var_s); | ||
19988 | find mayInstanceOfTransition_class(problem,interpretation,var_t2); | ||
19989 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
19990 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
19991 | find mayEquivalent(problem, interpretation, var_virtual1, var_s); | ||
19992 | find mayInstanceOfTransition_class(problem,interpretation,var_t3); | ||
19993 | find mayInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
19994 | find mayInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
19995 | find mayEquivalent(problem, interpretation, var_virtual2, var_s); | ||
19996 | var_t1 != var_t2; | ||
19997 | var_t2 != var_t3; | ||
19998 | var_t1 != var_t3; | ||
19999 | } | ||
20000 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree( | ||
20001 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20002 | var_s) | ||
20003 | { | ||
20004 | find interpretation(problem,interpretation); | ||
20005 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
20006 | // s is exported | ||
20007 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
20008 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
20009 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
20010 | var_virtual0 == var_s; | ||
20011 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
20012 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
20013 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
20014 | var_virtual1 == var_s; | ||
20015 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
20016 | find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
20017 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
20018 | var_virtual2 == var_s; | ||
20019 | var_t1 != var_t2; | ||
20020 | var_t2 != var_t3; | ||
20021 | var_t1 != var_t3; | ||
20022 | }or{ | ||
20023 | find interpretation(problem,interpretation); | ||
20024 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s); | ||
20025 | // s is exported | ||
20026 | find mustInstanceOfTransition_class(problem,interpretation,var_t1); | ||
20027 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0); | ||
20028 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual0); | ||
20029 | var_virtual0 == var_s; | ||
20030 | find mustInstanceOfTransition_class(problem,interpretation,var_t2); | ||
20031 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1); | ||
20032 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual1); | ||
20033 | var_virtual1 == var_s; | ||
20034 | find mustInstanceOfTransition_class(problem,interpretation,var_t3); | ||
20035 | find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2); | ||
20036 | find mustInstanceOfVertex_class(problem,interpretation,var_virtual2); | ||
20037 | var_virtual2 == var_s; | ||
20038 | var_t1 != var_t2; | ||
20039 | var_t2 != var_t3; | ||
20040 | var_t1 != var_t3; | ||
20041 | } | ||
20042 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries twoSynch | ||
20043 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
20044 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20045 | var_s1, var_s2) | ||
20046 | { | ||
20047 | find interpretation(problem,interpretation); | ||
20048 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
20049 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
20050 | // s1 is exported | ||
20051 | // s2 is exported | ||
20052 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
20053 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
20054 | neg find mayEquivalent(problem, interpretation, var_s1, var_s2); | ||
20055 | } | ||
20056 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
20057 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20058 | var_s1, var_s2) | ||
20059 | { | ||
20060 | find interpretation(problem,interpretation); | ||
20061 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
20062 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
20063 | // s1 is exported | ||
20064 | // s2 is exported | ||
20065 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
20066 | find mayInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
20067 | var_s1 != var_s2; | ||
20068 | } | ||
20069 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch( | ||
20070 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20071 | var_s1, var_s2) | ||
20072 | { | ||
20073 | find interpretation(problem,interpretation); | ||
20074 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
20075 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
20076 | // s1 is exported | ||
20077 | // s2 is exported | ||
20078 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s1); | ||
20079 | find mustInstanceOfSynchronization_class(problem,interpretation,var_s2); | ||
20080 | var_s1 != var_s2; | ||
20081 | } | ||
20082 | |||
20083 | ////////// | ||
20084 | // 1.4 Containment Indexer | ||
20085 | ////////// | ||
20086 | private pattern mustContains2(source: DefinedElement, target: DefinedElement) { | ||
20087 | find mustContains4(_,_,source,target); | ||
20088 | } | ||
20089 | |||
20090 | private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20091 | source: DefinedElement, target: DefinedElement) | ||
20092 | { find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target); }or | ||
20093 | |||
20094 | { find mustInRelationvertices_reference_Region(problem,interpretation,source,target); }or | ||
20095 | |||
20096 | { find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target); } | ||
20097 | |||
20098 | private pattern mustTransitiveContains(source,target) { | ||
20099 | find mustContains2+(source,target); | ||
20100 | } | ||
20101 | |||
20102 | ////////// | ||
20103 | // 2. Invalidation Indexers | ||
20104 | ////////// | ||
20105 | // 2.1 Invalidated by WF Queries | ||
20106 | ////////// | ||
20107 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20108 | var_r1) | ||
20109 | { | ||
20110 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1); | ||
20111 | } | ||
20112 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20113 | var_r) | ||
20114 | { | ||
20115 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r); | ||
20116 | } | ||
20117 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20118 | var_t, var_e) | ||
20119 | { | ||
20120 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e); | ||
20121 | } | ||
20122 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20123 | var_e) | ||
20124 | { | ||
20125 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e); | ||
20126 | } | ||
20127 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20128 | var_e, var_t1, var_t2) | ||
20129 | { | ||
20130 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2); | ||
20131 | } | ||
20132 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20133 | var_t, var_e) | ||
20134 | { | ||
20135 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e); | ||
20136 | } | ||
20137 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20138 | var_t, var_f) | ||
20139 | { | ||
20140 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f); | ||
20141 | } | ||
20142 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20143 | var_region) | ||
20144 | { | ||
20145 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region); | ||
20146 | } | ||
20147 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20148 | var_c) | ||
20149 | { | ||
20150 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c); | ||
20151 | } | ||
20152 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20153 | var_c) | ||
20154 | { | ||
20155 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c); | ||
20156 | } | ||
20157 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20158 | var_s) | ||
20159 | { | ||
20160 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s); | ||
20161 | } | ||
20162 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20163 | var_s) | ||
20164 | { | ||
20165 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s); | ||
20166 | } | ||
20167 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20168 | var_s, var_v1, var_v2) | ||
20169 | { | ||
20170 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2); | ||
20171 | } | ||
20172 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20173 | var_s) | ||
20174 | { | ||
20175 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s); | ||
20176 | } | ||
20177 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20178 | var_s, var_v1, var_v2) | ||
20179 | { | ||
20180 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2); | ||
20181 | } | ||
20182 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20183 | var_s, var_v) | ||
20184 | { | ||
20185 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v); | ||
20186 | } | ||
20187 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20188 | var_s) | ||
20189 | { | ||
20190 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s); | ||
20191 | } | ||
20192 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20193 | var_s1, var_s2) | ||
20194 | { | ||
20195 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2); | ||
20196 | } | ||
20197 | |||
20198 | ////////// | ||
20199 | // 3. Unfinishedness Indexers | ||
20200 | ////////// | ||
20201 | // 3.1 Unfinishedness Measured by Multiplicity | ||
20202 | ////////// | ||
20203 | pattern unfinishedLowerMultiplicity_target_reference_Transition(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
20204 | find interpretation(problem,interpretation); | ||
20205 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
20206 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition"); | ||
20207 | find mustInstanceOfTransition_class(problem,interpretation,object); | ||
20208 | numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,object,_); | ||
20209 | check(numberOfExistingReferences < 1); | ||
20210 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
20211 | } | ||
20212 | |||
20213 | ////////// | ||
20214 | // 3.2 Unfinishedness Measured by WF Queries | ||
20215 | ////////// | ||
20216 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20217 | var_r1) | ||
20218 | { | ||
20219 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1); | ||
20220 | } | ||
20221 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20222 | var_r) | ||
20223 | { | ||
20224 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r); | ||
20225 | } | ||
20226 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20227 | var_t, var_e) | ||
20228 | { | ||
20229 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e); | ||
20230 | } | ||
20231 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20232 | var_e) | ||
20233 | { | ||
20234 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e); | ||
20235 | } | ||
20236 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20237 | var_e, var_t1, var_t2) | ||
20238 | { | ||
20239 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2); | ||
20240 | } | ||
20241 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20242 | var_t, var_e) | ||
20243 | { | ||
20244 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e); | ||
20245 | } | ||
20246 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20247 | var_t, var_f) | ||
20248 | { | ||
20249 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f); | ||
20250 | } | ||
20251 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20252 | var_region) | ||
20253 | { | ||
20254 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region); | ||
20255 | } | ||
20256 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20257 | var_c) | ||
20258 | { | ||
20259 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c); | ||
20260 | } | ||
20261 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20262 | var_c) | ||
20263 | { | ||
20264 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c); | ||
20265 | } | ||
20266 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20267 | var_s) | ||
20268 | { | ||
20269 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s); | ||
20270 | } | ||
20271 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20272 | var_s) | ||
20273 | { | ||
20274 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s); | ||
20275 | } | ||
20276 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20277 | var_s, var_v1, var_v2) | ||
20278 | { | ||
20279 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2); | ||
20280 | } | ||
20281 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20282 | var_s) | ||
20283 | { | ||
20284 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s); | ||
20285 | } | ||
20286 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20287 | var_s, var_v1, var_v2) | ||
20288 | { | ||
20289 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2); | ||
20290 | } | ||
20291 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20292 | var_s, var_v) | ||
20293 | { | ||
20294 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v); | ||
20295 | } | ||
20296 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20297 | var_s) | ||
20298 | { | ||
20299 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s); | ||
20300 | } | ||
20301 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation, | ||
20302 | var_s1, var_s2) | ||
20303 | { | ||
20304 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2); | ||
20305 | } | ||
20306 | |||
20307 | ////////// | ||
20308 | // 4. Refinement Indexers | ||
20309 | ////////// | ||
20310 | // 4.1 Object constructors | ||
20311 | ////////// | ||
20312 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) | ||
20313 | { | ||
20314 | find interpretation(problem,interpretation); | ||
20315 | find mustInstanceOfPseudostate_class(problem,interpretation,root); | ||
20316 | find mustExist(problem, interpretation, root); | ||
20317 | }or{ | ||
20318 | find interpretation(problem,interpretation); | ||
20319 | find mustInstanceOfEntry_class(problem,interpretation,root); | ||
20320 | find mustExist(problem, interpretation, root); | ||
20321 | }or{ | ||
20322 | find interpretation(problem,interpretation); | ||
20323 | find mustInstanceOfTransition_class(problem,interpretation,root); | ||
20324 | find mustExist(problem, interpretation, root); | ||
20325 | }or{ | ||
20326 | find interpretation(problem,interpretation); | ||
20327 | find mustInstanceOfCompositeElement_class(problem,interpretation,root); | ||
20328 | find mustExist(problem, interpretation, root); | ||
20329 | }or{ | ||
20330 | find interpretation(problem,interpretation); | ||
20331 | find mustInstanceOfState_class(problem,interpretation,root); | ||
20332 | find mustExist(problem, interpretation, root); | ||
20333 | }or{ | ||
20334 | find interpretation(problem,interpretation); | ||
20335 | find mustInstanceOfChoice_class(problem,interpretation,root); | ||
20336 | find mustExist(problem, interpretation, root); | ||
20337 | }or{ | ||
20338 | find interpretation(problem,interpretation); | ||
20339 | find mustInstanceOfRegularState_class(problem,interpretation,root); | ||
20340 | find mustExist(problem, interpretation, root); | ||
20341 | }or{ | ||
20342 | find interpretation(problem,interpretation); | ||
20343 | find mustInstanceOfRegion_class(problem,interpretation,root); | ||
20344 | find mustExist(problem, interpretation, root); | ||
20345 | }or{ | ||
20346 | find interpretation(problem,interpretation); | ||
20347 | find mustInstanceOfVertex_class(problem,interpretation,root); | ||
20348 | find mustExist(problem, interpretation, root); | ||
20349 | }or{ | ||
20350 | find interpretation(problem,interpretation); | ||
20351 | find mustInstanceOfExit_class(problem,interpretation,root); | ||
20352 | find mustExist(problem, interpretation, root); | ||
20353 | }or{ | ||
20354 | find interpretation(problem,interpretation); | ||
20355 | find mustInstanceOfFinalState_class(problem,interpretation,root); | ||
20356 | find mustExist(problem, interpretation, root); | ||
20357 | }or{ | ||
20358 | find interpretation(problem,interpretation); | ||
20359 | find mustInstanceOfSynchronization_class(problem,interpretation,root); | ||
20360 | find mustExist(problem, interpretation, root); | ||
20361 | }or{ | ||
20362 | find interpretation(problem,interpretation); | ||
20363 | find mustInstanceOfStatechart_class(problem,interpretation,root); | ||
20364 | find mustExist(problem, interpretation, root); | ||
20365 | }or{ | ||
20366 | find interpretation(problem,interpretation); | ||
20367 | find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,root); | ||
20368 | find mustExist(problem, interpretation, root); | ||
20369 | }or{ | ||
20370 | find interpretation(problem,interpretation); | ||
20371 | find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,root); | ||
20372 | find mustExist(problem, interpretation, root); | ||
20373 | }or{ | ||
20374 | find interpretation(problem,interpretation); | ||
20375 | find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,root); | ||
20376 | find mustExist(problem, interpretation, root); | ||
20377 | }or{ | ||
20378 | find interpretation(problem,interpretation); | ||
20379 | find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,root); | ||
20380 | find mustExist(problem, interpretation, root); | ||
20381 | } | ||
20382 | pattern createObject_Choice_class_by_vertices_reference_Region( | ||
20383 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20384 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
20385 | container:DefinedElement) | ||
20386 | { | ||
20387 | find interpretation(problem,interpretation); | ||
20388 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20389 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class"); | ||
20390 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
20391 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
20392 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
20393 | find mayInstanceOfChoice_class(problem,interpretation,newObject); | ||
20394 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
20395 | find mustExist(problem, interpretation, container); | ||
20396 | neg find mustExist(problem, interpretation, newObject); | ||
20397 | } | ||
20398 | pattern createObject_Choice_class( | ||
20399 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20400 | typeInterpretation:PartialComplexTypeInterpretation) | ||
20401 | { | ||
20402 | find interpretation(problem,interpretation); | ||
20403 | neg find hasElementInContainment(problem,interpretation); | ||
20404 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20405 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class"); | ||
20406 | find mayInstanceOfChoice_class(problem,interpretation,newObject); | ||
20407 | find mayExist(problem, interpretation, newObject); | ||
20408 | neg find mustExist(problem, interpretation, newObject); | ||
20409 | } | ||
20410 | pattern createObject_Statechart_class_UndefinedPart( | ||
20411 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20412 | typeInterpretation:PartialComplexTypeInterpretation) | ||
20413 | { | ||
20414 | find interpretation(problem,interpretation); | ||
20415 | neg find hasElementInContainment(problem,interpretation); | ||
20416 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20417 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Statechart class UndefinedPart"); | ||
20418 | find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,newObject); | ||
20419 | find mayExist(problem, interpretation, newObject); | ||
20420 | neg find mustExist(problem, interpretation, newObject); | ||
20421 | } | ||
20422 | pattern createObject_FinalState_class_by_vertices_reference_Region( | ||
20423 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20424 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
20425 | container:DefinedElement) | ||
20426 | { | ||
20427 | find interpretation(problem,interpretation); | ||
20428 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20429 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class"); | ||
20430 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
20431 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
20432 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
20433 | find mayInstanceOfFinalState_class(problem,interpretation,newObject); | ||
20434 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
20435 | find mustExist(problem, interpretation, container); | ||
20436 | neg find mustExist(problem, interpretation, newObject); | ||
20437 | } | ||
20438 | pattern createObject_FinalState_class( | ||
20439 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20440 | typeInterpretation:PartialComplexTypeInterpretation) | ||
20441 | { | ||
20442 | find interpretation(problem,interpretation); | ||
20443 | neg find hasElementInContainment(problem,interpretation); | ||
20444 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20445 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class"); | ||
20446 | find mayInstanceOfFinalState_class(problem,interpretation,newObject); | ||
20447 | find mayExist(problem, interpretation, newObject); | ||
20448 | neg find mustExist(problem, interpretation, newObject); | ||
20449 | } | ||
20450 | pattern createObject_Region_class_by_regions_reference_CompositeElement( | ||
20451 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20452 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
20453 | container:DefinedElement) | ||
20454 | { | ||
20455 | find interpretation(problem,interpretation); | ||
20456 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20457 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class"); | ||
20458 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
20459 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"regions reference CompositeElement"); | ||
20460 | find mustInstanceOfCompositeElement_class(problem,interpretation,container); | ||
20461 | find mayInstanceOfRegion_class(problem,interpretation,newObject); | ||
20462 | find mayInRelationregions_reference_CompositeElement(problem,interpretation,container,newObject); | ||
20463 | find mustExist(problem, interpretation, container); | ||
20464 | neg find mustExist(problem, interpretation, newObject); | ||
20465 | } | ||
20466 | pattern createObject_Region_class( | ||
20467 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20468 | typeInterpretation:PartialComplexTypeInterpretation) | ||
20469 | { | ||
20470 | find interpretation(problem,interpretation); | ||
20471 | neg find hasElementInContainment(problem,interpretation); | ||
20472 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20473 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class"); | ||
20474 | find mayInstanceOfRegion_class(problem,interpretation,newObject); | ||
20475 | find mayExist(problem, interpretation, newObject); | ||
20476 | neg find mustExist(problem, interpretation, newObject); | ||
20477 | } | ||
20478 | pattern createObject_Entry_class_by_vertices_reference_Region( | ||
20479 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20480 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
20481 | container:DefinedElement) | ||
20482 | { | ||
20483 | find interpretation(problem,interpretation); | ||
20484 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20485 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class"); | ||
20486 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
20487 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
20488 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
20489 | find mayInstanceOfEntry_class(problem,interpretation,newObject); | ||
20490 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
20491 | find mustExist(problem, interpretation, container); | ||
20492 | neg find mustExist(problem, interpretation, newObject); | ||
20493 | } | ||
20494 | pattern createObject_Entry_class( | ||
20495 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20496 | typeInterpretation:PartialComplexTypeInterpretation) | ||
20497 | { | ||
20498 | find interpretation(problem,interpretation); | ||
20499 | neg find hasElementInContainment(problem,interpretation); | ||
20500 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20501 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class"); | ||
20502 | find mayInstanceOfEntry_class(problem,interpretation,newObject); | ||
20503 | find mayExist(problem, interpretation, newObject); | ||
20504 | neg find mustExist(problem, interpretation, newObject); | ||
20505 | } | ||
20506 | pattern createObject_Exit_class_by_vertices_reference_Region( | ||
20507 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20508 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
20509 | container:DefinedElement) | ||
20510 | { | ||
20511 | find interpretation(problem,interpretation); | ||
20512 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20513 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class"); | ||
20514 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
20515 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
20516 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
20517 | find mayInstanceOfExit_class(problem,interpretation,newObject); | ||
20518 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
20519 | find mustExist(problem, interpretation, container); | ||
20520 | neg find mustExist(problem, interpretation, newObject); | ||
20521 | } | ||
20522 | pattern createObject_Exit_class( | ||
20523 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20524 | typeInterpretation:PartialComplexTypeInterpretation) | ||
20525 | { | ||
20526 | find interpretation(problem,interpretation); | ||
20527 | neg find hasElementInContainment(problem,interpretation); | ||
20528 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20529 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class"); | ||
20530 | find mayInstanceOfExit_class(problem,interpretation,newObject); | ||
20531 | find mayExist(problem, interpretation, newObject); | ||
20532 | neg find mustExist(problem, interpretation, newObject); | ||
20533 | } | ||
20534 | pattern createObject_State_class_by_vertices_reference_Region( | ||
20535 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20536 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
20537 | container:DefinedElement) | ||
20538 | { | ||
20539 | find interpretation(problem,interpretation); | ||
20540 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20541 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class"); | ||
20542 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
20543 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
20544 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
20545 | find mayInstanceOfState_class(problem,interpretation,newObject); | ||
20546 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
20547 | find mustExist(problem, interpretation, container); | ||
20548 | neg find mustExist(problem, interpretation, newObject); | ||
20549 | } | ||
20550 | pattern createObject_State_class( | ||
20551 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20552 | typeInterpretation:PartialComplexTypeInterpretation) | ||
20553 | { | ||
20554 | find interpretation(problem,interpretation); | ||
20555 | neg find hasElementInContainment(problem,interpretation); | ||
20556 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20557 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class"); | ||
20558 | find mayInstanceOfState_class(problem,interpretation,newObject); | ||
20559 | find mayExist(problem, interpretation, newObject); | ||
20560 | neg find mustExist(problem, interpretation, newObject); | ||
20561 | } | ||
20562 | pattern createObject_Transition_class_by_outgoingTransitions_reference_Vertex_with_source_reference_Transition( | ||
20563 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20564 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
20565 | container:DefinedElement) | ||
20566 | { | ||
20567 | find interpretation(problem,interpretation); | ||
20568 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20569 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class"); | ||
20570 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
20571 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingTransitions reference Vertex"); | ||
20572 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
20573 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"source reference Transition"); | ||
20574 | find mustInstanceOfVertex_class(problem,interpretation,container); | ||
20575 | find mayInstanceOfTransition_class(problem,interpretation,newObject); | ||
20576 | find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,container,newObject); | ||
20577 | find mustExist(problem, interpretation, container); | ||
20578 | neg find mustExist(problem, interpretation, newObject); | ||
20579 | } | ||
20580 | pattern createObject_Transition_class( | ||
20581 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20582 | typeInterpretation:PartialComplexTypeInterpretation) | ||
20583 | { | ||
20584 | find interpretation(problem,interpretation); | ||
20585 | neg find hasElementInContainment(problem,interpretation); | ||
20586 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20587 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class"); | ||
20588 | find mayInstanceOfTransition_class(problem,interpretation,newObject); | ||
20589 | find mayExist(problem, interpretation, newObject); | ||
20590 | neg find mustExist(problem, interpretation, newObject); | ||
20591 | } | ||
20592 | pattern createObject_Synchronization_class_by_vertices_reference_Region( | ||
20593 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20594 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
20595 | container:DefinedElement) | ||
20596 | { | ||
20597 | find interpretation(problem,interpretation); | ||
20598 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20599 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class"); | ||
20600 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
20601 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); | ||
20602 | find mustInstanceOfRegion_class(problem,interpretation,container); | ||
20603 | find mayInstanceOfSynchronization_class(problem,interpretation,newObject); | ||
20604 | find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); | ||
20605 | find mustExist(problem, interpretation, container); | ||
20606 | neg find mustExist(problem, interpretation, newObject); | ||
20607 | } | ||
20608 | pattern createObject_Synchronization_class( | ||
20609 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20610 | typeInterpretation:PartialComplexTypeInterpretation) | ||
20611 | { | ||
20612 | find interpretation(problem,interpretation); | ||
20613 | neg find hasElementInContainment(problem,interpretation); | ||
20614 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20615 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class"); | ||
20616 | find mayInstanceOfSynchronization_class(problem,interpretation,newObject); | ||
20617 | find mayExist(problem, interpretation, newObject); | ||
20618 | neg find mustExist(problem, interpretation, newObject); | ||
20619 | } | ||
20620 | |||
20621 | ////////// | ||
20622 | // 4.2 Type refinement | ||
20623 | ////////// | ||
20624 | pattern refineTypeTo_Choice_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
20625 | find interpretation(problem,interpretation); | ||
20626 | PartialInterpretation.newElements(interpretation,element); | ||
20627 | find mayInstanceOfChoice_class(problem,interpretation,element); | ||
20628 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
20629 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
20630 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
20631 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
20632 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
20633 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
20634 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
20635 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
20636 | } | ||
20637 | pattern refineTypeTo_Statechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
20638 | find interpretation(problem,interpretation); | ||
20639 | PartialInterpretation.newElements(interpretation,element); | ||
20640 | find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); | ||
20641 | neg find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); | ||
20642 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
20643 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
20644 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
20645 | } | ||
20646 | pattern refineTypeTo_FinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
20647 | find interpretation(problem,interpretation); | ||
20648 | PartialInterpretation.newElements(interpretation,element); | ||
20649 | find mayInstanceOfFinalState_class(problem,interpretation,element); | ||
20650 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
20651 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
20652 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
20653 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
20654 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
20655 | } | ||
20656 | pattern refineTypeTo_Region_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
20657 | find interpretation(problem,interpretation); | ||
20658 | PartialInterpretation.newElements(interpretation,element); | ||
20659 | find mayInstanceOfRegion_class(problem,interpretation,element); | ||
20660 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
20661 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
20662 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
20663 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
20664 | } | ||
20665 | pattern refineTypeTo_Entry_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
20666 | find interpretation(problem,interpretation); | ||
20667 | PartialInterpretation.newElements(interpretation,element); | ||
20668 | find mayInstanceOfEntry_class(problem,interpretation,element); | ||
20669 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
20670 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
20671 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
20672 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
20673 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
20674 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
20675 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
20676 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
20677 | } | ||
20678 | pattern refineTypeTo_Exit_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
20679 | find interpretation(problem,interpretation); | ||
20680 | PartialInterpretation.newElements(interpretation,element); | ||
20681 | find mayInstanceOfExit_class(problem,interpretation,element); | ||
20682 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
20683 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
20684 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
20685 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
20686 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
20687 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
20688 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
20689 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
20690 | } | ||
20691 | pattern refineTypeTo_State_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
20692 | find interpretation(problem,interpretation); | ||
20693 | PartialInterpretation.newElements(interpretation,element); | ||
20694 | find mayInstanceOfState_class(problem,interpretation,element); | ||
20695 | neg find mustInstanceOfFinalState_class(problem,interpretation,element); | ||
20696 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
20697 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
20698 | neg find mustInstanceOfState_class(problem,interpretation,element); | ||
20699 | neg find mustInstanceOfStatechart_class(problem,interpretation,element); | ||
20700 | neg find mustInstanceOfPseudostate_class(problem,interpretation,element); | ||
20701 | } | ||
20702 | pattern refineTypeTo_Transition_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
20703 | find interpretation(problem,interpretation); | ||
20704 | PartialInterpretation.newElements(interpretation,element); | ||
20705 | find mayInstanceOfTransition_class(problem,interpretation,element); | ||
20706 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
20707 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
20708 | neg find mustInstanceOfVertex_class(problem,interpretation,element); | ||
20709 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
20710 | } | ||
20711 | pattern refineTypeTo_Synchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
20712 | find interpretation(problem,interpretation); | ||
20713 | PartialInterpretation.newElements(interpretation,element); | ||
20714 | find mayInstanceOfSynchronization_class(problem,interpretation,element); | ||
20715 | neg find mustInstanceOfChoice_class(problem,interpretation,element); | ||
20716 | neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); | ||
20717 | neg find mustInstanceOfRegion_class(problem,interpretation,element); | ||
20718 | neg find mustInstanceOfEntry_class(problem,interpretation,element); | ||
20719 | neg find mustInstanceOfExit_class(problem,interpretation,element); | ||
20720 | neg find mustInstanceOfTransition_class(problem,interpretation,element); | ||
20721 | neg find mustInstanceOfRegularState_class(problem,interpretation,element); | ||
20722 | neg find mustInstanceOfSynchronization_class(problem,interpretation,element); | ||
20723 | } | ||
20724 | |||
20725 | ////////// | ||
20726 | // 4.3 Relation refinement | ||
20727 | ////////// | ||
20728 | pattern refineRelation_incomingTransitions_reference_Vertex_and_target_reference_Transition( | ||
20729 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
20730 | relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, | ||
20731 | from: DefinedElement, to: DefinedElement) | ||
20732 | { | ||
20733 | find interpretation(problem,interpretation); | ||
20734 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
20735 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex"); | ||
20736 | PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); | ||
20737 | PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"target reference Transition"); | ||
20738 | find mustExist(problem, interpretation, from); | ||
20739 | find mustExist(problem, interpretation, to); | ||
20740 | find mustInstanceOfVertex_class(problem,interpretation,from); | ||
20741 | find mustInstanceOfTransition_class(problem,interpretation,to); | ||
20742 | find mayInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to); | ||
20743 | neg find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to); | ||
20744 | } | ||
20745 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
20746 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" | ||
20747 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
20748 | |||
20749 | ////////// | ||
20750 | // 0. Util | ||
20751 | ////////// | ||
20752 | private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
20753 | PartialInterpretation.problem(interpretation,problem); | ||
20754 | } | ||
20755 | |||
20756 | ///////////////////////// | ||
20757 | // 0.1 Existence | ||
20758 | ///////////////////////// | ||
20759 | private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
20760 | find interpretation(problem,interpretation); | ||
20761 | LogicProblem.elements(problem,element); | ||
20762 | } or { | ||
20763 | find interpretation(problem,interpretation); | ||
20764 | PartialInterpretation.newElements(interpretation,element); | ||
20765 | } | ||
20766 | |||
20767 | private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
20768 | find mustExist(problem,interpretation,element); | ||
20769 | } or { | ||
20770 | find interpretation(problem,interpretation); | ||
20771 | neg find elementCloseWorld(element); | ||
20772 | PartialInterpretation.openWorldElements(interpretation,element); | ||
20773 | } | ||
20774 | |||
20775 | private pattern elementCloseWorld(element:DefinedElement) { | ||
20776 | PartialInterpretation.openWorldElements(i,element); | ||
20777 | PartialInterpretation.maxNewElements(i,0); | ||
20778 | } or { | ||
20779 | Scope.targetTypeInterpretation(scope,interpretation); | ||
20780 | PartialTypeInterpratation.elements(interpretation,element); | ||
20781 | Scope.maxNewElements(scope,0); | ||
20782 | } | ||
20783 | |||
20784 | //////////////////////// | ||
20785 | // 0.2 Equivalence | ||
20786 | //////////////////////// | ||
20787 | pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { | ||
20788 | find mayExist(problem,interpretation,a); | ||
20789 | find mayExist(problem,interpretation,b); | ||
20790 | a == b; | ||
20791 | } | ||
20792 | |||
20793 | //////////////////////// | ||
20794 | // 0.3 Required Patterns by TypeIndexer | ||
20795 | //////////////////////// | ||
20796 | private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { | ||
20797 | find interpretation(problem,interpretation); | ||
20798 | LogicProblem.types(problem,type); | ||
20799 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
20800 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
20801 | } | ||
20802 | |||
20803 | private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
20804 | find interpretation(problem,interpretation); | ||
20805 | LogicProblem.types(problem,type); | ||
20806 | TypeDefinition.elements(type,element); | ||
20807 | } or { | ||
20808 | find interpretation(problem,interpretation); | ||
20809 | find typeInterpretation(problem,interpretation,type,typeInterpretation); | ||
20810 | PartialComplexTypeInterpretation.elements(typeInterpretation,element); | ||
20811 | } | ||
20812 | |||
20813 | private pattern isPrimitive(element: PrimitiveElement) { | ||
20814 | PrimitiveElement(element); | ||
20815 | } | ||
20816 | |||
20817 | ////////// | ||
20818 | // 1. Problem-Specific Base Indexers | ||
20819 | ////////// | ||
20820 | // 1.1 Type Indexers | ||
20821 | ////////// | ||
20822 | // 1.1.1 primitive Type Indexers | ||
20823 | ////////// | ||
20824 | |||
20825 | ////////// | ||
20826 | // 1.1.2 domain-specific Type Indexers | ||
20827 | ////////// | ||
20828 | /** | ||
20829 | * An element must be an instance of type "FileSystem class". | ||
20830 | */ | ||
20831 | private pattern mustInstanceOfFileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
20832 | Type.name(type,"FileSystem class"); | ||
20833 | find directInstanceOf(problem,interpretation,element,type); | ||
20834 | } | ||
20835 | private pattern scopeDisallowsNewFileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
20836 | find interpretation(problem,interpretation); | ||
20837 | PartialInterpretation.scopes(interpretation,scope); | ||
20838 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
20839 | Scope.maxNewElements(scope,0); | ||
20840 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
20841 | Type.name(type,"FileSystem class"); | ||
20842 | } | ||
20843 | |||
20844 | /** | ||
20845 | * An element may be an instance of type "FileSystem class". | ||
20846 | */ | ||
20847 | private pattern mayInstanceOfFileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
20848 | { | ||
20849 | find interpretation(problem,interpretation); | ||
20850 | PartialInterpretation.newElements(interpretation,element); | ||
20851 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
20852 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
20853 | neg find scopeDisallowsNewFileSystem_class(problem, interpretation); | ||
20854 | neg find isPrimitive(element); | ||
20855 | } or { | ||
20856 | find interpretation(problem,interpretation); | ||
20857 | PartialInterpretation.openWorldElements(interpretation,element); | ||
20858 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
20859 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
20860 | neg find scopeDisallowsNewFileSystem_class(problem, interpretation); | ||
20861 | neg find isPrimitive(element); | ||
20862 | } or | ||
20863 | { find mustInstanceOfFileSystem_class(problem,interpretation,element); } | ||
20864 | /** | ||
20865 | * An element must be an instance of type "FSObject class". | ||
20866 | */ | ||
20867 | private pattern mustInstanceOfFSObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
20868 | Type.name(type,"FSObject class"); | ||
20869 | find directInstanceOf(problem,interpretation,element,type); | ||
20870 | } | ||
20871 | private pattern scopeDisallowsNewFSObject_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
20872 | find interpretation(problem,interpretation); | ||
20873 | PartialInterpretation.scopes(interpretation,scope); | ||
20874 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
20875 | Scope.maxNewElements(scope,0); | ||
20876 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
20877 | Type.name(type,"FSObject class"); | ||
20878 | } | ||
20879 | |||
20880 | /** | ||
20881 | * An element may be an instance of type "FSObject class". | ||
20882 | */ | ||
20883 | private pattern mayInstanceOfFSObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
20884 | { | ||
20885 | find interpretation(problem,interpretation); | ||
20886 | PartialInterpretation.newElements(interpretation,element); | ||
20887 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
20888 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
20889 | neg find mustInstanceOfFile_class(problem,interpretation,element); | ||
20890 | neg find mustInstanceOfDir_class(problem,interpretation,element); | ||
20891 | neg find scopeDisallowsNewFSObject_class(problem, interpretation); | ||
20892 | neg find isPrimitive(element); | ||
20893 | } or { | ||
20894 | find interpretation(problem,interpretation); | ||
20895 | PartialInterpretation.openWorldElements(interpretation,element); | ||
20896 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
20897 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
20898 | neg find mustInstanceOfFile_class(problem,interpretation,element); | ||
20899 | neg find mustInstanceOfDir_class(problem,interpretation,element); | ||
20900 | neg find scopeDisallowsNewFSObject_class(problem, interpretation); | ||
20901 | neg find isPrimitive(element); | ||
20902 | } or | ||
20903 | { find mustInstanceOfFSObject_class(problem,interpretation,element); } | ||
20904 | /** | ||
20905 | * An element must be an instance of type "Dir class". | ||
20906 | */ | ||
20907 | private pattern mustInstanceOfDir_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
20908 | Type.name(type,"Dir class"); | ||
20909 | find directInstanceOf(problem,interpretation,element,type); | ||
20910 | } | ||
20911 | private pattern scopeDisallowsNewDir_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
20912 | find interpretation(problem,interpretation); | ||
20913 | PartialInterpretation.scopes(interpretation,scope); | ||
20914 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
20915 | Scope.maxNewElements(scope,0); | ||
20916 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
20917 | Type.name(type,"Dir class"); | ||
20918 | } | ||
20919 | |||
20920 | /** | ||
20921 | * An element may be an instance of type "Dir class". | ||
20922 | */ | ||
20923 | private pattern mayInstanceOfDir_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
20924 | { | ||
20925 | find interpretation(problem,interpretation); | ||
20926 | PartialInterpretation.newElements(interpretation,element); | ||
20927 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
20928 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
20929 | neg find mustInstanceOfFile_class(problem,interpretation,element); | ||
20930 | neg find scopeDisallowsNewDir_class(problem, interpretation); | ||
20931 | neg find isPrimitive(element); | ||
20932 | } or { | ||
20933 | find interpretation(problem,interpretation); | ||
20934 | PartialInterpretation.openWorldElements(interpretation,element); | ||
20935 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
20936 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
20937 | neg find mustInstanceOfFile_class(problem,interpretation,element); | ||
20938 | neg find scopeDisallowsNewDir_class(problem, interpretation); | ||
20939 | neg find isPrimitive(element); | ||
20940 | } or | ||
20941 | { find mustInstanceOfDir_class(problem,interpretation,element); } | ||
20942 | /** | ||
20943 | * An element must be an instance of type "File class". | ||
20944 | */ | ||
20945 | private pattern mustInstanceOfFile_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
20946 | Type.name(type,"File class"); | ||
20947 | find directInstanceOf(problem,interpretation,element,type); | ||
20948 | } | ||
20949 | private pattern scopeDisallowsNewFile_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
20950 | find interpretation(problem,interpretation); | ||
20951 | PartialInterpretation.scopes(interpretation,scope); | ||
20952 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
20953 | Scope.maxNewElements(scope,0); | ||
20954 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
20955 | Type.name(type,"File class"); | ||
20956 | } | ||
20957 | |||
20958 | /** | ||
20959 | * An element may be an instance of type "File class". | ||
20960 | */ | ||
20961 | private pattern mayInstanceOfFile_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
20962 | { | ||
20963 | find interpretation(problem,interpretation); | ||
20964 | PartialInterpretation.newElements(interpretation,element); | ||
20965 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
20966 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
20967 | neg find mustInstanceOfDir_class(problem,interpretation,element); | ||
20968 | neg find scopeDisallowsNewFile_class(problem, interpretation); | ||
20969 | neg find isPrimitive(element); | ||
20970 | } or { | ||
20971 | find interpretation(problem,interpretation); | ||
20972 | PartialInterpretation.openWorldElements(interpretation,element); | ||
20973 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
20974 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
20975 | neg find mustInstanceOfDir_class(problem,interpretation,element); | ||
20976 | neg find scopeDisallowsNewFile_class(problem, interpretation); | ||
20977 | neg find isPrimitive(element); | ||
20978 | } or | ||
20979 | { find mustInstanceOfFile_class(problem,interpretation,element); } | ||
20980 | /** | ||
20981 | * An element must be an instance of type "Model class". | ||
20982 | */ | ||
20983 | private pattern mustInstanceOfModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
20984 | Type.name(type,"Model class"); | ||
20985 | find directInstanceOf(problem,interpretation,element,type); | ||
20986 | } | ||
20987 | private pattern scopeDisallowsNewModel_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
20988 | find interpretation(problem,interpretation); | ||
20989 | PartialInterpretation.scopes(interpretation,scope); | ||
20990 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
20991 | Scope.maxNewElements(scope,0); | ||
20992 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
20993 | Type.name(type,"Model class"); | ||
20994 | } | ||
20995 | |||
20996 | /** | ||
20997 | * An element may be an instance of type "Model class". | ||
20998 | */ | ||
20999 | private pattern mayInstanceOfModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
21000 | { | ||
21001 | find interpretation(problem,interpretation); | ||
21002 | PartialInterpretation.newElements(interpretation,element); | ||
21003 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
21004 | neg find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element); | ||
21005 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
21006 | neg find scopeDisallowsNewModel_class(problem, interpretation); | ||
21007 | neg find isPrimitive(element); | ||
21008 | } or { | ||
21009 | find interpretation(problem,interpretation); | ||
21010 | PartialInterpretation.openWorldElements(interpretation,element); | ||
21011 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
21012 | neg find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element); | ||
21013 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
21014 | neg find scopeDisallowsNewModel_class(problem, interpretation); | ||
21015 | neg find isPrimitive(element); | ||
21016 | } or | ||
21017 | { find mustInstanceOfModel_class(problem,interpretation,element); } | ||
21018 | /** | ||
21019 | * An element must be an instance of type "Model class DefinedPart". | ||
21020 | */ | ||
21021 | private pattern mustInstanceOfModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
21022 | Type.name(type,"Model class DefinedPart"); | ||
21023 | find directInstanceOf(problem,interpretation,element,type); | ||
21024 | } | ||
21025 | private pattern scopeDisallowsNewModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
21026 | find interpretation(problem,interpretation); | ||
21027 | PartialInterpretation.scopes(interpretation,scope); | ||
21028 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
21029 | Scope.maxNewElements(scope,0); | ||
21030 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
21031 | Type.name(type,"Model class DefinedPart"); | ||
21032 | } | ||
21033 | |||
21034 | /** | ||
21035 | * An element may be an instance of type "Model class DefinedPart". | ||
21036 | */ | ||
21037 | private pattern mayInstanceOfModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
21038 | { find mustInstanceOfModel_class_DefinedPart(problem,interpretation,element); } | ||
21039 | /** | ||
21040 | * An element must be an instance of type "Model class UndefinedPart". | ||
21041 | */ | ||
21042 | private pattern mustInstanceOfModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
21043 | Type.name(type,"Model class UndefinedPart"); | ||
21044 | find directInstanceOf(problem,interpretation,element,type); | ||
21045 | } | ||
21046 | private pattern scopeDisallowsNewModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
21047 | find interpretation(problem,interpretation); | ||
21048 | PartialInterpretation.scopes(interpretation,scope); | ||
21049 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
21050 | Scope.maxNewElements(scope,0); | ||
21051 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
21052 | Type.name(type,"Model class UndefinedPart"); | ||
21053 | } | ||
21054 | |||
21055 | /** | ||
21056 | * An element may be an instance of type "Model class UndefinedPart". | ||
21057 | */ | ||
21058 | private pattern mayInstanceOfModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
21059 | { | ||
21060 | find interpretation(problem,interpretation); | ||
21061 | PartialInterpretation.newElements(interpretation,element); | ||
21062 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
21063 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
21064 | neg find scopeDisallowsNewModel_class_UndefinedPart(problem, interpretation); | ||
21065 | neg find isPrimitive(element); | ||
21066 | } or { | ||
21067 | find interpretation(problem,interpretation); | ||
21068 | PartialInterpretation.openWorldElements(interpretation,element); | ||
21069 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
21070 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
21071 | neg find scopeDisallowsNewModel_class_UndefinedPart(problem, interpretation); | ||
21072 | neg find isPrimitive(element); | ||
21073 | } or | ||
21074 | { find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element); } | ||
21075 | |||
21076 | ////////// | ||
21077 | // 1.2 Relation Declaration Indexers | ||
21078 | ////////// | ||
21079 | /** | ||
21080 | * Matcher for detecting tuples t where []root reference FileSystem(source,target) | ||
21081 | */ | ||
21082 | private pattern mustInRelationroot_reference_FileSystem( | ||
21083 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21084 | source: DefinedElement, target:DefinedElement) | ||
21085 | { | ||
21086 | find interpretation(problem,interpretation); | ||
21087 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
21088 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"root reference FileSystem"); | ||
21089 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
21090 | BinaryElementRelationLink.param1(link,source); | ||
21091 | BinaryElementRelationLink.param2(link,target); | ||
21092 | } | ||
21093 | /** | ||
21094 | * Matcher for detecting tuples t where <>root reference FileSystem(source,target) | ||
21095 | */ | ||
21096 | private pattern mayInRelationroot_reference_FileSystem( | ||
21097 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21098 | source: DefinedElement, target:DefinedElement) | ||
21099 | { | ||
21100 | find interpretation(problem,interpretation); | ||
21101 | // The two endpoint of the link have to exist | ||
21102 | find mayExist(problem, interpretation, source); | ||
21103 | find mayExist(problem, interpretation, target); | ||
21104 | // Type consistency | ||
21105 | find mayInstanceOfFileSystem_class(problem,interpretation,source); | ||
21106 | find mayInstanceOfDir_class(problem,interpretation,target); | ||
21107 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
21108 | // the upper bound of the multiplicity should be considered. | ||
21109 | numberOfExistingReferences == count find mustInRelationroot_reference_FileSystem(problem,interpretation,source,_); | ||
21110 | check(numberOfExistingReferences < 1); | ||
21111 | // The reference is containment, then a new reference cannot be create if: | ||
21112 | // 1. Multiple parents | ||
21113 | neg find mustContains4(problem,interpretation,_,target); | ||
21114 | // 2. Circle in the containment hierarchy | ||
21115 | neg find mustTransitiveContains(source,target); | ||
21116 | } or { | ||
21117 | find mustInRelationroot_reference_FileSystem(problem,interpretation,source,target); | ||
21118 | } | ||
21119 | /** | ||
21120 | * Matcher for detecting tuples t where []live reference FileSystem(source,target) | ||
21121 | */ | ||
21122 | private pattern mustInRelationlive_reference_FileSystem( | ||
21123 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21124 | source: DefinedElement, target:DefinedElement) | ||
21125 | { | ||
21126 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,source,target); | ||
21127 | } | ||
21128 | /** | ||
21129 | * Matcher for detecting tuples t where []live reference FileSystem(source,target) | ||
21130 | */ | ||
21131 | private pattern mayInRelationlive_reference_FileSystem( | ||
21132 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21133 | source: DefinedElement, target:DefinedElement) | ||
21134 | { | ||
21135 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,source,target); | ||
21136 | } | ||
21137 | /** | ||
21138 | * Matcher for detecting tuples t where []parent reference FSObject(source,target) | ||
21139 | */ | ||
21140 | private pattern mustInRelationparent_reference_FSObject( | ||
21141 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21142 | source: DefinedElement, target:DefinedElement) | ||
21143 | { | ||
21144 | find interpretation(problem,interpretation); | ||
21145 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
21146 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FSObject"); | ||
21147 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
21148 | BinaryElementRelationLink.param1(link,source); | ||
21149 | BinaryElementRelationLink.param2(link,target); | ||
21150 | } | ||
21151 | /** | ||
21152 | * Matcher for detecting tuples t where <>parent reference FSObject(source,target) | ||
21153 | */ | ||
21154 | private pattern mayInRelationparent_reference_FSObject( | ||
21155 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21156 | source: DefinedElement, target:DefinedElement) | ||
21157 | { | ||
21158 | find interpretation(problem,interpretation); | ||
21159 | // The two endpoint of the link have to exist | ||
21160 | find mayExist(problem, interpretation, source); | ||
21161 | find mayExist(problem, interpretation, target); | ||
21162 | // Type consistency | ||
21163 | find mayInstanceOfFSObject_class(problem,interpretation,source); | ||
21164 | find mayInstanceOfDir_class(problem,interpretation,target); | ||
21165 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
21166 | // the upper bound of the multiplicity should be considered. | ||
21167 | numberOfExistingReferences == count find mustInRelationparent_reference_FSObject(problem,interpretation,source,_); | ||
21168 | check(numberOfExistingReferences < 1); | ||
21169 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
21170 | // 1. Multiple parents | ||
21171 | neg find mustContains4(problem,interpretation,source,_); | ||
21172 | // 2. Circle in the containment hierarchy | ||
21173 | neg find mustTransitiveContains(source,target); | ||
21174 | } or { | ||
21175 | find mustInRelationparent_reference_FSObject(problem,interpretation,source,target); | ||
21176 | } | ||
21177 | /** | ||
21178 | * Matcher for detecting tuples t where []contents reference Dir(source,target) | ||
21179 | */ | ||
21180 | private pattern mustInRelationcontents_reference_Dir( | ||
21181 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21182 | source: DefinedElement, target:DefinedElement) | ||
21183 | { | ||
21184 | find interpretation(problem,interpretation); | ||
21185 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
21186 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"contents reference Dir"); | ||
21187 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
21188 | BinaryElementRelationLink.param1(link,source); | ||
21189 | BinaryElementRelationLink.param2(link,target); | ||
21190 | } | ||
21191 | /** | ||
21192 | * Matcher for detecting tuples t where <>contents reference Dir(source,target) | ||
21193 | */ | ||
21194 | private pattern mayInRelationcontents_reference_Dir( | ||
21195 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21196 | source: DefinedElement, target:DefinedElement) | ||
21197 | { | ||
21198 | find interpretation(problem,interpretation); | ||
21199 | // The two endpoint of the link have to exist | ||
21200 | find mayExist(problem, interpretation, source); | ||
21201 | find mayExist(problem, interpretation, target); | ||
21202 | // Type consistency | ||
21203 | find mayInstanceOfDir_class(problem,interpretation,source); | ||
21204 | find mayInstanceOfFSObject_class(problem,interpretation,target); | ||
21205 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
21206 | // the upper bound of the opposite reference multiplicity should be considered. | ||
21207 | numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FSObject(problem,interpretation,target,_); | ||
21208 | check(numberOfExistingOppositeReferences < 1); | ||
21209 | // The reference is containment, then a new reference cannot be create if: | ||
21210 | // 1. Multiple parents | ||
21211 | neg find mustContains4(problem,interpretation,_,target); | ||
21212 | // 2. Circle in the containment hierarchy | ||
21213 | neg find mustTransitiveContains(source,target); | ||
21214 | } or { | ||
21215 | find mustInRelationcontents_reference_Dir(problem,interpretation,source,target); | ||
21216 | } | ||
21217 | /** | ||
21218 | * Matcher for detecting tuples t where []filesystems reference Model(source,target) | ||
21219 | */ | ||
21220 | private pattern mustInRelationfilesystems_reference_Model( | ||
21221 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21222 | source: DefinedElement, target:DefinedElement) | ||
21223 | { | ||
21224 | find interpretation(problem,interpretation); | ||
21225 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
21226 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"filesystems reference Model"); | ||
21227 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
21228 | BinaryElementRelationLink.param1(link,source); | ||
21229 | BinaryElementRelationLink.param2(link,target); | ||
21230 | } | ||
21231 | /** | ||
21232 | * Matcher for detecting tuples t where <>filesystems reference Model(source,target) | ||
21233 | */ | ||
21234 | private pattern mayInRelationfilesystems_reference_Model( | ||
21235 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21236 | source: DefinedElement, target:DefinedElement) | ||
21237 | { | ||
21238 | find interpretation(problem,interpretation); | ||
21239 | // The two endpoint of the link have to exist | ||
21240 | find mayExist(problem, interpretation, source); | ||
21241 | find mayExist(problem, interpretation, target); | ||
21242 | // Type consistency | ||
21243 | find mayInstanceOfModel_class(problem,interpretation,source); | ||
21244 | find mayInstanceOfFileSystem_class(problem,interpretation,target); | ||
21245 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
21246 | // the upper bound of the multiplicity should be considered. | ||
21247 | numberOfExistingReferences == count find mustInRelationfilesystems_reference_Model(problem,interpretation,source,_); | ||
21248 | check(numberOfExistingReferences < 1); | ||
21249 | // The reference is containment, then a new reference cannot be create if: | ||
21250 | // 1. Multiple parents | ||
21251 | neg find mustContains4(problem,interpretation,_,target); | ||
21252 | // 2. Circle in the containment hierarchy | ||
21253 | neg find mustTransitiveContains(source,target); | ||
21254 | } or { | ||
21255 | find mustInRelationfilesystems_reference_Model(problem,interpretation,source,target); | ||
21256 | } | ||
21257 | /** | ||
21258 | * Matcher for detecting tuples t where []otherFSObjects reference Model(source,target) | ||
21259 | */ | ||
21260 | private pattern mustInRelationotherFSObjects_reference_Model( | ||
21261 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21262 | source: DefinedElement, target:DefinedElement) | ||
21263 | { | ||
21264 | find interpretation(problem,interpretation); | ||
21265 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
21266 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"otherFSObjects reference Model"); | ||
21267 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
21268 | BinaryElementRelationLink.param1(link,source); | ||
21269 | BinaryElementRelationLink.param2(link,target); | ||
21270 | } | ||
21271 | /** | ||
21272 | * Matcher for detecting tuples t where <>otherFSObjects reference Model(source,target) | ||
21273 | */ | ||
21274 | private pattern mayInRelationotherFSObjects_reference_Model( | ||
21275 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21276 | source: DefinedElement, target:DefinedElement) | ||
21277 | { | ||
21278 | find interpretation(problem,interpretation); | ||
21279 | // The two endpoint of the link have to exist | ||
21280 | find mayExist(problem, interpretation, source); | ||
21281 | find mayExist(problem, interpretation, target); | ||
21282 | // Type consistency | ||
21283 | find mayInstanceOfModel_class(problem,interpretation,source); | ||
21284 | find mayInstanceOfFSObject_class(problem,interpretation,target); | ||
21285 | // The reference is containment, then a new reference cannot be create if: | ||
21286 | // 1. Multiple parents | ||
21287 | neg find mustContains4(problem,interpretation,_,target); | ||
21288 | // 2. Circle in the containment hierarchy | ||
21289 | neg find mustTransitiveContains(source,target); | ||
21290 | } or { | ||
21291 | find mustInRelationotherFSObjects_reference_Model(problem,interpretation,source,target); | ||
21292 | } | ||
21293 | |||
21294 | ////////// | ||
21295 | // 1.3 Relation Definition Indexers | ||
21296 | ////////// | ||
21297 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test filesystem queries patternContent | ||
21298 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent( | ||
21299 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21300 | var_o1, var_o2) | ||
21301 | { | ||
21302 | find interpretation(problem,interpretation); | ||
21303 | find mustInstanceOfFSObject_class(problem,interpretation,var_o1); | ||
21304 | find mustInstanceOfFSObject_class(problem,interpretation,var_o2); | ||
21305 | // o1 is exported | ||
21306 | // o2 is exported | ||
21307 | find mustInstanceOfDir_class(problem,interpretation,var_o1); | ||
21308 | find mustInRelationcontents_reference_Dir(problem,interpretation,var_o1,var_virtual0); | ||
21309 | find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0); | ||
21310 | var_virtual0 == var_o2; | ||
21311 | } | ||
21312 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent( | ||
21313 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21314 | var_o1, var_o2) | ||
21315 | { | ||
21316 | find interpretation(problem,interpretation); | ||
21317 | find mayInstanceOfFSObject_class(problem,interpretation,var_o1); | ||
21318 | find mayInstanceOfFSObject_class(problem,interpretation,var_o2); | ||
21319 | // o1 is exported | ||
21320 | // o2 is exported | ||
21321 | find mayInstanceOfDir_class(problem,interpretation,var_o1); | ||
21322 | find mayInRelationcontents_reference_Dir(problem,interpretation,var_o1,var_virtual0); | ||
21323 | find mayInstanceOfFSObject_class(problem,interpretation,var_virtual0); | ||
21324 | find mayEquivalent(problem, interpretation, var_virtual0, var_o2); | ||
21325 | } | ||
21326 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent( | ||
21327 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21328 | var_o1, var_o2) | ||
21329 | { | ||
21330 | find interpretation(problem,interpretation); | ||
21331 | find mustInstanceOfFSObject_class(problem,interpretation,var_o1); | ||
21332 | find mustInstanceOfFSObject_class(problem,interpretation,var_o2); | ||
21333 | // o1 is exported | ||
21334 | // o2 is exported | ||
21335 | find mustInstanceOfDir_class(problem,interpretation,var_o1); | ||
21336 | find mustInRelationcontents_reference_Dir(problem,interpretation,var_o1,var_virtual0); | ||
21337 | find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0); | ||
21338 | var_virtual0 == var_o2; | ||
21339 | } | ||
21340 | private pattern twoParam_mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(var_o1, var_o2) { | ||
21341 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(_,_,var_o1, var_o2); | ||
21342 | } | ||
21343 | private pattern twoParam_mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(var_o1, var_o2) { | ||
21344 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(_,_,var_o1, var_o2); | ||
21345 | } | ||
21346 | private pattern twoParam_currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(var_o1, var_o2) { | ||
21347 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(_,_,var_o1, var_o2); | ||
21348 | } | ||
21349 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test filesystem queries live | ||
21350 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live( | ||
21351 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21352 | var_this, var_l) | ||
21353 | { | ||
21354 | find interpretation(problem,interpretation); | ||
21355 | find mustInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
21356 | find mustInstanceOfFSObject_class(problem,interpretation,var_l); | ||
21357 | // this is exported | ||
21358 | // l is exported | ||
21359 | find mustInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
21360 | find mustInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0); | ||
21361 | find mustInstanceOfDir_class(problem,interpretation,var_virtual0); | ||
21362 | var_virtual0 == var_l; | ||
21363 | }or{ | ||
21364 | find interpretation(problem,interpretation); | ||
21365 | find mustInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
21366 | find mustInstanceOfFSObject_class(problem,interpretation,var_l); | ||
21367 | // this is exported | ||
21368 | // l is exported | ||
21369 | find mustInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
21370 | find mustInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0); | ||
21371 | find mustInstanceOfDir_class(problem,interpretation,var_virtual0); | ||
21372 | var_virtual0 == var_root; | ||
21373 | find twoParam_mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent+(var_root,var_l); | ||
21374 | } | ||
21375 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live( | ||
21376 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21377 | var_this, var_l) | ||
21378 | { | ||
21379 | find interpretation(problem,interpretation); | ||
21380 | find mayInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
21381 | find mayInstanceOfFSObject_class(problem,interpretation,var_l); | ||
21382 | // this is exported | ||
21383 | // l is exported | ||
21384 | find mayInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
21385 | find mayInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0); | ||
21386 | find mayInstanceOfDir_class(problem,interpretation,var_virtual0); | ||
21387 | find mayEquivalent(problem, interpretation, var_virtual0, var_l); | ||
21388 | }or{ | ||
21389 | find interpretation(problem,interpretation); | ||
21390 | find mayInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
21391 | find mayInstanceOfFSObject_class(problem,interpretation,var_l); | ||
21392 | // this is exported | ||
21393 | // l is exported | ||
21394 | find mayInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
21395 | find mayInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0); | ||
21396 | find mayInstanceOfDir_class(problem,interpretation,var_virtual0); | ||
21397 | find mayEquivalent(problem, interpretation, var_virtual0, var_root); | ||
21398 | find twoParam_mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent+(var_root,var_l); | ||
21399 | } | ||
21400 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live( | ||
21401 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21402 | var_this, var_l) | ||
21403 | { | ||
21404 | find interpretation(problem,interpretation); | ||
21405 | find mustInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
21406 | find mustInstanceOfFSObject_class(problem,interpretation,var_l); | ||
21407 | // this is exported | ||
21408 | // l is exported | ||
21409 | find mustInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
21410 | find mustInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0); | ||
21411 | find mustInstanceOfDir_class(problem,interpretation,var_virtual0); | ||
21412 | var_virtual0 == var_l; | ||
21413 | }or{ | ||
21414 | find interpretation(problem,interpretation); | ||
21415 | find mustInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
21416 | find mustInstanceOfFSObject_class(problem,interpretation,var_l); | ||
21417 | // this is exported | ||
21418 | // l is exported | ||
21419 | find mustInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
21420 | find mustInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0); | ||
21421 | find mustInstanceOfDir_class(problem,interpretation,var_virtual0); | ||
21422 | var_virtual0 == var_root; | ||
21423 | find twoParam_currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent+(var_root,var_l); | ||
21424 | } | ||
21425 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test filesystem queries contentInNotLive | ||
21426 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive( | ||
21427 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21428 | var_parent, var_child) | ||
21429 | { | ||
21430 | find interpretation(problem,interpretation); | ||
21431 | find mustInstanceOfDir_class(problem,interpretation,var_parent); | ||
21432 | find mustInstanceOfFSObject_class(problem,interpretation,var_child); | ||
21433 | // parent is exported | ||
21434 | // child is exported | ||
21435 | find mustInstanceOfDir_class(problem,interpretation,var_parent); | ||
21436 | find mustInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0); | ||
21437 | find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0); | ||
21438 | var_virtual0 == var_child; | ||
21439 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_parent); | ||
21440 | }or{ | ||
21441 | find interpretation(problem,interpretation); | ||
21442 | find mustInstanceOfDir_class(problem,interpretation,var_parent); | ||
21443 | find mustInstanceOfFSObject_class(problem,interpretation,var_child); | ||
21444 | // parent is exported | ||
21445 | // child is exported | ||
21446 | find mustInstanceOfDir_class(problem,interpretation,var_parent); | ||
21447 | find mustInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0); | ||
21448 | find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0); | ||
21449 | var_virtual0 == var_child; | ||
21450 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_child); | ||
21451 | } | ||
21452 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive( | ||
21453 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21454 | var_parent, var_child) | ||
21455 | { | ||
21456 | find interpretation(problem,interpretation); | ||
21457 | find mayInstanceOfDir_class(problem,interpretation,var_parent); | ||
21458 | find mayInstanceOfFSObject_class(problem,interpretation,var_child); | ||
21459 | // parent is exported | ||
21460 | // child is exported | ||
21461 | find mayInstanceOfDir_class(problem,interpretation,var_parent); | ||
21462 | find mayInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0); | ||
21463 | find mayInstanceOfFSObject_class(problem,interpretation,var_virtual0); | ||
21464 | find mayEquivalent(problem, interpretation, var_virtual0, var_child); | ||
21465 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_parent); | ||
21466 | }or{ | ||
21467 | find interpretation(problem,interpretation); | ||
21468 | find mayInstanceOfDir_class(problem,interpretation,var_parent); | ||
21469 | find mayInstanceOfFSObject_class(problem,interpretation,var_child); | ||
21470 | // parent is exported | ||
21471 | // child is exported | ||
21472 | find mayInstanceOfDir_class(problem,interpretation,var_parent); | ||
21473 | find mayInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0); | ||
21474 | find mayInstanceOfFSObject_class(problem,interpretation,var_virtual0); | ||
21475 | find mayEquivalent(problem, interpretation, var_virtual0, var_child); | ||
21476 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_child); | ||
21477 | } | ||
21478 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive( | ||
21479 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21480 | var_parent, var_child) | ||
21481 | { | ||
21482 | find interpretation(problem,interpretation); | ||
21483 | find mustInstanceOfDir_class(problem,interpretation,var_parent); | ||
21484 | find mustInstanceOfFSObject_class(problem,interpretation,var_child); | ||
21485 | // parent is exported | ||
21486 | // child is exported | ||
21487 | find mustInstanceOfDir_class(problem,interpretation,var_parent); | ||
21488 | find mustInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0); | ||
21489 | find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0); | ||
21490 | var_virtual0 == var_child; | ||
21491 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_parent); | ||
21492 | }or{ | ||
21493 | find interpretation(problem,interpretation); | ||
21494 | find mustInstanceOfDir_class(problem,interpretation,var_parent); | ||
21495 | find mustInstanceOfFSObject_class(problem,interpretation,var_child); | ||
21496 | // parent is exported | ||
21497 | // child is exported | ||
21498 | find mustInstanceOfDir_class(problem,interpretation,var_parent); | ||
21499 | find mustInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0); | ||
21500 | find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0); | ||
21501 | var_virtual0 == var_child; | ||
21502 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_child); | ||
21503 | } | ||
21504 | |||
21505 | ////////// | ||
21506 | // 1.4 Containment Indexer | ||
21507 | ////////// | ||
21508 | private pattern mustContains2(source: DefinedElement, target: DefinedElement) { | ||
21509 | find mustContains4(_,_,source,target); | ||
21510 | } | ||
21511 | |||
21512 | private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, | ||
21513 | source: DefinedElement, target: DefinedElement) | ||
21514 | { find mustInRelationroot_reference_FileSystem(problem,interpretation,source,target); }or | ||
21515 | |||
21516 | { find mustInRelationcontents_reference_Dir(problem,interpretation,source,target); }or | ||
21517 | |||
21518 | { find mustInRelationfilesystems_reference_Model(problem,interpretation,source,target); }or | ||
21519 | |||
21520 | { find mustInRelationotherFSObjects_reference_Model(problem,interpretation,source,target); } | ||
21521 | |||
21522 | private pattern mustTransitiveContains(source,target) { | ||
21523 | find mustContains2+(source,target); | ||
21524 | } | ||
21525 | |||
21526 | ////////// | ||
21527 | // 2. Invalidation Indexers | ||
21528 | ////////// | ||
21529 | // 2.1 Invalidated by WF Queries | ||
21530 | ////////// | ||
21531 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(problem:LogicProblem, interpretation:PartialInterpretation, | ||
21532 | var_parent, var_child) | ||
21533 | { | ||
21534 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(problem,interpretation,var_parent,var_child); | ||
21535 | } | ||
21536 | |||
21537 | ////////// | ||
21538 | // 3. Unfinishedness Indexers | ||
21539 | ////////// | ||
21540 | // 3.1 Unfinishedness Measured by Multiplicity | ||
21541 | ////////// | ||
21542 | pattern unfinishedLowerMultiplicity_root_reference_FileSystem(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
21543 | find interpretation(problem,interpretation); | ||
21544 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
21545 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"root reference FileSystem"); | ||
21546 | find mustInstanceOfFileSystem_class(problem,interpretation,object); | ||
21547 | numberOfExistingReferences == count find mustInRelationroot_reference_FileSystem(problem,interpretation,object,_); | ||
21548 | check(numberOfExistingReferences < 1); | ||
21549 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
21550 | } | ||
21551 | pattern unfinishedLowerMultiplicity_filesystems_reference_Model(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
21552 | find interpretation(problem,interpretation); | ||
21553 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
21554 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"filesystems reference Model"); | ||
21555 | find mustInstanceOfModel_class(problem,interpretation,object); | ||
21556 | numberOfExistingReferences == count find mustInRelationfilesystems_reference_Model(problem,interpretation,object,_); | ||
21557 | check(numberOfExistingReferences < 1); | ||
21558 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
21559 | } | ||
21560 | |||
21561 | ////////// | ||
21562 | // 3.2 Unfinishedness Measured by WF Queries | ||
21563 | ////////// | ||
21564 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(problem:LogicProblem, interpretation:PartialInterpretation, | ||
21565 | var_parent, var_child) | ||
21566 | { | ||
21567 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(problem,interpretation,var_parent,var_child); | ||
21568 | } | ||
21569 | |||
21570 | ////////// | ||
21571 | // 4. Refinement Indexers | ||
21572 | ////////// | ||
21573 | // 4.1 Object constructors | ||
21574 | ////////// | ||
21575 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) | ||
21576 | { | ||
21577 | find interpretation(problem,interpretation); | ||
21578 | find mustInstanceOfModel_class(problem,interpretation,root); | ||
21579 | find mustExist(problem, interpretation, root); | ||
21580 | }or{ | ||
21581 | find interpretation(problem,interpretation); | ||
21582 | find mustInstanceOfFile_class(problem,interpretation,root); | ||
21583 | find mustExist(problem, interpretation, root); | ||
21584 | }or{ | ||
21585 | find interpretation(problem,interpretation); | ||
21586 | find mustInstanceOfFSObject_class(problem,interpretation,root); | ||
21587 | find mustExist(problem, interpretation, root); | ||
21588 | }or{ | ||
21589 | find interpretation(problem,interpretation); | ||
21590 | find mustInstanceOfFileSystem_class(problem,interpretation,root); | ||
21591 | find mustExist(problem, interpretation, root); | ||
21592 | }or{ | ||
21593 | find interpretation(problem,interpretation); | ||
21594 | find mustInstanceOfDir_class(problem,interpretation,root); | ||
21595 | find mustExist(problem, interpretation, root); | ||
21596 | }or{ | ||
21597 | find interpretation(problem,interpretation); | ||
21598 | find mustInstanceOfModel_class_DefinedPart(problem,interpretation,root); | ||
21599 | find mustExist(problem, interpretation, root); | ||
21600 | }or{ | ||
21601 | find interpretation(problem,interpretation); | ||
21602 | find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,root); | ||
21603 | find mustExist(problem, interpretation, root); | ||
21604 | } | ||
21605 | pattern createObject_FileSystem_class_by_filesystems_reference_Model( | ||
21606 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21607 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
21608 | container:DefinedElement) | ||
21609 | { | ||
21610 | find interpretation(problem,interpretation); | ||
21611 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
21612 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FileSystem class"); | ||
21613 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
21614 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"filesystems reference Model"); | ||
21615 | find mustInstanceOfModel_class(problem,interpretation,container); | ||
21616 | find mayInstanceOfFileSystem_class(problem,interpretation,newObject); | ||
21617 | find mayInRelationfilesystems_reference_Model(problem,interpretation,container,newObject); | ||
21618 | find mustExist(problem, interpretation, container); | ||
21619 | neg find mustExist(problem, interpretation, newObject); | ||
21620 | } | ||
21621 | pattern createObject_FileSystem_class( | ||
21622 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21623 | typeInterpretation:PartialComplexTypeInterpretation) | ||
21624 | { | ||
21625 | find interpretation(problem,interpretation); | ||
21626 | neg find hasElementInContainment(problem,interpretation); | ||
21627 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
21628 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FileSystem class"); | ||
21629 | find mayInstanceOfFileSystem_class(problem,interpretation,newObject); | ||
21630 | find mayExist(problem, interpretation, newObject); | ||
21631 | neg find mustExist(problem, interpretation, newObject); | ||
21632 | } | ||
21633 | pattern createObject_File_class_by_contents_reference_Dir_with_parent_reference_FSObject( | ||
21634 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21635 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
21636 | container:DefinedElement) | ||
21637 | { | ||
21638 | find interpretation(problem,interpretation); | ||
21639 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
21640 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"File class"); | ||
21641 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
21642 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"contents reference Dir"); | ||
21643 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
21644 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FSObject"); | ||
21645 | find mustInstanceOfDir_class(problem,interpretation,container); | ||
21646 | find mayInstanceOfFile_class(problem,interpretation,newObject); | ||
21647 | find mayInRelationcontents_reference_Dir(problem,interpretation,container,newObject); | ||
21648 | find mustExist(problem, interpretation, container); | ||
21649 | neg find mustExist(problem, interpretation, newObject); | ||
21650 | } | ||
21651 | pattern createObject_File_class_by_otherFSObjects_reference_Model( | ||
21652 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21653 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
21654 | container:DefinedElement) | ||
21655 | { | ||
21656 | find interpretation(problem,interpretation); | ||
21657 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
21658 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"File class"); | ||
21659 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
21660 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"otherFSObjects reference Model"); | ||
21661 | find mustInstanceOfModel_class(problem,interpretation,container); | ||
21662 | find mayInstanceOfFile_class(problem,interpretation,newObject); | ||
21663 | find mayInRelationotherFSObjects_reference_Model(problem,interpretation,container,newObject); | ||
21664 | find mustExist(problem, interpretation, container); | ||
21665 | neg find mustExist(problem, interpretation, newObject); | ||
21666 | } | ||
21667 | pattern createObject_File_class( | ||
21668 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21669 | typeInterpretation:PartialComplexTypeInterpretation) | ||
21670 | { | ||
21671 | find interpretation(problem,interpretation); | ||
21672 | neg find hasElementInContainment(problem,interpretation); | ||
21673 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
21674 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"File class"); | ||
21675 | find mayInstanceOfFile_class(problem,interpretation,newObject); | ||
21676 | find mayExist(problem, interpretation, newObject); | ||
21677 | neg find mustExist(problem, interpretation, newObject); | ||
21678 | } | ||
21679 | pattern createObject_Model_class_UndefinedPart( | ||
21680 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21681 | typeInterpretation:PartialComplexTypeInterpretation) | ||
21682 | { | ||
21683 | find interpretation(problem,interpretation); | ||
21684 | neg find hasElementInContainment(problem,interpretation); | ||
21685 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
21686 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Model class UndefinedPart"); | ||
21687 | find mayInstanceOfModel_class_UndefinedPart(problem,interpretation,newObject); | ||
21688 | find mayExist(problem, interpretation, newObject); | ||
21689 | neg find mustExist(problem, interpretation, newObject); | ||
21690 | } | ||
21691 | pattern createObject_Dir_class_by_root_reference_FileSystem( | ||
21692 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21693 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
21694 | container:DefinedElement) | ||
21695 | { | ||
21696 | find interpretation(problem,interpretation); | ||
21697 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
21698 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class"); | ||
21699 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
21700 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"root reference FileSystem"); | ||
21701 | find mustInstanceOfFileSystem_class(problem,interpretation,container); | ||
21702 | find mayInstanceOfDir_class(problem,interpretation,newObject); | ||
21703 | find mayInRelationroot_reference_FileSystem(problem,interpretation,container,newObject); | ||
21704 | find mustExist(problem, interpretation, container); | ||
21705 | neg find mustExist(problem, interpretation, newObject); | ||
21706 | } | ||
21707 | pattern createObject_Dir_class_by_contents_reference_Dir_with_parent_reference_FSObject( | ||
21708 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21709 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
21710 | container:DefinedElement) | ||
21711 | { | ||
21712 | find interpretation(problem,interpretation); | ||
21713 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
21714 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class"); | ||
21715 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
21716 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"contents reference Dir"); | ||
21717 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
21718 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FSObject"); | ||
21719 | find mustInstanceOfDir_class(problem,interpretation,container); | ||
21720 | find mayInstanceOfDir_class(problem,interpretation,newObject); | ||
21721 | find mayInRelationcontents_reference_Dir(problem,interpretation,container,newObject); | ||
21722 | find mustExist(problem, interpretation, container); | ||
21723 | neg find mustExist(problem, interpretation, newObject); | ||
21724 | } | ||
21725 | pattern createObject_Dir_class_by_otherFSObjects_reference_Model( | ||
21726 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21727 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
21728 | container:DefinedElement) | ||
21729 | { | ||
21730 | find interpretation(problem,interpretation); | ||
21731 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
21732 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class"); | ||
21733 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
21734 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"otherFSObjects reference Model"); | ||
21735 | find mustInstanceOfModel_class(problem,interpretation,container); | ||
21736 | find mayInstanceOfDir_class(problem,interpretation,newObject); | ||
21737 | find mayInRelationotherFSObjects_reference_Model(problem,interpretation,container,newObject); | ||
21738 | find mustExist(problem, interpretation, container); | ||
21739 | neg find mustExist(problem, interpretation, newObject); | ||
21740 | } | ||
21741 | pattern createObject_Dir_class( | ||
21742 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21743 | typeInterpretation:PartialComplexTypeInterpretation) | ||
21744 | { | ||
21745 | find interpretation(problem,interpretation); | ||
21746 | neg find hasElementInContainment(problem,interpretation); | ||
21747 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
21748 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class"); | ||
21749 | find mayInstanceOfDir_class(problem,interpretation,newObject); | ||
21750 | find mayExist(problem, interpretation, newObject); | ||
21751 | neg find mustExist(problem, interpretation, newObject); | ||
21752 | } | ||
21753 | |||
21754 | ////////// | ||
21755 | // 4.2 Type refinement | ||
21756 | ////////// | ||
21757 | pattern refineTypeTo_FileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
21758 | find interpretation(problem,interpretation); | ||
21759 | PartialInterpretation.newElements(interpretation,element); | ||
21760 | find mayInstanceOfFileSystem_class(problem,interpretation,element); | ||
21761 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
21762 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
21763 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
21764 | } | ||
21765 | pattern refineTypeTo_File_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
21766 | find interpretation(problem,interpretation); | ||
21767 | PartialInterpretation.newElements(interpretation,element); | ||
21768 | find mayInstanceOfFile_class(problem,interpretation,element); | ||
21769 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
21770 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
21771 | neg find mustInstanceOfFile_class(problem,interpretation,element); | ||
21772 | neg find mustInstanceOfDir_class(problem,interpretation,element); | ||
21773 | } | ||
21774 | pattern refineTypeTo_Model_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
21775 | find interpretation(problem,interpretation); | ||
21776 | PartialInterpretation.newElements(interpretation,element); | ||
21777 | find mayInstanceOfModel_class_UndefinedPart(problem,interpretation,element); | ||
21778 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
21779 | neg find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element); | ||
21780 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
21781 | } | ||
21782 | pattern refineTypeTo_Dir_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
21783 | find interpretation(problem,interpretation); | ||
21784 | PartialInterpretation.newElements(interpretation,element); | ||
21785 | find mayInstanceOfDir_class(problem,interpretation,element); | ||
21786 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
21787 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
21788 | neg find mustInstanceOfFile_class(problem,interpretation,element); | ||
21789 | neg find mustInstanceOfDir_class(problem,interpretation,element); | ||
21790 | } | ||
21791 | |||
21792 | ////////// | ||
21793 | // 4.3 Relation refinement | ||
21794 | ////////// | ||
21795 | pattern refineRelation_live_reference_FileSystem( | ||
21796 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21797 | relationIterpretation:PartialRelationInterpretation, | ||
21798 | from: DefinedElement, to: DefinedElement) | ||
21799 | { | ||
21800 | find interpretation(problem,interpretation); | ||
21801 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
21802 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"live reference FileSystem"); | ||
21803 | find mustExist(problem, interpretation, from); | ||
21804 | find mustExist(problem, interpretation, to); | ||
21805 | find mustInstanceOfFileSystem_class(problem,interpretation,from); | ||
21806 | find mustInstanceOfFSObject_class(problem,interpretation,to); | ||
21807 | find mayInRelationlive_reference_FileSystem(problem,interpretation,from,to); | ||
21808 | neg find mustInRelationlive_reference_FileSystem(problem,interpretation,from,to); | ||
21809 | } | ||
21810 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
21811 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" | ||
21812 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
21813 | |||
21814 | ////////// | ||
21815 | // 0. Util | ||
21816 | ////////// | ||
21817 | private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
21818 | PartialInterpretation.problem(interpretation,problem); | ||
21819 | } | ||
21820 | |||
21821 | ///////////////////////// | ||
21822 | // 0.1 Existence | ||
21823 | ///////////////////////// | ||
21824 | private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
21825 | find interpretation(problem,interpretation); | ||
21826 | LogicProblem.elements(problem,element); | ||
21827 | } or { | ||
21828 | find interpretation(problem,interpretation); | ||
21829 | PartialInterpretation.newElements(interpretation,element); | ||
21830 | } | ||
21831 | |||
21832 | private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
21833 | find mustExist(problem,interpretation,element); | ||
21834 | } or { | ||
21835 | find interpretation(problem,interpretation); | ||
21836 | neg find elementCloseWorld(element); | ||
21837 | PartialInterpretation.openWorldElements(interpretation,element); | ||
21838 | } | ||
21839 | |||
21840 | private pattern elementCloseWorld(element:DefinedElement) { | ||
21841 | PartialInterpretation.openWorldElements(i,element); | ||
21842 | PartialInterpretation.maxNewElements(i,0); | ||
21843 | } or { | ||
21844 | Scope.targetTypeInterpretation(scope,interpretation); | ||
21845 | PartialTypeInterpratation.elements(interpretation,element); | ||
21846 | Scope.maxNewElements(scope,0); | ||
21847 | } | ||
21848 | |||
21849 | //////////////////////// | ||
21850 | // 0.2 Equivalence | ||
21851 | //////////////////////// | ||
21852 | pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { | ||
21853 | find mayExist(problem,interpretation,a); | ||
21854 | find mayExist(problem,interpretation,b); | ||
21855 | a == b; | ||
21856 | } | ||
21857 | |||
21858 | //////////////////////// | ||
21859 | // 0.3 Required Patterns by TypeIndexer | ||
21860 | //////////////////////// | ||
21861 | private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { | ||
21862 | find interpretation(problem,interpretation); | ||
21863 | LogicProblem.types(problem,type); | ||
21864 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
21865 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
21866 | } | ||
21867 | |||
21868 | private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
21869 | find interpretation(problem,interpretation); | ||
21870 | LogicProblem.types(problem,type); | ||
21871 | TypeDefinition.elements(type,element); | ||
21872 | } or { | ||
21873 | find interpretation(problem,interpretation); | ||
21874 | find typeInterpretation(problem,interpretation,type,typeInterpretation); | ||
21875 | PartialComplexTypeInterpretation.elements(typeInterpretation,element); | ||
21876 | } | ||
21877 | |||
21878 | private pattern isPrimitive(element: PrimitiveElement) { | ||
21879 | PrimitiveElement(element); | ||
21880 | } | ||
21881 | |||
21882 | ////////// | ||
21883 | // 1. Problem-Specific Base Indexers | ||
21884 | ////////// | ||
21885 | // 1.1 Type Indexers | ||
21886 | ////////// | ||
21887 | // 1.1.1 primitive Type Indexers | ||
21888 | ////////// | ||
21889 | |||
21890 | ////////// | ||
21891 | // 1.1.2 domain-specific Type Indexers | ||
21892 | ////////// | ||
21893 | /** | ||
21894 | * An element must be an instance of type "FileSystem class". | ||
21895 | */ | ||
21896 | private pattern mustInstanceOfFileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
21897 | Type.name(type,"FileSystem class"); | ||
21898 | find directInstanceOf(problem,interpretation,element,type); | ||
21899 | } | ||
21900 | private pattern scopeDisallowsNewFileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
21901 | find interpretation(problem,interpretation); | ||
21902 | PartialInterpretation.scopes(interpretation,scope); | ||
21903 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
21904 | Scope.maxNewElements(scope,0); | ||
21905 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
21906 | Type.name(type,"FileSystem class"); | ||
21907 | } | ||
21908 | |||
21909 | /** | ||
21910 | * An element may be an instance of type "FileSystem class". | ||
21911 | */ | ||
21912 | private pattern mayInstanceOfFileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
21913 | { | ||
21914 | find interpretation(problem,interpretation); | ||
21915 | PartialInterpretation.newElements(interpretation,element); | ||
21916 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
21917 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
21918 | neg find scopeDisallowsNewFileSystem_class(problem, interpretation); | ||
21919 | neg find isPrimitive(element); | ||
21920 | } or { | ||
21921 | find interpretation(problem,interpretation); | ||
21922 | PartialInterpretation.openWorldElements(interpretation,element); | ||
21923 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
21924 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
21925 | neg find scopeDisallowsNewFileSystem_class(problem, interpretation); | ||
21926 | neg find isPrimitive(element); | ||
21927 | } or | ||
21928 | { find mustInstanceOfFileSystem_class(problem,interpretation,element); } | ||
21929 | /** | ||
21930 | * An element must be an instance of type "FSObject class". | ||
21931 | */ | ||
21932 | private pattern mustInstanceOfFSObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
21933 | Type.name(type,"FSObject class"); | ||
21934 | find directInstanceOf(problem,interpretation,element,type); | ||
21935 | } | ||
21936 | private pattern scopeDisallowsNewFSObject_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
21937 | find interpretation(problem,interpretation); | ||
21938 | PartialInterpretation.scopes(interpretation,scope); | ||
21939 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
21940 | Scope.maxNewElements(scope,0); | ||
21941 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
21942 | Type.name(type,"FSObject class"); | ||
21943 | } | ||
21944 | |||
21945 | /** | ||
21946 | * An element may be an instance of type "FSObject class". | ||
21947 | */ | ||
21948 | private pattern mayInstanceOfFSObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
21949 | { | ||
21950 | find interpretation(problem,interpretation); | ||
21951 | PartialInterpretation.newElements(interpretation,element); | ||
21952 | neg find mustInstanceOfFile_class(problem,interpretation,element); | ||
21953 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
21954 | neg find mustInstanceOfDir_class(problem,interpretation,element); | ||
21955 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
21956 | neg find scopeDisallowsNewFSObject_class(problem, interpretation); | ||
21957 | neg find isPrimitive(element); | ||
21958 | } or { | ||
21959 | find interpretation(problem,interpretation); | ||
21960 | PartialInterpretation.openWorldElements(interpretation,element); | ||
21961 | neg find mustInstanceOfFile_class(problem,interpretation,element); | ||
21962 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
21963 | neg find mustInstanceOfDir_class(problem,interpretation,element); | ||
21964 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
21965 | neg find scopeDisallowsNewFSObject_class(problem, interpretation); | ||
21966 | neg find isPrimitive(element); | ||
21967 | } or | ||
21968 | { find mustInstanceOfFSObject_class(problem,interpretation,element); } | ||
21969 | /** | ||
21970 | * An element must be an instance of type "Dir class". | ||
21971 | */ | ||
21972 | private pattern mustInstanceOfDir_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
21973 | Type.name(type,"Dir class"); | ||
21974 | find directInstanceOf(problem,interpretation,element,type); | ||
21975 | } | ||
21976 | private pattern scopeDisallowsNewDir_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
21977 | find interpretation(problem,interpretation); | ||
21978 | PartialInterpretation.scopes(interpretation,scope); | ||
21979 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
21980 | Scope.maxNewElements(scope,0); | ||
21981 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
21982 | Type.name(type,"Dir class"); | ||
21983 | } | ||
21984 | |||
21985 | /** | ||
21986 | * An element may be an instance of type "Dir class". | ||
21987 | */ | ||
21988 | private pattern mayInstanceOfDir_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
21989 | { | ||
21990 | find interpretation(problem,interpretation); | ||
21991 | PartialInterpretation.newElements(interpretation,element); | ||
21992 | neg find mustInstanceOfFile_class(problem,interpretation,element); | ||
21993 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
21994 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
21995 | neg find scopeDisallowsNewDir_class(problem, interpretation); | ||
21996 | neg find isPrimitive(element); | ||
21997 | } or { | ||
21998 | find interpretation(problem,interpretation); | ||
21999 | PartialInterpretation.openWorldElements(interpretation,element); | ||
22000 | neg find mustInstanceOfFile_class(problem,interpretation,element); | ||
22001 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
22002 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
22003 | neg find scopeDisallowsNewDir_class(problem, interpretation); | ||
22004 | neg find isPrimitive(element); | ||
22005 | } or | ||
22006 | { find mustInstanceOfDir_class(problem,interpretation,element); } | ||
22007 | /** | ||
22008 | * An element must be an instance of type "File class". | ||
22009 | */ | ||
22010 | private pattern mustInstanceOfFile_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
22011 | Type.name(type,"File class"); | ||
22012 | find directInstanceOf(problem,interpretation,element,type); | ||
22013 | } | ||
22014 | private pattern scopeDisallowsNewFile_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
22015 | find interpretation(problem,interpretation); | ||
22016 | PartialInterpretation.scopes(interpretation,scope); | ||
22017 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
22018 | Scope.maxNewElements(scope,0); | ||
22019 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
22020 | Type.name(type,"File class"); | ||
22021 | } | ||
22022 | |||
22023 | /** | ||
22024 | * An element may be an instance of type "File class". | ||
22025 | */ | ||
22026 | private pattern mayInstanceOfFile_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
22027 | { | ||
22028 | find interpretation(problem,interpretation); | ||
22029 | PartialInterpretation.newElements(interpretation,element); | ||
22030 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
22031 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
22032 | neg find mustInstanceOfDir_class(problem,interpretation,element); | ||
22033 | neg find scopeDisallowsNewFile_class(problem, interpretation); | ||
22034 | neg find isPrimitive(element); | ||
22035 | } or { | ||
22036 | find interpretation(problem,interpretation); | ||
22037 | PartialInterpretation.openWorldElements(interpretation,element); | ||
22038 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
22039 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
22040 | neg find mustInstanceOfDir_class(problem,interpretation,element); | ||
22041 | neg find scopeDisallowsNewFile_class(problem, interpretation); | ||
22042 | neg find isPrimitive(element); | ||
22043 | } or | ||
22044 | { find mustInstanceOfFile_class(problem,interpretation,element); } | ||
22045 | /** | ||
22046 | * An element must be an instance of type "Model class". | ||
22047 | */ | ||
22048 | private pattern mustInstanceOfModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
22049 | Type.name(type,"Model class"); | ||
22050 | find directInstanceOf(problem,interpretation,element,type); | ||
22051 | } | ||
22052 | private pattern scopeDisallowsNewModel_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
22053 | find interpretation(problem,interpretation); | ||
22054 | PartialInterpretation.scopes(interpretation,scope); | ||
22055 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
22056 | Scope.maxNewElements(scope,0); | ||
22057 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
22058 | Type.name(type,"Model class"); | ||
22059 | } | ||
22060 | |||
22061 | /** | ||
22062 | * An element may be an instance of type "Model class". | ||
22063 | */ | ||
22064 | private pattern mayInstanceOfModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
22065 | { | ||
22066 | find interpretation(problem,interpretation); | ||
22067 | PartialInterpretation.newElements(interpretation,element); | ||
22068 | neg find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element); | ||
22069 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
22070 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
22071 | neg find scopeDisallowsNewModel_class(problem, interpretation); | ||
22072 | neg find isPrimitive(element); | ||
22073 | } or { | ||
22074 | find interpretation(problem,interpretation); | ||
22075 | PartialInterpretation.openWorldElements(interpretation,element); | ||
22076 | neg find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element); | ||
22077 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
22078 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
22079 | neg find scopeDisallowsNewModel_class(problem, interpretation); | ||
22080 | neg find isPrimitive(element); | ||
22081 | } or | ||
22082 | { find mustInstanceOfModel_class(problem,interpretation,element); } | ||
22083 | /** | ||
22084 | * An element must be an instance of type "Model class DefinedPart". | ||
22085 | */ | ||
22086 | private pattern mustInstanceOfModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
22087 | Type.name(type,"Model class DefinedPart"); | ||
22088 | find directInstanceOf(problem,interpretation,element,type); | ||
22089 | } | ||
22090 | private pattern scopeDisallowsNewModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
22091 | find interpretation(problem,interpretation); | ||
22092 | PartialInterpretation.scopes(interpretation,scope); | ||
22093 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
22094 | Scope.maxNewElements(scope,0); | ||
22095 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
22096 | Type.name(type,"Model class DefinedPart"); | ||
22097 | } | ||
22098 | |||
22099 | /** | ||
22100 | * An element may be an instance of type "Model class DefinedPart". | ||
22101 | */ | ||
22102 | private pattern mayInstanceOfModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
22103 | { find mustInstanceOfModel_class_DefinedPart(problem,interpretation,element); } | ||
22104 | /** | ||
22105 | * An element must be an instance of type "Model class UndefinedPart". | ||
22106 | */ | ||
22107 | private pattern mustInstanceOfModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
22108 | Type.name(type,"Model class UndefinedPart"); | ||
22109 | find directInstanceOf(problem,interpretation,element,type); | ||
22110 | } | ||
22111 | private pattern scopeDisallowsNewModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
22112 | find interpretation(problem,interpretation); | ||
22113 | PartialInterpretation.scopes(interpretation,scope); | ||
22114 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
22115 | Scope.maxNewElements(scope,0); | ||
22116 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
22117 | Type.name(type,"Model class UndefinedPart"); | ||
22118 | } | ||
22119 | |||
22120 | /** | ||
22121 | * An element may be an instance of type "Model class UndefinedPart". | ||
22122 | */ | ||
22123 | private pattern mayInstanceOfModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
22124 | { | ||
22125 | find interpretation(problem,interpretation); | ||
22126 | PartialInterpretation.newElements(interpretation,element); | ||
22127 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
22128 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
22129 | neg find scopeDisallowsNewModel_class_UndefinedPart(problem, interpretation); | ||
22130 | neg find isPrimitive(element); | ||
22131 | } or { | ||
22132 | find interpretation(problem,interpretation); | ||
22133 | PartialInterpretation.openWorldElements(interpretation,element); | ||
22134 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
22135 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
22136 | neg find scopeDisallowsNewModel_class_UndefinedPart(problem, interpretation); | ||
22137 | neg find isPrimitive(element); | ||
22138 | } or | ||
22139 | { find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element); } | ||
22140 | |||
22141 | ////////// | ||
22142 | // 1.2 Relation Declaration Indexers | ||
22143 | ////////// | ||
22144 | /** | ||
22145 | * Matcher for detecting tuples t where []root reference FileSystem(source,target) | ||
22146 | */ | ||
22147 | private pattern mustInRelationroot_reference_FileSystem( | ||
22148 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22149 | source: DefinedElement, target:DefinedElement) | ||
22150 | { | ||
22151 | find interpretation(problem,interpretation); | ||
22152 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
22153 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"root reference FileSystem"); | ||
22154 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
22155 | BinaryElementRelationLink.param1(link,source); | ||
22156 | BinaryElementRelationLink.param2(link,target); | ||
22157 | } | ||
22158 | /** | ||
22159 | * Matcher for detecting tuples t where <>root reference FileSystem(source,target) | ||
22160 | */ | ||
22161 | private pattern mayInRelationroot_reference_FileSystem( | ||
22162 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22163 | source: DefinedElement, target:DefinedElement) | ||
22164 | { | ||
22165 | find interpretation(problem,interpretation); | ||
22166 | // The two endpoint of the link have to exist | ||
22167 | find mayExist(problem, interpretation, source); | ||
22168 | find mayExist(problem, interpretation, target); | ||
22169 | // Type consistency | ||
22170 | find mayInstanceOfFileSystem_class(problem,interpretation,source); | ||
22171 | find mayInstanceOfDir_class(problem,interpretation,target); | ||
22172 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
22173 | // the upper bound of the multiplicity should be considered. | ||
22174 | numberOfExistingReferences == count find mustInRelationroot_reference_FileSystem(problem,interpretation,source,_); | ||
22175 | check(numberOfExistingReferences < 1); | ||
22176 | // The reference is containment, then a new reference cannot be create if: | ||
22177 | // 1. Multiple parents | ||
22178 | neg find mustContains4(problem,interpretation,_,target); | ||
22179 | // 2. Circle in the containment hierarchy | ||
22180 | neg find mustTransitiveContains(source,target); | ||
22181 | } or { | ||
22182 | find mustInRelationroot_reference_FileSystem(problem,interpretation,source,target); | ||
22183 | } | ||
22184 | /** | ||
22185 | * Matcher for detecting tuples t where []live reference FileSystem(source,target) | ||
22186 | */ | ||
22187 | private pattern mustInRelationlive_reference_FileSystem( | ||
22188 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22189 | source: DefinedElement, target:DefinedElement) | ||
22190 | { | ||
22191 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,source,target); | ||
22192 | } | ||
22193 | /** | ||
22194 | * Matcher for detecting tuples t where []live reference FileSystem(source,target) | ||
22195 | */ | ||
22196 | private pattern mayInRelationlive_reference_FileSystem( | ||
22197 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22198 | source: DefinedElement, target:DefinedElement) | ||
22199 | { | ||
22200 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,source,target); | ||
22201 | } | ||
22202 | /** | ||
22203 | * Matcher for detecting tuples t where []parent reference FSObject(source,target) | ||
22204 | */ | ||
22205 | private pattern mustInRelationparent_reference_FSObject( | ||
22206 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22207 | source: DefinedElement, target:DefinedElement) | ||
22208 | { | ||
22209 | find interpretation(problem,interpretation); | ||
22210 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
22211 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FSObject"); | ||
22212 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
22213 | BinaryElementRelationLink.param1(link,source); | ||
22214 | BinaryElementRelationLink.param2(link,target); | ||
22215 | } | ||
22216 | /** | ||
22217 | * Matcher for detecting tuples t where <>parent reference FSObject(source,target) | ||
22218 | */ | ||
22219 | private pattern mayInRelationparent_reference_FSObject( | ||
22220 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22221 | source: DefinedElement, target:DefinedElement) | ||
22222 | { | ||
22223 | find interpretation(problem,interpretation); | ||
22224 | // The two endpoint of the link have to exist | ||
22225 | find mayExist(problem, interpretation, source); | ||
22226 | find mayExist(problem, interpretation, target); | ||
22227 | // Type consistency | ||
22228 | find mayInstanceOfFSObject_class(problem,interpretation,source); | ||
22229 | find mayInstanceOfDir_class(problem,interpretation,target); | ||
22230 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
22231 | // the upper bound of the multiplicity should be considered. | ||
22232 | numberOfExistingReferences == count find mustInRelationparent_reference_FSObject(problem,interpretation,source,_); | ||
22233 | check(numberOfExistingReferences < 1); | ||
22234 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
22235 | // 1. Multiple parents | ||
22236 | neg find mustContains4(problem,interpretation,source,_); | ||
22237 | // 2. Circle in the containment hierarchy | ||
22238 | neg find mustTransitiveContains(source,target); | ||
22239 | } or { | ||
22240 | find mustInRelationparent_reference_FSObject(problem,interpretation,source,target); | ||
22241 | } | ||
22242 | /** | ||
22243 | * Matcher for detecting tuples t where []contents reference Dir(source,target) | ||
22244 | */ | ||
22245 | private pattern mustInRelationcontents_reference_Dir( | ||
22246 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22247 | source: DefinedElement, target:DefinedElement) | ||
22248 | { | ||
22249 | find interpretation(problem,interpretation); | ||
22250 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
22251 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"contents reference Dir"); | ||
22252 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
22253 | BinaryElementRelationLink.param1(link,source); | ||
22254 | BinaryElementRelationLink.param2(link,target); | ||
22255 | } | ||
22256 | /** | ||
22257 | * Matcher for detecting tuples t where <>contents reference Dir(source,target) | ||
22258 | */ | ||
22259 | private pattern mayInRelationcontents_reference_Dir( | ||
22260 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22261 | source: DefinedElement, target:DefinedElement) | ||
22262 | { | ||
22263 | find interpretation(problem,interpretation); | ||
22264 | // The two endpoint of the link have to exist | ||
22265 | find mayExist(problem, interpretation, source); | ||
22266 | find mayExist(problem, interpretation, target); | ||
22267 | // Type consistency | ||
22268 | find mayInstanceOfDir_class(problem,interpretation,source); | ||
22269 | find mayInstanceOfFSObject_class(problem,interpretation,target); | ||
22270 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
22271 | // the upper bound of the opposite reference multiplicity should be considered. | ||
22272 | numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FSObject(problem,interpretation,target,_); | ||
22273 | check(numberOfExistingOppositeReferences < 1); | ||
22274 | // The reference is containment, then a new reference cannot be create if: | ||
22275 | // 1. Multiple parents | ||
22276 | neg find mustContains4(problem,interpretation,_,target); | ||
22277 | // 2. Circle in the containment hierarchy | ||
22278 | neg find mustTransitiveContains(source,target); | ||
22279 | } or { | ||
22280 | find mustInRelationcontents_reference_Dir(problem,interpretation,source,target); | ||
22281 | } | ||
22282 | /** | ||
22283 | * Matcher for detecting tuples t where []filesystems reference Model(source,target) | ||
22284 | */ | ||
22285 | private pattern mustInRelationfilesystems_reference_Model( | ||
22286 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22287 | source: DefinedElement, target:DefinedElement) | ||
22288 | { | ||
22289 | find interpretation(problem,interpretation); | ||
22290 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
22291 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"filesystems reference Model"); | ||
22292 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
22293 | BinaryElementRelationLink.param1(link,source); | ||
22294 | BinaryElementRelationLink.param2(link,target); | ||
22295 | } | ||
22296 | /** | ||
22297 | * Matcher for detecting tuples t where <>filesystems reference Model(source,target) | ||
22298 | */ | ||
22299 | private pattern mayInRelationfilesystems_reference_Model( | ||
22300 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22301 | source: DefinedElement, target:DefinedElement) | ||
22302 | { | ||
22303 | find interpretation(problem,interpretation); | ||
22304 | // The two endpoint of the link have to exist | ||
22305 | find mayExist(problem, interpretation, source); | ||
22306 | find mayExist(problem, interpretation, target); | ||
22307 | // Type consistency | ||
22308 | find mayInstanceOfModel_class(problem,interpretation,source); | ||
22309 | find mayInstanceOfFileSystem_class(problem,interpretation,target); | ||
22310 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
22311 | // the upper bound of the multiplicity should be considered. | ||
22312 | numberOfExistingReferences == count find mustInRelationfilesystems_reference_Model(problem,interpretation,source,_); | ||
22313 | check(numberOfExistingReferences < 1); | ||
22314 | // The reference is containment, then a new reference cannot be create if: | ||
22315 | // 1. Multiple parents | ||
22316 | neg find mustContains4(problem,interpretation,_,target); | ||
22317 | // 2. Circle in the containment hierarchy | ||
22318 | neg find mustTransitiveContains(source,target); | ||
22319 | } or { | ||
22320 | find mustInRelationfilesystems_reference_Model(problem,interpretation,source,target); | ||
22321 | } | ||
22322 | /** | ||
22323 | * Matcher for detecting tuples t where []otherFSObjects reference Model(source,target) | ||
22324 | */ | ||
22325 | private pattern mustInRelationotherFSObjects_reference_Model( | ||
22326 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22327 | source: DefinedElement, target:DefinedElement) | ||
22328 | { | ||
22329 | find interpretation(problem,interpretation); | ||
22330 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
22331 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"otherFSObjects reference Model"); | ||
22332 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
22333 | BinaryElementRelationLink.param1(link,source); | ||
22334 | BinaryElementRelationLink.param2(link,target); | ||
22335 | } | ||
22336 | /** | ||
22337 | * Matcher for detecting tuples t where <>otherFSObjects reference Model(source,target) | ||
22338 | */ | ||
22339 | private pattern mayInRelationotherFSObjects_reference_Model( | ||
22340 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22341 | source: DefinedElement, target:DefinedElement) | ||
22342 | { | ||
22343 | find interpretation(problem,interpretation); | ||
22344 | // The two endpoint of the link have to exist | ||
22345 | find mayExist(problem, interpretation, source); | ||
22346 | find mayExist(problem, interpretation, target); | ||
22347 | // Type consistency | ||
22348 | find mayInstanceOfModel_class(problem,interpretation,source); | ||
22349 | find mayInstanceOfFSObject_class(problem,interpretation,target); | ||
22350 | // The reference is containment, then a new reference cannot be create if: | ||
22351 | // 1. Multiple parents | ||
22352 | neg find mustContains4(problem,interpretation,_,target); | ||
22353 | // 2. Circle in the containment hierarchy | ||
22354 | neg find mustTransitiveContains(source,target); | ||
22355 | } or { | ||
22356 | find mustInRelationotherFSObjects_reference_Model(problem,interpretation,source,target); | ||
22357 | } | ||
22358 | |||
22359 | ////////// | ||
22360 | // 1.3 Relation Definition Indexers | ||
22361 | ////////// | ||
22362 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test filesystem queries patternContent | ||
22363 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent( | ||
22364 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22365 | var_o1, var_o2) | ||
22366 | { | ||
22367 | find interpretation(problem,interpretation); | ||
22368 | find mustInstanceOfFSObject_class(problem,interpretation,var_o1); | ||
22369 | find mustInstanceOfFSObject_class(problem,interpretation,var_o2); | ||
22370 | // o1 is exported | ||
22371 | // o2 is exported | ||
22372 | find mustInstanceOfDir_class(problem,interpretation,var_o1); | ||
22373 | find mustInRelationcontents_reference_Dir(problem,interpretation,var_o1,var_virtual0); | ||
22374 | find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0); | ||
22375 | var_virtual0 == var_o2; | ||
22376 | } | ||
22377 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent( | ||
22378 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22379 | var_o1, var_o2) | ||
22380 | { | ||
22381 | find interpretation(problem,interpretation); | ||
22382 | find mayInstanceOfFSObject_class(problem,interpretation,var_o1); | ||
22383 | find mayInstanceOfFSObject_class(problem,interpretation,var_o2); | ||
22384 | // o1 is exported | ||
22385 | // o2 is exported | ||
22386 | find mayInstanceOfDir_class(problem,interpretation,var_o1); | ||
22387 | find mayInRelationcontents_reference_Dir(problem,interpretation,var_o1,var_virtual0); | ||
22388 | find mayInstanceOfFSObject_class(problem,interpretation,var_virtual0); | ||
22389 | find mayEquivalent(problem, interpretation, var_virtual0, var_o2); | ||
22390 | } | ||
22391 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent( | ||
22392 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22393 | var_o1, var_o2) | ||
22394 | { | ||
22395 | find interpretation(problem,interpretation); | ||
22396 | find mustInstanceOfFSObject_class(problem,interpretation,var_o1); | ||
22397 | find mustInstanceOfFSObject_class(problem,interpretation,var_o2); | ||
22398 | // o1 is exported | ||
22399 | // o2 is exported | ||
22400 | find mustInstanceOfDir_class(problem,interpretation,var_o1); | ||
22401 | find mustInRelationcontents_reference_Dir(problem,interpretation,var_o1,var_virtual0); | ||
22402 | find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0); | ||
22403 | var_virtual0 == var_o2; | ||
22404 | } | ||
22405 | private pattern twoParam_mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(var_o1, var_o2) { | ||
22406 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(_,_,var_o1, var_o2); | ||
22407 | } | ||
22408 | private pattern twoParam_mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(var_o1, var_o2) { | ||
22409 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(_,_,var_o1, var_o2); | ||
22410 | } | ||
22411 | private pattern twoParam_currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(var_o1, var_o2) { | ||
22412 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(_,_,var_o1, var_o2); | ||
22413 | } | ||
22414 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test filesystem queries live | ||
22415 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live( | ||
22416 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22417 | var_this, var_l) | ||
22418 | { | ||
22419 | find interpretation(problem,interpretation); | ||
22420 | find mustInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
22421 | find mustInstanceOfFSObject_class(problem,interpretation,var_l); | ||
22422 | // this is exported | ||
22423 | // l is exported | ||
22424 | find mustInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
22425 | find mustInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0); | ||
22426 | find mustInstanceOfDir_class(problem,interpretation,var_virtual0); | ||
22427 | var_virtual0 == var_l; | ||
22428 | }or{ | ||
22429 | find interpretation(problem,interpretation); | ||
22430 | find mustInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
22431 | find mustInstanceOfFSObject_class(problem,interpretation,var_l); | ||
22432 | // this is exported | ||
22433 | // l is exported | ||
22434 | find mustInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
22435 | find mustInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0); | ||
22436 | find mustInstanceOfDir_class(problem,interpretation,var_virtual0); | ||
22437 | var_virtual0 == var_root; | ||
22438 | find twoParam_mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent+(var_root,var_l); | ||
22439 | } | ||
22440 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live( | ||
22441 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22442 | var_this, var_l) | ||
22443 | { | ||
22444 | find interpretation(problem,interpretation); | ||
22445 | find mayInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
22446 | find mayInstanceOfFSObject_class(problem,interpretation,var_l); | ||
22447 | // this is exported | ||
22448 | // l is exported | ||
22449 | find mayInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
22450 | find mayInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0); | ||
22451 | find mayInstanceOfDir_class(problem,interpretation,var_virtual0); | ||
22452 | find mayEquivalent(problem, interpretation, var_virtual0, var_l); | ||
22453 | }or{ | ||
22454 | find interpretation(problem,interpretation); | ||
22455 | find mayInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
22456 | find mayInstanceOfFSObject_class(problem,interpretation,var_l); | ||
22457 | // this is exported | ||
22458 | // l is exported | ||
22459 | find mayInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
22460 | find mayInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0); | ||
22461 | find mayInstanceOfDir_class(problem,interpretation,var_virtual0); | ||
22462 | find mayEquivalent(problem, interpretation, var_virtual0, var_root); | ||
22463 | find twoParam_mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent+(var_root,var_l); | ||
22464 | } | ||
22465 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live( | ||
22466 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22467 | var_this, var_l) | ||
22468 | { | ||
22469 | find interpretation(problem,interpretation); | ||
22470 | find mustInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
22471 | find mustInstanceOfFSObject_class(problem,interpretation,var_l); | ||
22472 | // this is exported | ||
22473 | // l is exported | ||
22474 | find mustInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
22475 | find mustInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0); | ||
22476 | find mustInstanceOfDir_class(problem,interpretation,var_virtual0); | ||
22477 | var_virtual0 == var_l; | ||
22478 | }or{ | ||
22479 | find interpretation(problem,interpretation); | ||
22480 | find mustInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
22481 | find mustInstanceOfFSObject_class(problem,interpretation,var_l); | ||
22482 | // this is exported | ||
22483 | // l is exported | ||
22484 | find mustInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
22485 | find mustInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0); | ||
22486 | find mustInstanceOfDir_class(problem,interpretation,var_virtual0); | ||
22487 | var_virtual0 == var_root; | ||
22488 | find twoParam_currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent+(var_root,var_l); | ||
22489 | } | ||
22490 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test filesystem queries contentInNotLive | ||
22491 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive( | ||
22492 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22493 | var_parent, var_child) | ||
22494 | { | ||
22495 | find interpretation(problem,interpretation); | ||
22496 | find mustInstanceOfDir_class(problem,interpretation,var_parent); | ||
22497 | find mustInstanceOfFSObject_class(problem,interpretation,var_child); | ||
22498 | // parent is exported | ||
22499 | // child is exported | ||
22500 | find mustInstanceOfDir_class(problem,interpretation,var_parent); | ||
22501 | find mustInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0); | ||
22502 | find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0); | ||
22503 | var_virtual0 == var_child; | ||
22504 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_parent); | ||
22505 | }or{ | ||
22506 | find interpretation(problem,interpretation); | ||
22507 | find mustInstanceOfDir_class(problem,interpretation,var_parent); | ||
22508 | find mustInstanceOfFSObject_class(problem,interpretation,var_child); | ||
22509 | // parent is exported | ||
22510 | // child is exported | ||
22511 | find mustInstanceOfDir_class(problem,interpretation,var_parent); | ||
22512 | find mustInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0); | ||
22513 | find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0); | ||
22514 | var_virtual0 == var_child; | ||
22515 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_child); | ||
22516 | } | ||
22517 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive( | ||
22518 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22519 | var_parent, var_child) | ||
22520 | { | ||
22521 | find interpretation(problem,interpretation); | ||
22522 | find mayInstanceOfDir_class(problem,interpretation,var_parent); | ||
22523 | find mayInstanceOfFSObject_class(problem,interpretation,var_child); | ||
22524 | // parent is exported | ||
22525 | // child is exported | ||
22526 | find mayInstanceOfDir_class(problem,interpretation,var_parent); | ||
22527 | find mayInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0); | ||
22528 | find mayInstanceOfFSObject_class(problem,interpretation,var_virtual0); | ||
22529 | find mayEquivalent(problem, interpretation, var_virtual0, var_child); | ||
22530 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_parent); | ||
22531 | }or{ | ||
22532 | find interpretation(problem,interpretation); | ||
22533 | find mayInstanceOfDir_class(problem,interpretation,var_parent); | ||
22534 | find mayInstanceOfFSObject_class(problem,interpretation,var_child); | ||
22535 | // parent is exported | ||
22536 | // child is exported | ||
22537 | find mayInstanceOfDir_class(problem,interpretation,var_parent); | ||
22538 | find mayInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0); | ||
22539 | find mayInstanceOfFSObject_class(problem,interpretation,var_virtual0); | ||
22540 | find mayEquivalent(problem, interpretation, var_virtual0, var_child); | ||
22541 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_child); | ||
22542 | } | ||
22543 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive( | ||
22544 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22545 | var_parent, var_child) | ||
22546 | { | ||
22547 | find interpretation(problem,interpretation); | ||
22548 | find mustInstanceOfDir_class(problem,interpretation,var_parent); | ||
22549 | find mustInstanceOfFSObject_class(problem,interpretation,var_child); | ||
22550 | // parent is exported | ||
22551 | // child is exported | ||
22552 | find mustInstanceOfDir_class(problem,interpretation,var_parent); | ||
22553 | find mustInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0); | ||
22554 | find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0); | ||
22555 | var_virtual0 == var_child; | ||
22556 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_parent); | ||
22557 | }or{ | ||
22558 | find interpretation(problem,interpretation); | ||
22559 | find mustInstanceOfDir_class(problem,interpretation,var_parent); | ||
22560 | find mustInstanceOfFSObject_class(problem,interpretation,var_child); | ||
22561 | // parent is exported | ||
22562 | // child is exported | ||
22563 | find mustInstanceOfDir_class(problem,interpretation,var_parent); | ||
22564 | find mustInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0); | ||
22565 | find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0); | ||
22566 | var_virtual0 == var_child; | ||
22567 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_child); | ||
22568 | } | ||
22569 | |||
22570 | ////////// | ||
22571 | // 1.4 Containment Indexer | ||
22572 | ////////// | ||
22573 | private pattern mustContains2(source: DefinedElement, target: DefinedElement) { | ||
22574 | find mustContains4(_,_,source,target); | ||
22575 | } | ||
22576 | |||
22577 | private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22578 | source: DefinedElement, target: DefinedElement) | ||
22579 | { find mustInRelationroot_reference_FileSystem(problem,interpretation,source,target); }or | ||
22580 | |||
22581 | { find mustInRelationcontents_reference_Dir(problem,interpretation,source,target); }or | ||
22582 | |||
22583 | { find mustInRelationfilesystems_reference_Model(problem,interpretation,source,target); }or | ||
22584 | |||
22585 | { find mustInRelationotherFSObjects_reference_Model(problem,interpretation,source,target); } | ||
22586 | |||
22587 | private pattern mustTransitiveContains(source,target) { | ||
22588 | find mustContains2+(source,target); | ||
22589 | } | ||
22590 | |||
22591 | ////////// | ||
22592 | // 2. Invalidation Indexers | ||
22593 | ////////// | ||
22594 | // 2.1 Invalidated by WF Queries | ||
22595 | ////////// | ||
22596 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22597 | var_parent, var_child) | ||
22598 | { | ||
22599 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(problem,interpretation,var_parent,var_child); | ||
22600 | } | ||
22601 | |||
22602 | ////////// | ||
22603 | // 3. Unfinishedness Indexers | ||
22604 | ////////// | ||
22605 | // 3.1 Unfinishedness Measured by Multiplicity | ||
22606 | ////////// | ||
22607 | pattern unfinishedLowerMultiplicity_root_reference_FileSystem(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
22608 | find interpretation(problem,interpretation); | ||
22609 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
22610 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"root reference FileSystem"); | ||
22611 | find mustInstanceOfFileSystem_class(problem,interpretation,object); | ||
22612 | numberOfExistingReferences == count find mustInRelationroot_reference_FileSystem(problem,interpretation,object,_); | ||
22613 | check(numberOfExistingReferences < 1); | ||
22614 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
22615 | } | ||
22616 | pattern unfinishedLowerMultiplicity_filesystems_reference_Model(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
22617 | find interpretation(problem,interpretation); | ||
22618 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
22619 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"filesystems reference Model"); | ||
22620 | find mustInstanceOfModel_class(problem,interpretation,object); | ||
22621 | numberOfExistingReferences == count find mustInRelationfilesystems_reference_Model(problem,interpretation,object,_); | ||
22622 | check(numberOfExistingReferences < 1); | ||
22623 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
22624 | } | ||
22625 | |||
22626 | ////////// | ||
22627 | // 3.2 Unfinishedness Measured by WF Queries | ||
22628 | ////////// | ||
22629 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(problem:LogicProblem, interpretation:PartialInterpretation, | ||
22630 | var_parent, var_child) | ||
22631 | { | ||
22632 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(problem,interpretation,var_parent,var_child); | ||
22633 | } | ||
22634 | |||
22635 | ////////// | ||
22636 | // 4. Refinement Indexers | ||
22637 | ////////// | ||
22638 | // 4.1 Object constructors | ||
22639 | ////////// | ||
22640 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) | ||
22641 | { | ||
22642 | find interpretation(problem,interpretation); | ||
22643 | find mustInstanceOfModel_class(problem,interpretation,root); | ||
22644 | find mustExist(problem, interpretation, root); | ||
22645 | }or{ | ||
22646 | find interpretation(problem,interpretation); | ||
22647 | find mustInstanceOfFile_class(problem,interpretation,root); | ||
22648 | find mustExist(problem, interpretation, root); | ||
22649 | }or{ | ||
22650 | find interpretation(problem,interpretation); | ||
22651 | find mustInstanceOfFSObject_class(problem,interpretation,root); | ||
22652 | find mustExist(problem, interpretation, root); | ||
22653 | }or{ | ||
22654 | find interpretation(problem,interpretation); | ||
22655 | find mustInstanceOfFileSystem_class(problem,interpretation,root); | ||
22656 | find mustExist(problem, interpretation, root); | ||
22657 | }or{ | ||
22658 | find interpretation(problem,interpretation); | ||
22659 | find mustInstanceOfDir_class(problem,interpretation,root); | ||
22660 | find mustExist(problem, interpretation, root); | ||
22661 | }or{ | ||
22662 | find interpretation(problem,interpretation); | ||
22663 | find mustInstanceOfModel_class_DefinedPart(problem,interpretation,root); | ||
22664 | find mustExist(problem, interpretation, root); | ||
22665 | }or{ | ||
22666 | find interpretation(problem,interpretation); | ||
22667 | find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,root); | ||
22668 | find mustExist(problem, interpretation, root); | ||
22669 | } | ||
22670 | pattern createObject_Model_class_UndefinedPart( | ||
22671 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22672 | typeInterpretation:PartialComplexTypeInterpretation) | ||
22673 | { | ||
22674 | find interpretation(problem,interpretation); | ||
22675 | neg find hasElementInContainment(problem,interpretation); | ||
22676 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
22677 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Model class UndefinedPart"); | ||
22678 | find mayInstanceOfModel_class_UndefinedPart(problem,interpretation,newObject); | ||
22679 | find mayExist(problem, interpretation, newObject); | ||
22680 | neg find mustExist(problem, interpretation, newObject); | ||
22681 | } | ||
22682 | pattern createObject_File_class_by_contents_reference_Dir_with_parent_reference_FSObject( | ||
22683 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22684 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
22685 | container:DefinedElement) | ||
22686 | { | ||
22687 | find interpretation(problem,interpretation); | ||
22688 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
22689 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"File class"); | ||
22690 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
22691 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"contents reference Dir"); | ||
22692 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
22693 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FSObject"); | ||
22694 | find mustInstanceOfDir_class(problem,interpretation,container); | ||
22695 | find mayInstanceOfFile_class(problem,interpretation,newObject); | ||
22696 | find mayInRelationcontents_reference_Dir(problem,interpretation,container,newObject); | ||
22697 | find mustExist(problem, interpretation, container); | ||
22698 | neg find mustExist(problem, interpretation, newObject); | ||
22699 | } | ||
22700 | pattern createObject_File_class_by_otherFSObjects_reference_Model( | ||
22701 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22702 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
22703 | container:DefinedElement) | ||
22704 | { | ||
22705 | find interpretation(problem,interpretation); | ||
22706 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
22707 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"File class"); | ||
22708 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
22709 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"otherFSObjects reference Model"); | ||
22710 | find mustInstanceOfModel_class(problem,interpretation,container); | ||
22711 | find mayInstanceOfFile_class(problem,interpretation,newObject); | ||
22712 | find mayInRelationotherFSObjects_reference_Model(problem,interpretation,container,newObject); | ||
22713 | find mustExist(problem, interpretation, container); | ||
22714 | neg find mustExist(problem, interpretation, newObject); | ||
22715 | } | ||
22716 | pattern createObject_File_class( | ||
22717 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22718 | typeInterpretation:PartialComplexTypeInterpretation) | ||
22719 | { | ||
22720 | find interpretation(problem,interpretation); | ||
22721 | neg find hasElementInContainment(problem,interpretation); | ||
22722 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
22723 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"File class"); | ||
22724 | find mayInstanceOfFile_class(problem,interpretation,newObject); | ||
22725 | find mayExist(problem, interpretation, newObject); | ||
22726 | neg find mustExist(problem, interpretation, newObject); | ||
22727 | } | ||
22728 | pattern createObject_FileSystem_class_by_filesystems_reference_Model( | ||
22729 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22730 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
22731 | container:DefinedElement) | ||
22732 | { | ||
22733 | find interpretation(problem,interpretation); | ||
22734 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
22735 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FileSystem class"); | ||
22736 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
22737 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"filesystems reference Model"); | ||
22738 | find mustInstanceOfModel_class(problem,interpretation,container); | ||
22739 | find mayInstanceOfFileSystem_class(problem,interpretation,newObject); | ||
22740 | find mayInRelationfilesystems_reference_Model(problem,interpretation,container,newObject); | ||
22741 | find mustExist(problem, interpretation, container); | ||
22742 | neg find mustExist(problem, interpretation, newObject); | ||
22743 | } | ||
22744 | pattern createObject_FileSystem_class( | ||
22745 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22746 | typeInterpretation:PartialComplexTypeInterpretation) | ||
22747 | { | ||
22748 | find interpretation(problem,interpretation); | ||
22749 | neg find hasElementInContainment(problem,interpretation); | ||
22750 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
22751 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FileSystem class"); | ||
22752 | find mayInstanceOfFileSystem_class(problem,interpretation,newObject); | ||
22753 | find mayExist(problem, interpretation, newObject); | ||
22754 | neg find mustExist(problem, interpretation, newObject); | ||
22755 | } | ||
22756 | pattern createObject_Dir_class_by_root_reference_FileSystem( | ||
22757 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22758 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
22759 | container:DefinedElement) | ||
22760 | { | ||
22761 | find interpretation(problem,interpretation); | ||
22762 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
22763 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class"); | ||
22764 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
22765 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"root reference FileSystem"); | ||
22766 | find mustInstanceOfFileSystem_class(problem,interpretation,container); | ||
22767 | find mayInstanceOfDir_class(problem,interpretation,newObject); | ||
22768 | find mayInRelationroot_reference_FileSystem(problem,interpretation,container,newObject); | ||
22769 | find mustExist(problem, interpretation, container); | ||
22770 | neg find mustExist(problem, interpretation, newObject); | ||
22771 | } | ||
22772 | pattern createObject_Dir_class_by_contents_reference_Dir_with_parent_reference_FSObject( | ||
22773 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22774 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
22775 | container:DefinedElement) | ||
22776 | { | ||
22777 | find interpretation(problem,interpretation); | ||
22778 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
22779 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class"); | ||
22780 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
22781 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"contents reference Dir"); | ||
22782 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
22783 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FSObject"); | ||
22784 | find mustInstanceOfDir_class(problem,interpretation,container); | ||
22785 | find mayInstanceOfDir_class(problem,interpretation,newObject); | ||
22786 | find mayInRelationcontents_reference_Dir(problem,interpretation,container,newObject); | ||
22787 | find mustExist(problem, interpretation, container); | ||
22788 | neg find mustExist(problem, interpretation, newObject); | ||
22789 | } | ||
22790 | pattern createObject_Dir_class_by_otherFSObjects_reference_Model( | ||
22791 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22792 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
22793 | container:DefinedElement) | ||
22794 | { | ||
22795 | find interpretation(problem,interpretation); | ||
22796 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
22797 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class"); | ||
22798 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
22799 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"otherFSObjects reference Model"); | ||
22800 | find mustInstanceOfModel_class(problem,interpretation,container); | ||
22801 | find mayInstanceOfDir_class(problem,interpretation,newObject); | ||
22802 | find mayInRelationotherFSObjects_reference_Model(problem,interpretation,container,newObject); | ||
22803 | find mustExist(problem, interpretation, container); | ||
22804 | neg find mustExist(problem, interpretation, newObject); | ||
22805 | } | ||
22806 | pattern createObject_Dir_class( | ||
22807 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22808 | typeInterpretation:PartialComplexTypeInterpretation) | ||
22809 | { | ||
22810 | find interpretation(problem,interpretation); | ||
22811 | neg find hasElementInContainment(problem,interpretation); | ||
22812 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
22813 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class"); | ||
22814 | find mayInstanceOfDir_class(problem,interpretation,newObject); | ||
22815 | find mayExist(problem, interpretation, newObject); | ||
22816 | neg find mustExist(problem, interpretation, newObject); | ||
22817 | } | ||
22818 | |||
22819 | ////////// | ||
22820 | // 4.2 Type refinement | ||
22821 | ////////// | ||
22822 | pattern refineTypeTo_Model_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
22823 | find interpretation(problem,interpretation); | ||
22824 | PartialInterpretation.newElements(interpretation,element); | ||
22825 | find mayInstanceOfModel_class_UndefinedPart(problem,interpretation,element); | ||
22826 | neg find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element); | ||
22827 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
22828 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
22829 | } | ||
22830 | pattern refineTypeTo_File_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
22831 | find interpretation(problem,interpretation); | ||
22832 | PartialInterpretation.newElements(interpretation,element); | ||
22833 | find mayInstanceOfFile_class(problem,interpretation,element); | ||
22834 | neg find mustInstanceOfFile_class(problem,interpretation,element); | ||
22835 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
22836 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
22837 | neg find mustInstanceOfDir_class(problem,interpretation,element); | ||
22838 | } | ||
22839 | pattern refineTypeTo_FileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
22840 | find interpretation(problem,interpretation); | ||
22841 | PartialInterpretation.newElements(interpretation,element); | ||
22842 | find mayInstanceOfFileSystem_class(problem,interpretation,element); | ||
22843 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
22844 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
22845 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
22846 | } | ||
22847 | pattern refineTypeTo_Dir_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
22848 | find interpretation(problem,interpretation); | ||
22849 | PartialInterpretation.newElements(interpretation,element); | ||
22850 | find mayInstanceOfDir_class(problem,interpretation,element); | ||
22851 | neg find mustInstanceOfFile_class(problem,interpretation,element); | ||
22852 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
22853 | neg find mustInstanceOfDir_class(problem,interpretation,element); | ||
22854 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
22855 | } | ||
22856 | |||
22857 | ////////// | ||
22858 | // 4.3 Relation refinement | ||
22859 | ////////// | ||
22860 | pattern refineRelation_live_reference_FileSystem( | ||
22861 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
22862 | relationIterpretation:PartialRelationInterpretation, | ||
22863 | from: DefinedElement, to: DefinedElement) | ||
22864 | { | ||
22865 | find interpretation(problem,interpretation); | ||
22866 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
22867 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"live reference FileSystem"); | ||
22868 | find mustExist(problem, interpretation, from); | ||
22869 | find mustExist(problem, interpretation, to); | ||
22870 | find mustInstanceOfFileSystem_class(problem,interpretation,from); | ||
22871 | find mustInstanceOfFSObject_class(problem,interpretation,to); | ||
22872 | find mayInRelationlive_reference_FileSystem(problem,interpretation,from,to); | ||
22873 | neg find mustInRelationlive_reference_FileSystem(problem,interpretation,from,to); | ||
22874 | } | ||
22875 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
22876 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" | ||
22877 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
22878 | |||
22879 | ////////// | ||
22880 | // 0. Util | ||
22881 | ////////// | ||
22882 | private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
22883 | PartialInterpretation.problem(interpretation,problem); | ||
22884 | } | ||
22885 | |||
22886 | ///////////////////////// | ||
22887 | // 0.1 Existence | ||
22888 | ///////////////////////// | ||
22889 | private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
22890 | find interpretation(problem,interpretation); | ||
22891 | LogicProblem.elements(problem,element); | ||
22892 | } or { | ||
22893 | find interpretation(problem,interpretation); | ||
22894 | PartialInterpretation.newElements(interpretation,element); | ||
22895 | } | ||
22896 | |||
22897 | private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
22898 | find mustExist(problem,interpretation,element); | ||
22899 | } or { | ||
22900 | find interpretation(problem,interpretation); | ||
22901 | neg find elementCloseWorld(element); | ||
22902 | PartialInterpretation.openWorldElements(interpretation,element); | ||
22903 | } | ||
22904 | |||
22905 | private pattern elementCloseWorld(element:DefinedElement) { | ||
22906 | PartialInterpretation.openWorldElements(i,element); | ||
22907 | PartialInterpretation.maxNewElements(i,0); | ||
22908 | } or { | ||
22909 | Scope.targetTypeInterpretation(scope,interpretation); | ||
22910 | PartialTypeInterpratation.elements(interpretation,element); | ||
22911 | Scope.maxNewElements(scope,0); | ||
22912 | } | ||
22913 | |||
22914 | //////////////////////// | ||
22915 | // 0.2 Equivalence | ||
22916 | //////////////////////// | ||
22917 | pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { | ||
22918 | find mayExist(problem,interpretation,a); | ||
22919 | find mayExist(problem,interpretation,b); | ||
22920 | a == b; | ||
22921 | } | ||
22922 | |||
22923 | //////////////////////// | ||
22924 | // 0.3 Required Patterns by TypeIndexer | ||
22925 | //////////////////////// | ||
22926 | private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { | ||
22927 | find interpretation(problem,interpretation); | ||
22928 | LogicProblem.types(problem,type); | ||
22929 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
22930 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
22931 | } | ||
22932 | |||
22933 | private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
22934 | find interpretation(problem,interpretation); | ||
22935 | LogicProblem.types(problem,type); | ||
22936 | TypeDefinition.elements(type,element); | ||
22937 | } or { | ||
22938 | find interpretation(problem,interpretation); | ||
22939 | find typeInterpretation(problem,interpretation,type,typeInterpretation); | ||
22940 | PartialComplexTypeInterpretation.elements(typeInterpretation,element); | ||
22941 | } | ||
22942 | |||
22943 | private pattern isPrimitive(element: PrimitiveElement) { | ||
22944 | PrimitiveElement(element); | ||
22945 | } | ||
22946 | |||
22947 | ////////// | ||
22948 | // 1. Problem-Specific Base Indexers | ||
22949 | ////////// | ||
22950 | // 1.1 Type Indexers | ||
22951 | ////////// | ||
22952 | // 1.1.1 primitive Type Indexers | ||
22953 | ////////// | ||
22954 | |||
22955 | ////////// | ||
22956 | // 1.1.2 domain-specific Type Indexers | ||
22957 | ////////// | ||
22958 | /** | ||
22959 | * An element must be an instance of type "FileSystem class". | ||
22960 | */ | ||
22961 | private pattern mustInstanceOfFileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
22962 | Type.name(type,"FileSystem class"); | ||
22963 | find directInstanceOf(problem,interpretation,element,type); | ||
22964 | } | ||
22965 | private pattern scopeDisallowsNewFileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
22966 | find interpretation(problem,interpretation); | ||
22967 | PartialInterpretation.scopes(interpretation,scope); | ||
22968 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
22969 | Scope.maxNewElements(scope,0); | ||
22970 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
22971 | Type.name(type,"FileSystem class"); | ||
22972 | } | ||
22973 | |||
22974 | /** | ||
22975 | * An element may be an instance of type "FileSystem class". | ||
22976 | */ | ||
22977 | private pattern mayInstanceOfFileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
22978 | { | ||
22979 | find interpretation(problem,interpretation); | ||
22980 | PartialInterpretation.newElements(interpretation,element); | ||
22981 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
22982 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
22983 | neg find scopeDisallowsNewFileSystem_class(problem, interpretation); | ||
22984 | neg find isPrimitive(element); | ||
22985 | } or { | ||
22986 | find interpretation(problem,interpretation); | ||
22987 | PartialInterpretation.openWorldElements(interpretation,element); | ||
22988 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
22989 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
22990 | neg find scopeDisallowsNewFileSystem_class(problem, interpretation); | ||
22991 | neg find isPrimitive(element); | ||
22992 | } or | ||
22993 | { find mustInstanceOfFileSystem_class(problem,interpretation,element); } | ||
22994 | /** | ||
22995 | * An element must be an instance of type "FSObject class". | ||
22996 | */ | ||
22997 | private pattern mustInstanceOfFSObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
22998 | Type.name(type,"FSObject class"); | ||
22999 | find directInstanceOf(problem,interpretation,element,type); | ||
23000 | } | ||
23001 | private pattern scopeDisallowsNewFSObject_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
23002 | find interpretation(problem,interpretation); | ||
23003 | PartialInterpretation.scopes(interpretation,scope); | ||
23004 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
23005 | Scope.maxNewElements(scope,0); | ||
23006 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
23007 | Type.name(type,"FSObject class"); | ||
23008 | } | ||
23009 | |||
23010 | /** | ||
23011 | * An element may be an instance of type "FSObject class". | ||
23012 | */ | ||
23013 | private pattern mayInstanceOfFSObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
23014 | { | ||
23015 | find interpretation(problem,interpretation); | ||
23016 | PartialInterpretation.newElements(interpretation,element); | ||
23017 | neg find mustInstanceOfDir_class(problem,interpretation,element); | ||
23018 | neg find mustInstanceOfFile_class(problem,interpretation,element); | ||
23019 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
23020 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
23021 | neg find scopeDisallowsNewFSObject_class(problem, interpretation); | ||
23022 | neg find isPrimitive(element); | ||
23023 | } or { | ||
23024 | find interpretation(problem,interpretation); | ||
23025 | PartialInterpretation.openWorldElements(interpretation,element); | ||
23026 | neg find mustInstanceOfDir_class(problem,interpretation,element); | ||
23027 | neg find mustInstanceOfFile_class(problem,interpretation,element); | ||
23028 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
23029 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
23030 | neg find scopeDisallowsNewFSObject_class(problem, interpretation); | ||
23031 | neg find isPrimitive(element); | ||
23032 | } or | ||
23033 | { find mustInstanceOfFSObject_class(problem,interpretation,element); } | ||
23034 | /** | ||
23035 | * An element must be an instance of type "Dir class". | ||
23036 | */ | ||
23037 | private pattern mustInstanceOfDir_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
23038 | Type.name(type,"Dir class"); | ||
23039 | find directInstanceOf(problem,interpretation,element,type); | ||
23040 | } | ||
23041 | private pattern scopeDisallowsNewDir_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
23042 | find interpretation(problem,interpretation); | ||
23043 | PartialInterpretation.scopes(interpretation,scope); | ||
23044 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
23045 | Scope.maxNewElements(scope,0); | ||
23046 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
23047 | Type.name(type,"Dir class"); | ||
23048 | } | ||
23049 | |||
23050 | /** | ||
23051 | * An element may be an instance of type "Dir class". | ||
23052 | */ | ||
23053 | private pattern mayInstanceOfDir_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
23054 | { | ||
23055 | find interpretation(problem,interpretation); | ||
23056 | PartialInterpretation.newElements(interpretation,element); | ||
23057 | neg find mustInstanceOfFile_class(problem,interpretation,element); | ||
23058 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
23059 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
23060 | neg find scopeDisallowsNewDir_class(problem, interpretation); | ||
23061 | neg find isPrimitive(element); | ||
23062 | } or { | ||
23063 | find interpretation(problem,interpretation); | ||
23064 | PartialInterpretation.openWorldElements(interpretation,element); | ||
23065 | neg find mustInstanceOfFile_class(problem,interpretation,element); | ||
23066 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
23067 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
23068 | neg find scopeDisallowsNewDir_class(problem, interpretation); | ||
23069 | neg find isPrimitive(element); | ||
23070 | } or | ||
23071 | { find mustInstanceOfDir_class(problem,interpretation,element); } | ||
23072 | /** | ||
23073 | * An element must be an instance of type "File class". | ||
23074 | */ | ||
23075 | private pattern mustInstanceOfFile_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
23076 | Type.name(type,"File class"); | ||
23077 | find directInstanceOf(problem,interpretation,element,type); | ||
23078 | } | ||
23079 | private pattern scopeDisallowsNewFile_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
23080 | find interpretation(problem,interpretation); | ||
23081 | PartialInterpretation.scopes(interpretation,scope); | ||
23082 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
23083 | Scope.maxNewElements(scope,0); | ||
23084 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
23085 | Type.name(type,"File class"); | ||
23086 | } | ||
23087 | |||
23088 | /** | ||
23089 | * An element may be an instance of type "File class". | ||
23090 | */ | ||
23091 | private pattern mayInstanceOfFile_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
23092 | { | ||
23093 | find interpretation(problem,interpretation); | ||
23094 | PartialInterpretation.newElements(interpretation,element); | ||
23095 | neg find mustInstanceOfDir_class(problem,interpretation,element); | ||
23096 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
23097 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
23098 | neg find scopeDisallowsNewFile_class(problem, interpretation); | ||
23099 | neg find isPrimitive(element); | ||
23100 | } or { | ||
23101 | find interpretation(problem,interpretation); | ||
23102 | PartialInterpretation.openWorldElements(interpretation,element); | ||
23103 | neg find mustInstanceOfDir_class(problem,interpretation,element); | ||
23104 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
23105 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
23106 | neg find scopeDisallowsNewFile_class(problem, interpretation); | ||
23107 | neg find isPrimitive(element); | ||
23108 | } or | ||
23109 | { find mustInstanceOfFile_class(problem,interpretation,element); } | ||
23110 | /** | ||
23111 | * An element must be an instance of type "Model class". | ||
23112 | */ | ||
23113 | private pattern mustInstanceOfModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
23114 | Type.name(type,"Model class"); | ||
23115 | find directInstanceOf(problem,interpretation,element,type); | ||
23116 | } | ||
23117 | private pattern scopeDisallowsNewModel_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
23118 | find interpretation(problem,interpretation); | ||
23119 | PartialInterpretation.scopes(interpretation,scope); | ||
23120 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
23121 | Scope.maxNewElements(scope,0); | ||
23122 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
23123 | Type.name(type,"Model class"); | ||
23124 | } | ||
23125 | |||
23126 | /** | ||
23127 | * An element may be an instance of type "Model class". | ||
23128 | */ | ||
23129 | private pattern mayInstanceOfModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
23130 | { | ||
23131 | find interpretation(problem,interpretation); | ||
23132 | PartialInterpretation.newElements(interpretation,element); | ||
23133 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
23134 | neg find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element); | ||
23135 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
23136 | neg find scopeDisallowsNewModel_class(problem, interpretation); | ||
23137 | neg find isPrimitive(element); | ||
23138 | } or { | ||
23139 | find interpretation(problem,interpretation); | ||
23140 | PartialInterpretation.openWorldElements(interpretation,element); | ||
23141 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
23142 | neg find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element); | ||
23143 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
23144 | neg find scopeDisallowsNewModel_class(problem, interpretation); | ||
23145 | neg find isPrimitive(element); | ||
23146 | } or | ||
23147 | { find mustInstanceOfModel_class(problem,interpretation,element); } | ||
23148 | /** | ||
23149 | * An element must be an instance of type "Model class DefinedPart". | ||
23150 | */ | ||
23151 | private pattern mustInstanceOfModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
23152 | Type.name(type,"Model class DefinedPart"); | ||
23153 | find directInstanceOf(problem,interpretation,element,type); | ||
23154 | } | ||
23155 | private pattern scopeDisallowsNewModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
23156 | find interpretation(problem,interpretation); | ||
23157 | PartialInterpretation.scopes(interpretation,scope); | ||
23158 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
23159 | Scope.maxNewElements(scope,0); | ||
23160 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
23161 | Type.name(type,"Model class DefinedPart"); | ||
23162 | } | ||
23163 | |||
23164 | /** | ||
23165 | * An element may be an instance of type "Model class DefinedPart". | ||
23166 | */ | ||
23167 | private pattern mayInstanceOfModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
23168 | { find mustInstanceOfModel_class_DefinedPart(problem,interpretation,element); } | ||
23169 | /** | ||
23170 | * An element must be an instance of type "Model class UndefinedPart". | ||
23171 | */ | ||
23172 | private pattern mustInstanceOfModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
23173 | Type.name(type,"Model class UndefinedPart"); | ||
23174 | find directInstanceOf(problem,interpretation,element,type); | ||
23175 | } | ||
23176 | private pattern scopeDisallowsNewModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
23177 | find interpretation(problem,interpretation); | ||
23178 | PartialInterpretation.scopes(interpretation,scope); | ||
23179 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
23180 | Scope.maxNewElements(scope,0); | ||
23181 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
23182 | Type.name(type,"Model class UndefinedPart"); | ||
23183 | } | ||
23184 | |||
23185 | /** | ||
23186 | * An element may be an instance of type "Model class UndefinedPart". | ||
23187 | */ | ||
23188 | private pattern mayInstanceOfModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
23189 | { | ||
23190 | find interpretation(problem,interpretation); | ||
23191 | PartialInterpretation.newElements(interpretation,element); | ||
23192 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
23193 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
23194 | neg find scopeDisallowsNewModel_class_UndefinedPart(problem, interpretation); | ||
23195 | neg find isPrimitive(element); | ||
23196 | } or { | ||
23197 | find interpretation(problem,interpretation); | ||
23198 | PartialInterpretation.openWorldElements(interpretation,element); | ||
23199 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
23200 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
23201 | neg find scopeDisallowsNewModel_class_UndefinedPart(problem, interpretation); | ||
23202 | neg find isPrimitive(element); | ||
23203 | } or | ||
23204 | { find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element); } | ||
23205 | |||
23206 | ////////// | ||
23207 | // 1.2 Relation Declaration Indexers | ||
23208 | ////////// | ||
23209 | /** | ||
23210 | * Matcher for detecting tuples t where []root reference FileSystem(source,target) | ||
23211 | */ | ||
23212 | private pattern mustInRelationroot_reference_FileSystem( | ||
23213 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23214 | source: DefinedElement, target:DefinedElement) | ||
23215 | { | ||
23216 | find interpretation(problem,interpretation); | ||
23217 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
23218 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"root reference FileSystem"); | ||
23219 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
23220 | BinaryElementRelationLink.param1(link,source); | ||
23221 | BinaryElementRelationLink.param2(link,target); | ||
23222 | } | ||
23223 | /** | ||
23224 | * Matcher for detecting tuples t where <>root reference FileSystem(source,target) | ||
23225 | */ | ||
23226 | private pattern mayInRelationroot_reference_FileSystem( | ||
23227 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23228 | source: DefinedElement, target:DefinedElement) | ||
23229 | { | ||
23230 | find interpretation(problem,interpretation); | ||
23231 | // The two endpoint of the link have to exist | ||
23232 | find mayExist(problem, interpretation, source); | ||
23233 | find mayExist(problem, interpretation, target); | ||
23234 | // Type consistency | ||
23235 | find mayInstanceOfFileSystem_class(problem,interpretation,source); | ||
23236 | find mayInstanceOfDir_class(problem,interpretation,target); | ||
23237 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
23238 | // the upper bound of the multiplicity should be considered. | ||
23239 | numberOfExistingReferences == count find mustInRelationroot_reference_FileSystem(problem,interpretation,source,_); | ||
23240 | check(numberOfExistingReferences < 1); | ||
23241 | // The reference is containment, then a new reference cannot be create if: | ||
23242 | // 1. Multiple parents | ||
23243 | neg find mustContains4(problem,interpretation,_,target); | ||
23244 | // 2. Circle in the containment hierarchy | ||
23245 | neg find mustTransitiveContains(source,target); | ||
23246 | } or { | ||
23247 | find mustInRelationroot_reference_FileSystem(problem,interpretation,source,target); | ||
23248 | } | ||
23249 | /** | ||
23250 | * Matcher for detecting tuples t where []live reference FileSystem(source,target) | ||
23251 | */ | ||
23252 | private pattern mustInRelationlive_reference_FileSystem( | ||
23253 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23254 | source: DefinedElement, target:DefinedElement) | ||
23255 | { | ||
23256 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,source,target); | ||
23257 | } | ||
23258 | /** | ||
23259 | * Matcher for detecting tuples t where []live reference FileSystem(source,target) | ||
23260 | */ | ||
23261 | private pattern mayInRelationlive_reference_FileSystem( | ||
23262 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23263 | source: DefinedElement, target:DefinedElement) | ||
23264 | { | ||
23265 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,source,target); | ||
23266 | } | ||
23267 | /** | ||
23268 | * Matcher for detecting tuples t where []parent reference FSObject(source,target) | ||
23269 | */ | ||
23270 | private pattern mustInRelationparent_reference_FSObject( | ||
23271 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23272 | source: DefinedElement, target:DefinedElement) | ||
23273 | { | ||
23274 | find interpretation(problem,interpretation); | ||
23275 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
23276 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FSObject"); | ||
23277 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
23278 | BinaryElementRelationLink.param1(link,source); | ||
23279 | BinaryElementRelationLink.param2(link,target); | ||
23280 | } | ||
23281 | /** | ||
23282 | * Matcher for detecting tuples t where <>parent reference FSObject(source,target) | ||
23283 | */ | ||
23284 | private pattern mayInRelationparent_reference_FSObject( | ||
23285 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23286 | source: DefinedElement, target:DefinedElement) | ||
23287 | { | ||
23288 | find interpretation(problem,interpretation); | ||
23289 | // The two endpoint of the link have to exist | ||
23290 | find mayExist(problem, interpretation, source); | ||
23291 | find mayExist(problem, interpretation, target); | ||
23292 | // Type consistency | ||
23293 | find mayInstanceOfFSObject_class(problem,interpretation,source); | ||
23294 | find mayInstanceOfDir_class(problem,interpretation,target); | ||
23295 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
23296 | // the upper bound of the multiplicity should be considered. | ||
23297 | numberOfExistingReferences == count find mustInRelationparent_reference_FSObject(problem,interpretation,source,_); | ||
23298 | check(numberOfExistingReferences < 1); | ||
23299 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
23300 | // 1. Multiple parents | ||
23301 | neg find mustContains4(problem,interpretation,source,_); | ||
23302 | // 2. Circle in the containment hierarchy | ||
23303 | neg find mustTransitiveContains(source,target); | ||
23304 | } or { | ||
23305 | find mustInRelationparent_reference_FSObject(problem,interpretation,source,target); | ||
23306 | } | ||
23307 | /** | ||
23308 | * Matcher for detecting tuples t where []contents reference Dir(source,target) | ||
23309 | */ | ||
23310 | private pattern mustInRelationcontents_reference_Dir( | ||
23311 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23312 | source: DefinedElement, target:DefinedElement) | ||
23313 | { | ||
23314 | find interpretation(problem,interpretation); | ||
23315 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
23316 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"contents reference Dir"); | ||
23317 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
23318 | BinaryElementRelationLink.param1(link,source); | ||
23319 | BinaryElementRelationLink.param2(link,target); | ||
23320 | } | ||
23321 | /** | ||
23322 | * Matcher for detecting tuples t where <>contents reference Dir(source,target) | ||
23323 | */ | ||
23324 | private pattern mayInRelationcontents_reference_Dir( | ||
23325 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23326 | source: DefinedElement, target:DefinedElement) | ||
23327 | { | ||
23328 | find interpretation(problem,interpretation); | ||
23329 | // The two endpoint of the link have to exist | ||
23330 | find mayExist(problem, interpretation, source); | ||
23331 | find mayExist(problem, interpretation, target); | ||
23332 | // Type consistency | ||
23333 | find mayInstanceOfDir_class(problem,interpretation,source); | ||
23334 | find mayInstanceOfFSObject_class(problem,interpretation,target); | ||
23335 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
23336 | // the upper bound of the opposite reference multiplicity should be considered. | ||
23337 | numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FSObject(problem,interpretation,target,_); | ||
23338 | check(numberOfExistingOppositeReferences < 1); | ||
23339 | // The reference is containment, then a new reference cannot be create if: | ||
23340 | // 1. Multiple parents | ||
23341 | neg find mustContains4(problem,interpretation,_,target); | ||
23342 | // 2. Circle in the containment hierarchy | ||
23343 | neg find mustTransitiveContains(source,target); | ||
23344 | } or { | ||
23345 | find mustInRelationcontents_reference_Dir(problem,interpretation,source,target); | ||
23346 | } | ||
23347 | /** | ||
23348 | * Matcher for detecting tuples t where []filesystems reference Model(source,target) | ||
23349 | */ | ||
23350 | private pattern mustInRelationfilesystems_reference_Model( | ||
23351 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23352 | source: DefinedElement, target:DefinedElement) | ||
23353 | { | ||
23354 | find interpretation(problem,interpretation); | ||
23355 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
23356 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"filesystems reference Model"); | ||
23357 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
23358 | BinaryElementRelationLink.param1(link,source); | ||
23359 | BinaryElementRelationLink.param2(link,target); | ||
23360 | } | ||
23361 | /** | ||
23362 | * Matcher for detecting tuples t where <>filesystems reference Model(source,target) | ||
23363 | */ | ||
23364 | private pattern mayInRelationfilesystems_reference_Model( | ||
23365 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23366 | source: DefinedElement, target:DefinedElement) | ||
23367 | { | ||
23368 | find interpretation(problem,interpretation); | ||
23369 | // The two endpoint of the link have to exist | ||
23370 | find mayExist(problem, interpretation, source); | ||
23371 | find mayExist(problem, interpretation, target); | ||
23372 | // Type consistency | ||
23373 | find mayInstanceOfModel_class(problem,interpretation,source); | ||
23374 | find mayInstanceOfFileSystem_class(problem,interpretation,target); | ||
23375 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
23376 | // the upper bound of the multiplicity should be considered. | ||
23377 | numberOfExistingReferences == count find mustInRelationfilesystems_reference_Model(problem,interpretation,source,_); | ||
23378 | check(numberOfExistingReferences < 1); | ||
23379 | // The reference is containment, then a new reference cannot be create if: | ||
23380 | // 1. Multiple parents | ||
23381 | neg find mustContains4(problem,interpretation,_,target); | ||
23382 | // 2. Circle in the containment hierarchy | ||
23383 | neg find mustTransitiveContains(source,target); | ||
23384 | } or { | ||
23385 | find mustInRelationfilesystems_reference_Model(problem,interpretation,source,target); | ||
23386 | } | ||
23387 | /** | ||
23388 | * Matcher for detecting tuples t where []otherFSObjects reference Model(source,target) | ||
23389 | */ | ||
23390 | private pattern mustInRelationotherFSObjects_reference_Model( | ||
23391 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23392 | source: DefinedElement, target:DefinedElement) | ||
23393 | { | ||
23394 | find interpretation(problem,interpretation); | ||
23395 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
23396 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"otherFSObjects reference Model"); | ||
23397 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
23398 | BinaryElementRelationLink.param1(link,source); | ||
23399 | BinaryElementRelationLink.param2(link,target); | ||
23400 | } | ||
23401 | /** | ||
23402 | * Matcher for detecting tuples t where <>otherFSObjects reference Model(source,target) | ||
23403 | */ | ||
23404 | private pattern mayInRelationotherFSObjects_reference_Model( | ||
23405 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23406 | source: DefinedElement, target:DefinedElement) | ||
23407 | { | ||
23408 | find interpretation(problem,interpretation); | ||
23409 | // The two endpoint of the link have to exist | ||
23410 | find mayExist(problem, interpretation, source); | ||
23411 | find mayExist(problem, interpretation, target); | ||
23412 | // Type consistency | ||
23413 | find mayInstanceOfModel_class(problem,interpretation,source); | ||
23414 | find mayInstanceOfFSObject_class(problem,interpretation,target); | ||
23415 | // The reference is containment, then a new reference cannot be create if: | ||
23416 | // 1. Multiple parents | ||
23417 | neg find mustContains4(problem,interpretation,_,target); | ||
23418 | // 2. Circle in the containment hierarchy | ||
23419 | neg find mustTransitiveContains(source,target); | ||
23420 | } or { | ||
23421 | find mustInRelationotherFSObjects_reference_Model(problem,interpretation,source,target); | ||
23422 | } | ||
23423 | |||
23424 | ////////// | ||
23425 | // 1.3 Relation Definition Indexers | ||
23426 | ////////// | ||
23427 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test filesystem queries patternContent | ||
23428 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent( | ||
23429 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23430 | var_o1, var_o2) | ||
23431 | { | ||
23432 | find interpretation(problem,interpretation); | ||
23433 | find mustInstanceOfFSObject_class(problem,interpretation,var_o1); | ||
23434 | find mustInstanceOfFSObject_class(problem,interpretation,var_o2); | ||
23435 | // o1 is exported | ||
23436 | // o2 is exported | ||
23437 | find mustInstanceOfDir_class(problem,interpretation,var_o1); | ||
23438 | find mustInRelationcontents_reference_Dir(problem,interpretation,var_o1,var_virtual0); | ||
23439 | find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0); | ||
23440 | var_virtual0 == var_o2; | ||
23441 | } | ||
23442 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent( | ||
23443 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23444 | var_o1, var_o2) | ||
23445 | { | ||
23446 | find interpretation(problem,interpretation); | ||
23447 | find mayInstanceOfFSObject_class(problem,interpretation,var_o1); | ||
23448 | find mayInstanceOfFSObject_class(problem,interpretation,var_o2); | ||
23449 | // o1 is exported | ||
23450 | // o2 is exported | ||
23451 | find mayInstanceOfDir_class(problem,interpretation,var_o1); | ||
23452 | find mayInRelationcontents_reference_Dir(problem,interpretation,var_o1,var_virtual0); | ||
23453 | find mayInstanceOfFSObject_class(problem,interpretation,var_virtual0); | ||
23454 | find mayEquivalent(problem, interpretation, var_virtual0, var_o2); | ||
23455 | } | ||
23456 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent( | ||
23457 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23458 | var_o1, var_o2) | ||
23459 | { | ||
23460 | find interpretation(problem,interpretation); | ||
23461 | find mustInstanceOfFSObject_class(problem,interpretation,var_o1); | ||
23462 | find mustInstanceOfFSObject_class(problem,interpretation,var_o2); | ||
23463 | // o1 is exported | ||
23464 | // o2 is exported | ||
23465 | find mustInstanceOfDir_class(problem,interpretation,var_o1); | ||
23466 | find mustInRelationcontents_reference_Dir(problem,interpretation,var_o1,var_virtual0); | ||
23467 | find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0); | ||
23468 | var_virtual0 == var_o2; | ||
23469 | } | ||
23470 | private pattern twoParam_mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(var_o1, var_o2) { | ||
23471 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(_,_,var_o1, var_o2); | ||
23472 | } | ||
23473 | private pattern twoParam_mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(var_o1, var_o2) { | ||
23474 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(_,_,var_o1, var_o2); | ||
23475 | } | ||
23476 | private pattern twoParam_currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(var_o1, var_o2) { | ||
23477 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(_,_,var_o1, var_o2); | ||
23478 | } | ||
23479 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test filesystem queries live | ||
23480 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live( | ||
23481 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23482 | var_this, var_l) | ||
23483 | { | ||
23484 | find interpretation(problem,interpretation); | ||
23485 | find mustInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
23486 | find mustInstanceOfFSObject_class(problem,interpretation,var_l); | ||
23487 | // this is exported | ||
23488 | // l is exported | ||
23489 | find mustInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
23490 | find mustInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0); | ||
23491 | find mustInstanceOfDir_class(problem,interpretation,var_virtual0); | ||
23492 | var_virtual0 == var_l; | ||
23493 | }or{ | ||
23494 | find interpretation(problem,interpretation); | ||
23495 | find mustInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
23496 | find mustInstanceOfFSObject_class(problem,interpretation,var_l); | ||
23497 | // this is exported | ||
23498 | // l is exported | ||
23499 | find mustInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
23500 | find mustInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0); | ||
23501 | find mustInstanceOfDir_class(problem,interpretation,var_virtual0); | ||
23502 | var_virtual0 == var_root; | ||
23503 | find twoParam_mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent+(var_root,var_l); | ||
23504 | } | ||
23505 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live( | ||
23506 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23507 | var_this, var_l) | ||
23508 | { | ||
23509 | find interpretation(problem,interpretation); | ||
23510 | find mayInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
23511 | find mayInstanceOfFSObject_class(problem,interpretation,var_l); | ||
23512 | // this is exported | ||
23513 | // l is exported | ||
23514 | find mayInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
23515 | find mayInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0); | ||
23516 | find mayInstanceOfDir_class(problem,interpretation,var_virtual0); | ||
23517 | find mayEquivalent(problem, interpretation, var_virtual0, var_l); | ||
23518 | }or{ | ||
23519 | find interpretation(problem,interpretation); | ||
23520 | find mayInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
23521 | find mayInstanceOfFSObject_class(problem,interpretation,var_l); | ||
23522 | // this is exported | ||
23523 | // l is exported | ||
23524 | find mayInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
23525 | find mayInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0); | ||
23526 | find mayInstanceOfDir_class(problem,interpretation,var_virtual0); | ||
23527 | find mayEquivalent(problem, interpretation, var_virtual0, var_root); | ||
23528 | find twoParam_mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent+(var_root,var_l); | ||
23529 | } | ||
23530 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live( | ||
23531 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23532 | var_this, var_l) | ||
23533 | { | ||
23534 | find interpretation(problem,interpretation); | ||
23535 | find mustInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
23536 | find mustInstanceOfFSObject_class(problem,interpretation,var_l); | ||
23537 | // this is exported | ||
23538 | // l is exported | ||
23539 | find mustInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
23540 | find mustInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0); | ||
23541 | find mustInstanceOfDir_class(problem,interpretation,var_virtual0); | ||
23542 | var_virtual0 == var_l; | ||
23543 | }or{ | ||
23544 | find interpretation(problem,interpretation); | ||
23545 | find mustInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
23546 | find mustInstanceOfFSObject_class(problem,interpretation,var_l); | ||
23547 | // this is exported | ||
23548 | // l is exported | ||
23549 | find mustInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
23550 | find mustInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0); | ||
23551 | find mustInstanceOfDir_class(problem,interpretation,var_virtual0); | ||
23552 | var_virtual0 == var_root; | ||
23553 | find twoParam_currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent+(var_root,var_l); | ||
23554 | } | ||
23555 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test filesystem queries contentInNotLive | ||
23556 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive( | ||
23557 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23558 | var_parent, var_child) | ||
23559 | { | ||
23560 | find interpretation(problem,interpretation); | ||
23561 | find mustInstanceOfDir_class(problem,interpretation,var_parent); | ||
23562 | find mustInstanceOfFSObject_class(problem,interpretation,var_child); | ||
23563 | // parent is exported | ||
23564 | // child is exported | ||
23565 | find mustInstanceOfDir_class(problem,interpretation,var_parent); | ||
23566 | find mustInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0); | ||
23567 | find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0); | ||
23568 | var_virtual0 == var_child; | ||
23569 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_parent); | ||
23570 | }or{ | ||
23571 | find interpretation(problem,interpretation); | ||
23572 | find mustInstanceOfDir_class(problem,interpretation,var_parent); | ||
23573 | find mustInstanceOfFSObject_class(problem,interpretation,var_child); | ||
23574 | // parent is exported | ||
23575 | // child is exported | ||
23576 | find mustInstanceOfDir_class(problem,interpretation,var_parent); | ||
23577 | find mustInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0); | ||
23578 | find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0); | ||
23579 | var_virtual0 == var_child; | ||
23580 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_child); | ||
23581 | } | ||
23582 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive( | ||
23583 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23584 | var_parent, var_child) | ||
23585 | { | ||
23586 | find interpretation(problem,interpretation); | ||
23587 | find mayInstanceOfDir_class(problem,interpretation,var_parent); | ||
23588 | find mayInstanceOfFSObject_class(problem,interpretation,var_child); | ||
23589 | // parent is exported | ||
23590 | // child is exported | ||
23591 | find mayInstanceOfDir_class(problem,interpretation,var_parent); | ||
23592 | find mayInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0); | ||
23593 | find mayInstanceOfFSObject_class(problem,interpretation,var_virtual0); | ||
23594 | find mayEquivalent(problem, interpretation, var_virtual0, var_child); | ||
23595 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_parent); | ||
23596 | }or{ | ||
23597 | find interpretation(problem,interpretation); | ||
23598 | find mayInstanceOfDir_class(problem,interpretation,var_parent); | ||
23599 | find mayInstanceOfFSObject_class(problem,interpretation,var_child); | ||
23600 | // parent is exported | ||
23601 | // child is exported | ||
23602 | find mayInstanceOfDir_class(problem,interpretation,var_parent); | ||
23603 | find mayInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0); | ||
23604 | find mayInstanceOfFSObject_class(problem,interpretation,var_virtual0); | ||
23605 | find mayEquivalent(problem, interpretation, var_virtual0, var_child); | ||
23606 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_child); | ||
23607 | } | ||
23608 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive( | ||
23609 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23610 | var_parent, var_child) | ||
23611 | { | ||
23612 | find interpretation(problem,interpretation); | ||
23613 | find mustInstanceOfDir_class(problem,interpretation,var_parent); | ||
23614 | find mustInstanceOfFSObject_class(problem,interpretation,var_child); | ||
23615 | // parent is exported | ||
23616 | // child is exported | ||
23617 | find mustInstanceOfDir_class(problem,interpretation,var_parent); | ||
23618 | find mustInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0); | ||
23619 | find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0); | ||
23620 | var_virtual0 == var_child; | ||
23621 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_parent); | ||
23622 | }or{ | ||
23623 | find interpretation(problem,interpretation); | ||
23624 | find mustInstanceOfDir_class(problem,interpretation,var_parent); | ||
23625 | find mustInstanceOfFSObject_class(problem,interpretation,var_child); | ||
23626 | // parent is exported | ||
23627 | // child is exported | ||
23628 | find mustInstanceOfDir_class(problem,interpretation,var_parent); | ||
23629 | find mustInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0); | ||
23630 | find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0); | ||
23631 | var_virtual0 == var_child; | ||
23632 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_child); | ||
23633 | } | ||
23634 | |||
23635 | ////////// | ||
23636 | // 1.4 Containment Indexer | ||
23637 | ////////// | ||
23638 | private pattern mustContains2(source: DefinedElement, target: DefinedElement) { | ||
23639 | find mustContains4(_,_,source,target); | ||
23640 | } | ||
23641 | |||
23642 | private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, | ||
23643 | source: DefinedElement, target: DefinedElement) | ||
23644 | { find mustInRelationroot_reference_FileSystem(problem,interpretation,source,target); }or | ||
23645 | |||
23646 | { find mustInRelationcontents_reference_Dir(problem,interpretation,source,target); }or | ||
23647 | |||
23648 | { find mustInRelationfilesystems_reference_Model(problem,interpretation,source,target); }or | ||
23649 | |||
23650 | { find mustInRelationotherFSObjects_reference_Model(problem,interpretation,source,target); } | ||
23651 | |||
23652 | private pattern mustTransitiveContains(source,target) { | ||
23653 | find mustContains2+(source,target); | ||
23654 | } | ||
23655 | |||
23656 | ////////// | ||
23657 | // 2. Invalidation Indexers | ||
23658 | ////////// | ||
23659 | // 2.1 Invalidated by WF Queries | ||
23660 | ////////// | ||
23661 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(problem:LogicProblem, interpretation:PartialInterpretation, | ||
23662 | var_parent, var_child) | ||
23663 | { | ||
23664 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(problem,interpretation,var_parent,var_child); | ||
23665 | } | ||
23666 | |||
23667 | ////////// | ||
23668 | // 3. Unfinishedness Indexers | ||
23669 | ////////// | ||
23670 | // 3.1 Unfinishedness Measured by Multiplicity | ||
23671 | ////////// | ||
23672 | pattern unfinishedLowerMultiplicity_root_reference_FileSystem(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
23673 | find interpretation(problem,interpretation); | ||
23674 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
23675 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"root reference FileSystem"); | ||
23676 | find mustInstanceOfFileSystem_class(problem,interpretation,object); | ||
23677 | numberOfExistingReferences == count find mustInRelationroot_reference_FileSystem(problem,interpretation,object,_); | ||
23678 | check(numberOfExistingReferences < 1); | ||
23679 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
23680 | } | ||
23681 | pattern unfinishedLowerMultiplicity_filesystems_reference_Model(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
23682 | find interpretation(problem,interpretation); | ||
23683 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
23684 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"filesystems reference Model"); | ||
23685 | find mustInstanceOfModel_class(problem,interpretation,object); | ||
23686 | numberOfExistingReferences == count find mustInRelationfilesystems_reference_Model(problem,interpretation,object,_); | ||
23687 | check(numberOfExistingReferences < 1); | ||
23688 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
23689 | } | ||
23690 | |||
23691 | ////////// | ||
23692 | // 3.2 Unfinishedness Measured by WF Queries | ||
23693 | ////////// | ||
23694 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(problem:LogicProblem, interpretation:PartialInterpretation, | ||
23695 | var_parent, var_child) | ||
23696 | { | ||
23697 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(problem,interpretation,var_parent,var_child); | ||
23698 | } | ||
23699 | |||
23700 | ////////// | ||
23701 | // 4. Refinement Indexers | ||
23702 | ////////// | ||
23703 | // 4.1 Object constructors | ||
23704 | ////////// | ||
23705 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) | ||
23706 | { | ||
23707 | find interpretation(problem,interpretation); | ||
23708 | find mustInstanceOfModel_class(problem,interpretation,root); | ||
23709 | find mustExist(problem, interpretation, root); | ||
23710 | }or{ | ||
23711 | find interpretation(problem,interpretation); | ||
23712 | find mustInstanceOfFile_class(problem,interpretation,root); | ||
23713 | find mustExist(problem, interpretation, root); | ||
23714 | }or{ | ||
23715 | find interpretation(problem,interpretation); | ||
23716 | find mustInstanceOfFSObject_class(problem,interpretation,root); | ||
23717 | find mustExist(problem, interpretation, root); | ||
23718 | }or{ | ||
23719 | find interpretation(problem,interpretation); | ||
23720 | find mustInstanceOfFileSystem_class(problem,interpretation,root); | ||
23721 | find mustExist(problem, interpretation, root); | ||
23722 | }or{ | ||
23723 | find interpretation(problem,interpretation); | ||
23724 | find mustInstanceOfDir_class(problem,interpretation,root); | ||
23725 | find mustExist(problem, interpretation, root); | ||
23726 | }or{ | ||
23727 | find interpretation(problem,interpretation); | ||
23728 | find mustInstanceOfModel_class_DefinedPart(problem,interpretation,root); | ||
23729 | find mustExist(problem, interpretation, root); | ||
23730 | }or{ | ||
23731 | find interpretation(problem,interpretation); | ||
23732 | find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,root); | ||
23733 | find mustExist(problem, interpretation, root); | ||
23734 | } | ||
23735 | pattern createObject_Dir_class_by_root_reference_FileSystem( | ||
23736 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23737 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
23738 | container:DefinedElement) | ||
23739 | { | ||
23740 | find interpretation(problem,interpretation); | ||
23741 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
23742 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class"); | ||
23743 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
23744 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"root reference FileSystem"); | ||
23745 | find mustInstanceOfFileSystem_class(problem,interpretation,container); | ||
23746 | find mayInstanceOfDir_class(problem,interpretation,newObject); | ||
23747 | find mayInRelationroot_reference_FileSystem(problem,interpretation,container,newObject); | ||
23748 | find mustExist(problem, interpretation, container); | ||
23749 | neg find mustExist(problem, interpretation, newObject); | ||
23750 | } | ||
23751 | pattern createObject_Dir_class_by_contents_reference_Dir_with_parent_reference_FSObject( | ||
23752 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23753 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
23754 | container:DefinedElement) | ||
23755 | { | ||
23756 | find interpretation(problem,interpretation); | ||
23757 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
23758 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class"); | ||
23759 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
23760 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"contents reference Dir"); | ||
23761 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
23762 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FSObject"); | ||
23763 | find mustInstanceOfDir_class(problem,interpretation,container); | ||
23764 | find mayInstanceOfDir_class(problem,interpretation,newObject); | ||
23765 | find mayInRelationcontents_reference_Dir(problem,interpretation,container,newObject); | ||
23766 | find mustExist(problem, interpretation, container); | ||
23767 | neg find mustExist(problem, interpretation, newObject); | ||
23768 | } | ||
23769 | pattern createObject_Dir_class_by_otherFSObjects_reference_Model( | ||
23770 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23771 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
23772 | container:DefinedElement) | ||
23773 | { | ||
23774 | find interpretation(problem,interpretation); | ||
23775 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
23776 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class"); | ||
23777 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
23778 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"otherFSObjects reference Model"); | ||
23779 | find mustInstanceOfModel_class(problem,interpretation,container); | ||
23780 | find mayInstanceOfDir_class(problem,interpretation,newObject); | ||
23781 | find mayInRelationotherFSObjects_reference_Model(problem,interpretation,container,newObject); | ||
23782 | find mustExist(problem, interpretation, container); | ||
23783 | neg find mustExist(problem, interpretation, newObject); | ||
23784 | } | ||
23785 | pattern createObject_Dir_class( | ||
23786 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23787 | typeInterpretation:PartialComplexTypeInterpretation) | ||
23788 | { | ||
23789 | find interpretation(problem,interpretation); | ||
23790 | neg find hasElementInContainment(problem,interpretation); | ||
23791 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
23792 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class"); | ||
23793 | find mayInstanceOfDir_class(problem,interpretation,newObject); | ||
23794 | find mayExist(problem, interpretation, newObject); | ||
23795 | neg find mustExist(problem, interpretation, newObject); | ||
23796 | } | ||
23797 | pattern createObject_File_class_by_contents_reference_Dir_with_parent_reference_FSObject( | ||
23798 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23799 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
23800 | container:DefinedElement) | ||
23801 | { | ||
23802 | find interpretation(problem,interpretation); | ||
23803 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
23804 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"File class"); | ||
23805 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
23806 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"contents reference Dir"); | ||
23807 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
23808 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FSObject"); | ||
23809 | find mustInstanceOfDir_class(problem,interpretation,container); | ||
23810 | find mayInstanceOfFile_class(problem,interpretation,newObject); | ||
23811 | find mayInRelationcontents_reference_Dir(problem,interpretation,container,newObject); | ||
23812 | find mustExist(problem, interpretation, container); | ||
23813 | neg find mustExist(problem, interpretation, newObject); | ||
23814 | } | ||
23815 | pattern createObject_File_class_by_otherFSObjects_reference_Model( | ||
23816 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23817 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
23818 | container:DefinedElement) | ||
23819 | { | ||
23820 | find interpretation(problem,interpretation); | ||
23821 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
23822 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"File class"); | ||
23823 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
23824 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"otherFSObjects reference Model"); | ||
23825 | find mustInstanceOfModel_class(problem,interpretation,container); | ||
23826 | find mayInstanceOfFile_class(problem,interpretation,newObject); | ||
23827 | find mayInRelationotherFSObjects_reference_Model(problem,interpretation,container,newObject); | ||
23828 | find mustExist(problem, interpretation, container); | ||
23829 | neg find mustExist(problem, interpretation, newObject); | ||
23830 | } | ||
23831 | pattern createObject_File_class( | ||
23832 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23833 | typeInterpretation:PartialComplexTypeInterpretation) | ||
23834 | { | ||
23835 | find interpretation(problem,interpretation); | ||
23836 | neg find hasElementInContainment(problem,interpretation); | ||
23837 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
23838 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"File class"); | ||
23839 | find mayInstanceOfFile_class(problem,interpretation,newObject); | ||
23840 | find mayExist(problem, interpretation, newObject); | ||
23841 | neg find mustExist(problem, interpretation, newObject); | ||
23842 | } | ||
23843 | pattern createObject_Model_class_UndefinedPart( | ||
23844 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23845 | typeInterpretation:PartialComplexTypeInterpretation) | ||
23846 | { | ||
23847 | find interpretation(problem,interpretation); | ||
23848 | neg find hasElementInContainment(problem,interpretation); | ||
23849 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
23850 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Model class UndefinedPart"); | ||
23851 | find mayInstanceOfModel_class_UndefinedPart(problem,interpretation,newObject); | ||
23852 | find mayExist(problem, interpretation, newObject); | ||
23853 | neg find mustExist(problem, interpretation, newObject); | ||
23854 | } | ||
23855 | pattern createObject_FileSystem_class_by_filesystems_reference_Model( | ||
23856 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23857 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
23858 | container:DefinedElement) | ||
23859 | { | ||
23860 | find interpretation(problem,interpretation); | ||
23861 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
23862 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FileSystem class"); | ||
23863 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
23864 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"filesystems reference Model"); | ||
23865 | find mustInstanceOfModel_class(problem,interpretation,container); | ||
23866 | find mayInstanceOfFileSystem_class(problem,interpretation,newObject); | ||
23867 | find mayInRelationfilesystems_reference_Model(problem,interpretation,container,newObject); | ||
23868 | find mustExist(problem, interpretation, container); | ||
23869 | neg find mustExist(problem, interpretation, newObject); | ||
23870 | } | ||
23871 | pattern createObject_FileSystem_class( | ||
23872 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23873 | typeInterpretation:PartialComplexTypeInterpretation) | ||
23874 | { | ||
23875 | find interpretation(problem,interpretation); | ||
23876 | neg find hasElementInContainment(problem,interpretation); | ||
23877 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
23878 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FileSystem class"); | ||
23879 | find mayInstanceOfFileSystem_class(problem,interpretation,newObject); | ||
23880 | find mayExist(problem, interpretation, newObject); | ||
23881 | neg find mustExist(problem, interpretation, newObject); | ||
23882 | } | ||
23883 | |||
23884 | ////////// | ||
23885 | // 4.2 Type refinement | ||
23886 | ////////// | ||
23887 | pattern refineTypeTo_Dir_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
23888 | find interpretation(problem,interpretation); | ||
23889 | PartialInterpretation.newElements(interpretation,element); | ||
23890 | find mayInstanceOfDir_class(problem,interpretation,element); | ||
23891 | neg find mustInstanceOfDir_class(problem,interpretation,element); | ||
23892 | neg find mustInstanceOfFile_class(problem,interpretation,element); | ||
23893 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
23894 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
23895 | } | ||
23896 | pattern refineTypeTo_File_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
23897 | find interpretation(problem,interpretation); | ||
23898 | PartialInterpretation.newElements(interpretation,element); | ||
23899 | find mayInstanceOfFile_class(problem,interpretation,element); | ||
23900 | neg find mustInstanceOfDir_class(problem,interpretation,element); | ||
23901 | neg find mustInstanceOfFile_class(problem,interpretation,element); | ||
23902 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
23903 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
23904 | } | ||
23905 | pattern refineTypeTo_Model_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
23906 | find interpretation(problem,interpretation); | ||
23907 | PartialInterpretation.newElements(interpretation,element); | ||
23908 | find mayInstanceOfModel_class_UndefinedPart(problem,interpretation,element); | ||
23909 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
23910 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
23911 | neg find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element); | ||
23912 | } | ||
23913 | pattern refineTypeTo_FileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
23914 | find interpretation(problem,interpretation); | ||
23915 | PartialInterpretation.newElements(interpretation,element); | ||
23916 | find mayInstanceOfFileSystem_class(problem,interpretation,element); | ||
23917 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
23918 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
23919 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
23920 | } | ||
23921 | |||
23922 | ////////// | ||
23923 | // 4.3 Relation refinement | ||
23924 | ////////// | ||
23925 | pattern refineRelation_live_reference_FileSystem( | ||
23926 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
23927 | relationIterpretation:PartialRelationInterpretation, | ||
23928 | from: DefinedElement, to: DefinedElement) | ||
23929 | { | ||
23930 | find interpretation(problem,interpretation); | ||
23931 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
23932 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"live reference FileSystem"); | ||
23933 | find mustExist(problem, interpretation, from); | ||
23934 | find mustExist(problem, interpretation, to); | ||
23935 | find mustInstanceOfFileSystem_class(problem,interpretation,from); | ||
23936 | find mustInstanceOfFSObject_class(problem,interpretation,to); | ||
23937 | find mayInRelationlive_reference_FileSystem(problem,interpretation,from,to); | ||
23938 | neg find mustInRelationlive_reference_FileSystem(problem,interpretation,from,to); | ||
23939 | } | ||
23940 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
23941 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" | ||
23942 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
23943 | |||
23944 | ////////// | ||
23945 | // 0. Util | ||
23946 | ////////// | ||
23947 | private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
23948 | PartialInterpretation.problem(interpretation,problem); | ||
23949 | } | ||
23950 | |||
23951 | ///////////////////////// | ||
23952 | // 0.1 Existence | ||
23953 | ///////////////////////// | ||
23954 | private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
23955 | find interpretation(problem,interpretation); | ||
23956 | LogicProblem.elements(problem,element); | ||
23957 | } or { | ||
23958 | find interpretation(problem,interpretation); | ||
23959 | PartialInterpretation.newElements(interpretation,element); | ||
23960 | } | ||
23961 | |||
23962 | private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
23963 | find mustExist(problem,interpretation,element); | ||
23964 | } or { | ||
23965 | find interpretation(problem,interpretation); | ||
23966 | neg find elementCloseWorld(element); | ||
23967 | PartialInterpretation.openWorldElements(interpretation,element); | ||
23968 | } | ||
23969 | |||
23970 | private pattern elementCloseWorld(element:DefinedElement) { | ||
23971 | PartialInterpretation.openWorldElements(i,element); | ||
23972 | PartialInterpretation.maxNewElements(i,0); | ||
23973 | } or { | ||
23974 | Scope.targetTypeInterpretation(scope,interpretation); | ||
23975 | PartialTypeInterpratation.elements(interpretation,element); | ||
23976 | Scope.maxNewElements(scope,0); | ||
23977 | } | ||
23978 | |||
23979 | //////////////////////// | ||
23980 | // 0.2 Equivalence | ||
23981 | //////////////////////// | ||
23982 | pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { | ||
23983 | find mayExist(problem,interpretation,a); | ||
23984 | find mayExist(problem,interpretation,b); | ||
23985 | a == b; | ||
23986 | } | ||
23987 | |||
23988 | //////////////////////// | ||
23989 | // 0.3 Required Patterns by TypeIndexer | ||
23990 | //////////////////////// | ||
23991 | private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { | ||
23992 | find interpretation(problem,interpretation); | ||
23993 | LogicProblem.types(problem,type); | ||
23994 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
23995 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
23996 | } | ||
23997 | |||
23998 | private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
23999 | find interpretation(problem,interpretation); | ||
24000 | LogicProblem.types(problem,type); | ||
24001 | TypeDefinition.elements(type,element); | ||
24002 | } or { | ||
24003 | find interpretation(problem,interpretation); | ||
24004 | find typeInterpretation(problem,interpretation,type,typeInterpretation); | ||
24005 | PartialComplexTypeInterpretation.elements(typeInterpretation,element); | ||
24006 | } | ||
24007 | |||
24008 | private pattern isPrimitive(element: PrimitiveElement) { | ||
24009 | PrimitiveElement(element); | ||
24010 | } | ||
24011 | |||
24012 | ////////// | ||
24013 | // 1. Problem-Specific Base Indexers | ||
24014 | ////////// | ||
24015 | // 1.1 Type Indexers | ||
24016 | ////////// | ||
24017 | // 1.1.1 primitive Type Indexers | ||
24018 | ////////// | ||
24019 | |||
24020 | ////////// | ||
24021 | // 1.1.2 domain-specific Type Indexers | ||
24022 | ////////// | ||
24023 | /** | ||
24024 | * An element must be an instance of type "FileSystem class". | ||
24025 | */ | ||
24026 | private pattern mustInstanceOfFileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
24027 | Type.name(type,"FileSystem class"); | ||
24028 | find directInstanceOf(problem,interpretation,element,type); | ||
24029 | } | ||
24030 | private pattern scopeDisallowsNewFileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
24031 | find interpretation(problem,interpretation); | ||
24032 | PartialInterpretation.scopes(interpretation,scope); | ||
24033 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
24034 | Scope.maxNewElements(scope,0); | ||
24035 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
24036 | Type.name(type,"FileSystem class"); | ||
24037 | } | ||
24038 | |||
24039 | /** | ||
24040 | * An element may be an instance of type "FileSystem class". | ||
24041 | */ | ||
24042 | private pattern mayInstanceOfFileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
24043 | { | ||
24044 | find interpretation(problem,interpretation); | ||
24045 | PartialInterpretation.newElements(interpretation,element); | ||
24046 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
24047 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
24048 | neg find scopeDisallowsNewFileSystem_class(problem, interpretation); | ||
24049 | neg find isPrimitive(element); | ||
24050 | } or { | ||
24051 | find interpretation(problem,interpretation); | ||
24052 | PartialInterpretation.openWorldElements(interpretation,element); | ||
24053 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
24054 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
24055 | neg find scopeDisallowsNewFileSystem_class(problem, interpretation); | ||
24056 | neg find isPrimitive(element); | ||
24057 | } or | ||
24058 | { find mustInstanceOfFileSystem_class(problem,interpretation,element); } | ||
24059 | /** | ||
24060 | * An element must be an instance of type "FSObject class". | ||
24061 | */ | ||
24062 | private pattern mustInstanceOfFSObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
24063 | Type.name(type,"FSObject class"); | ||
24064 | find directInstanceOf(problem,interpretation,element,type); | ||
24065 | } | ||
24066 | private pattern scopeDisallowsNewFSObject_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
24067 | find interpretation(problem,interpretation); | ||
24068 | PartialInterpretation.scopes(interpretation,scope); | ||
24069 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
24070 | Scope.maxNewElements(scope,0); | ||
24071 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
24072 | Type.name(type,"FSObject class"); | ||
24073 | } | ||
24074 | |||
24075 | /** | ||
24076 | * An element may be an instance of type "FSObject class". | ||
24077 | */ | ||
24078 | private pattern mayInstanceOfFSObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
24079 | { | ||
24080 | find interpretation(problem,interpretation); | ||
24081 | PartialInterpretation.newElements(interpretation,element); | ||
24082 | neg find mustInstanceOfDir_class(problem,interpretation,element); | ||
24083 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
24084 | neg find mustInstanceOfFile_class(problem,interpretation,element); | ||
24085 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
24086 | neg find scopeDisallowsNewFSObject_class(problem, interpretation); | ||
24087 | neg find isPrimitive(element); | ||
24088 | } or { | ||
24089 | find interpretation(problem,interpretation); | ||
24090 | PartialInterpretation.openWorldElements(interpretation,element); | ||
24091 | neg find mustInstanceOfDir_class(problem,interpretation,element); | ||
24092 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
24093 | neg find mustInstanceOfFile_class(problem,interpretation,element); | ||
24094 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
24095 | neg find scopeDisallowsNewFSObject_class(problem, interpretation); | ||
24096 | neg find isPrimitive(element); | ||
24097 | } or | ||
24098 | { find mustInstanceOfFSObject_class(problem,interpretation,element); } | ||
24099 | /** | ||
24100 | * An element must be an instance of type "Dir class". | ||
24101 | */ | ||
24102 | private pattern mustInstanceOfDir_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
24103 | Type.name(type,"Dir class"); | ||
24104 | find directInstanceOf(problem,interpretation,element,type); | ||
24105 | } | ||
24106 | private pattern scopeDisallowsNewDir_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
24107 | find interpretation(problem,interpretation); | ||
24108 | PartialInterpretation.scopes(interpretation,scope); | ||
24109 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
24110 | Scope.maxNewElements(scope,0); | ||
24111 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
24112 | Type.name(type,"Dir class"); | ||
24113 | } | ||
24114 | |||
24115 | /** | ||
24116 | * An element may be an instance of type "Dir class". | ||
24117 | */ | ||
24118 | private pattern mayInstanceOfDir_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
24119 | { | ||
24120 | find interpretation(problem,interpretation); | ||
24121 | PartialInterpretation.newElements(interpretation,element); | ||
24122 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
24123 | neg find mustInstanceOfFile_class(problem,interpretation,element); | ||
24124 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
24125 | neg find scopeDisallowsNewDir_class(problem, interpretation); | ||
24126 | neg find isPrimitive(element); | ||
24127 | } or { | ||
24128 | find interpretation(problem,interpretation); | ||
24129 | PartialInterpretation.openWorldElements(interpretation,element); | ||
24130 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
24131 | neg find mustInstanceOfFile_class(problem,interpretation,element); | ||
24132 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
24133 | neg find scopeDisallowsNewDir_class(problem, interpretation); | ||
24134 | neg find isPrimitive(element); | ||
24135 | } or | ||
24136 | { find mustInstanceOfDir_class(problem,interpretation,element); } | ||
24137 | /** | ||
24138 | * An element must be an instance of type "File class". | ||
24139 | */ | ||
24140 | private pattern mustInstanceOfFile_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
24141 | Type.name(type,"File class"); | ||
24142 | find directInstanceOf(problem,interpretation,element,type); | ||
24143 | } | ||
24144 | private pattern scopeDisallowsNewFile_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
24145 | find interpretation(problem,interpretation); | ||
24146 | PartialInterpretation.scopes(interpretation,scope); | ||
24147 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
24148 | Scope.maxNewElements(scope,0); | ||
24149 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
24150 | Type.name(type,"File class"); | ||
24151 | } | ||
24152 | |||
24153 | /** | ||
24154 | * An element may be an instance of type "File class". | ||
24155 | */ | ||
24156 | private pattern mayInstanceOfFile_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
24157 | { | ||
24158 | find interpretation(problem,interpretation); | ||
24159 | PartialInterpretation.newElements(interpretation,element); | ||
24160 | neg find mustInstanceOfDir_class(problem,interpretation,element); | ||
24161 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
24162 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
24163 | neg find scopeDisallowsNewFile_class(problem, interpretation); | ||
24164 | neg find isPrimitive(element); | ||
24165 | } or { | ||
24166 | find interpretation(problem,interpretation); | ||
24167 | PartialInterpretation.openWorldElements(interpretation,element); | ||
24168 | neg find mustInstanceOfDir_class(problem,interpretation,element); | ||
24169 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
24170 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
24171 | neg find scopeDisallowsNewFile_class(problem, interpretation); | ||
24172 | neg find isPrimitive(element); | ||
24173 | } or | ||
24174 | { find mustInstanceOfFile_class(problem,interpretation,element); } | ||
24175 | /** | ||
24176 | * An element must be an instance of type "Model class". | ||
24177 | */ | ||
24178 | private pattern mustInstanceOfModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
24179 | Type.name(type,"Model class"); | ||
24180 | find directInstanceOf(problem,interpretation,element,type); | ||
24181 | } | ||
24182 | private pattern scopeDisallowsNewModel_class(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
24183 | find interpretation(problem,interpretation); | ||
24184 | PartialInterpretation.scopes(interpretation,scope); | ||
24185 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
24186 | Scope.maxNewElements(scope,0); | ||
24187 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
24188 | Type.name(type,"Model class"); | ||
24189 | } | ||
24190 | |||
24191 | /** | ||
24192 | * An element may be an instance of type "Model class". | ||
24193 | */ | ||
24194 | private pattern mayInstanceOfModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
24195 | { | ||
24196 | find interpretation(problem,interpretation); | ||
24197 | PartialInterpretation.newElements(interpretation,element); | ||
24198 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
24199 | neg find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element); | ||
24200 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
24201 | neg find scopeDisallowsNewModel_class(problem, interpretation); | ||
24202 | neg find isPrimitive(element); | ||
24203 | } or { | ||
24204 | find interpretation(problem,interpretation); | ||
24205 | PartialInterpretation.openWorldElements(interpretation,element); | ||
24206 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
24207 | neg find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element); | ||
24208 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
24209 | neg find scopeDisallowsNewModel_class(problem, interpretation); | ||
24210 | neg find isPrimitive(element); | ||
24211 | } or | ||
24212 | { find mustInstanceOfModel_class(problem,interpretation,element); } | ||
24213 | /** | ||
24214 | * An element must be an instance of type "Model class DefinedPart". | ||
24215 | */ | ||
24216 | private pattern mustInstanceOfModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
24217 | Type.name(type,"Model class DefinedPart"); | ||
24218 | find directInstanceOf(problem,interpretation,element,type); | ||
24219 | } | ||
24220 | private pattern scopeDisallowsNewModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
24221 | find interpretation(problem,interpretation); | ||
24222 | PartialInterpretation.scopes(interpretation,scope); | ||
24223 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
24224 | Scope.maxNewElements(scope,0); | ||
24225 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
24226 | Type.name(type,"Model class DefinedPart"); | ||
24227 | } | ||
24228 | |||
24229 | /** | ||
24230 | * An element may be an instance of type "Model class DefinedPart". | ||
24231 | */ | ||
24232 | private pattern mayInstanceOfModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
24233 | { find mustInstanceOfModel_class_DefinedPart(problem,interpretation,element); } | ||
24234 | /** | ||
24235 | * An element must be an instance of type "Model class UndefinedPart". | ||
24236 | */ | ||
24237 | private pattern mustInstanceOfModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
24238 | Type.name(type,"Model class UndefinedPart"); | ||
24239 | find directInstanceOf(problem,interpretation,element,type); | ||
24240 | } | ||
24241 | private pattern scopeDisallowsNewModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
24242 | find interpretation(problem,interpretation); | ||
24243 | PartialInterpretation.scopes(interpretation,scope); | ||
24244 | Scope.targetTypeInterpretation(scope,typeInterpretation); | ||
24245 | Scope.maxNewElements(scope,0); | ||
24246 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | ||
24247 | Type.name(type,"Model class UndefinedPart"); | ||
24248 | } | ||
24249 | |||
24250 | /** | ||
24251 | * An element may be an instance of type "Model class UndefinedPart". | ||
24252 | */ | ||
24253 | private pattern mayInstanceOfModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
24254 | { | ||
24255 | find interpretation(problem,interpretation); | ||
24256 | PartialInterpretation.newElements(interpretation,element); | ||
24257 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
24258 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
24259 | neg find scopeDisallowsNewModel_class_UndefinedPart(problem, interpretation); | ||
24260 | neg find isPrimitive(element); | ||
24261 | } or { | ||
24262 | find interpretation(problem,interpretation); | ||
24263 | PartialInterpretation.openWorldElements(interpretation,element); | ||
24264 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
24265 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
24266 | neg find scopeDisallowsNewModel_class_UndefinedPart(problem, interpretation); | ||
24267 | neg find isPrimitive(element); | ||
24268 | } or | ||
24269 | { find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element); } | ||
24270 | |||
24271 | ////////// | ||
24272 | // 1.2 Relation Declaration Indexers | ||
24273 | ////////// | ||
24274 | /** | ||
24275 | * Matcher for detecting tuples t where []root reference FileSystem(source,target) | ||
24276 | */ | ||
24277 | private pattern mustInRelationroot_reference_FileSystem( | ||
24278 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24279 | source: DefinedElement, target:DefinedElement) | ||
24280 | { | ||
24281 | find interpretation(problem,interpretation); | ||
24282 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
24283 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"root reference FileSystem"); | ||
24284 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
24285 | BinaryElementRelationLink.param1(link,source); | ||
24286 | BinaryElementRelationLink.param2(link,target); | ||
24287 | } | ||
24288 | /** | ||
24289 | * Matcher for detecting tuples t where <>root reference FileSystem(source,target) | ||
24290 | */ | ||
24291 | private pattern mayInRelationroot_reference_FileSystem( | ||
24292 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24293 | source: DefinedElement, target:DefinedElement) | ||
24294 | { | ||
24295 | find interpretation(problem,interpretation); | ||
24296 | // The two endpoint of the link have to exist | ||
24297 | find mayExist(problem, interpretation, source); | ||
24298 | find mayExist(problem, interpretation, target); | ||
24299 | // Type consistency | ||
24300 | find mayInstanceOfFileSystem_class(problem,interpretation,source); | ||
24301 | find mayInstanceOfDir_class(problem,interpretation,target); | ||
24302 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
24303 | // the upper bound of the multiplicity should be considered. | ||
24304 | numberOfExistingReferences == count find mustInRelationroot_reference_FileSystem(problem,interpretation,source,_); | ||
24305 | check(numberOfExistingReferences < 1); | ||
24306 | // The reference is containment, then a new reference cannot be create if: | ||
24307 | // 1. Multiple parents | ||
24308 | neg find mustContains4(problem,interpretation,_,target); | ||
24309 | // 2. Circle in the containment hierarchy | ||
24310 | neg find mustTransitiveContains(source,target); | ||
24311 | } or { | ||
24312 | find mustInRelationroot_reference_FileSystem(problem,interpretation,source,target); | ||
24313 | } | ||
24314 | /** | ||
24315 | * Matcher for detecting tuples t where []live reference FileSystem(source,target) | ||
24316 | */ | ||
24317 | private pattern mustInRelationlive_reference_FileSystem( | ||
24318 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24319 | source: DefinedElement, target:DefinedElement) | ||
24320 | { | ||
24321 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,source,target); | ||
24322 | } | ||
24323 | /** | ||
24324 | * Matcher for detecting tuples t where []live reference FileSystem(source,target) | ||
24325 | */ | ||
24326 | private pattern mayInRelationlive_reference_FileSystem( | ||
24327 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24328 | source: DefinedElement, target:DefinedElement) | ||
24329 | { | ||
24330 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,source,target); | ||
24331 | } | ||
24332 | /** | ||
24333 | * Matcher for detecting tuples t where []parent reference FSObject(source,target) | ||
24334 | */ | ||
24335 | private pattern mustInRelationparent_reference_FSObject( | ||
24336 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24337 | source: DefinedElement, target:DefinedElement) | ||
24338 | { | ||
24339 | find interpretation(problem,interpretation); | ||
24340 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
24341 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FSObject"); | ||
24342 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
24343 | BinaryElementRelationLink.param1(link,source); | ||
24344 | BinaryElementRelationLink.param2(link,target); | ||
24345 | } | ||
24346 | /** | ||
24347 | * Matcher for detecting tuples t where <>parent reference FSObject(source,target) | ||
24348 | */ | ||
24349 | private pattern mayInRelationparent_reference_FSObject( | ||
24350 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24351 | source: DefinedElement, target:DefinedElement) | ||
24352 | { | ||
24353 | find interpretation(problem,interpretation); | ||
24354 | // The two endpoint of the link have to exist | ||
24355 | find mayExist(problem, interpretation, source); | ||
24356 | find mayExist(problem, interpretation, target); | ||
24357 | // Type consistency | ||
24358 | find mayInstanceOfFSObject_class(problem,interpretation,source); | ||
24359 | find mayInstanceOfDir_class(problem,interpretation,target); | ||
24360 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
24361 | // the upper bound of the multiplicity should be considered. | ||
24362 | numberOfExistingReferences == count find mustInRelationparent_reference_FSObject(problem,interpretation,source,_); | ||
24363 | check(numberOfExistingReferences < 1); | ||
24364 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
24365 | // 1. Multiple parents | ||
24366 | neg find mustContains4(problem,interpretation,source,_); | ||
24367 | // 2. Circle in the containment hierarchy | ||
24368 | neg find mustTransitiveContains(source,target); | ||
24369 | } or { | ||
24370 | find mustInRelationparent_reference_FSObject(problem,interpretation,source,target); | ||
24371 | } | ||
24372 | /** | ||
24373 | * Matcher for detecting tuples t where []contents reference Dir(source,target) | ||
24374 | */ | ||
24375 | private pattern mustInRelationcontents_reference_Dir( | ||
24376 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24377 | source: DefinedElement, target:DefinedElement) | ||
24378 | { | ||
24379 | find interpretation(problem,interpretation); | ||
24380 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
24381 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"contents reference Dir"); | ||
24382 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
24383 | BinaryElementRelationLink.param1(link,source); | ||
24384 | BinaryElementRelationLink.param2(link,target); | ||
24385 | } | ||
24386 | /** | ||
24387 | * Matcher for detecting tuples t where <>contents reference Dir(source,target) | ||
24388 | */ | ||
24389 | private pattern mayInRelationcontents_reference_Dir( | ||
24390 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24391 | source: DefinedElement, target:DefinedElement) | ||
24392 | { | ||
24393 | find interpretation(problem,interpretation); | ||
24394 | // The two endpoint of the link have to exist | ||
24395 | find mayExist(problem, interpretation, source); | ||
24396 | find mayExist(problem, interpretation, target); | ||
24397 | // Type consistency | ||
24398 | find mayInstanceOfDir_class(problem,interpretation,source); | ||
24399 | find mayInstanceOfFSObject_class(problem,interpretation,target); | ||
24400 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
24401 | // the upper bound of the opposite reference multiplicity should be considered. | ||
24402 | numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FSObject(problem,interpretation,target,_); | ||
24403 | check(numberOfExistingOppositeReferences < 1); | ||
24404 | // The reference is containment, then a new reference cannot be create if: | ||
24405 | // 1. Multiple parents | ||
24406 | neg find mustContains4(problem,interpretation,_,target); | ||
24407 | // 2. Circle in the containment hierarchy | ||
24408 | neg find mustTransitiveContains(source,target); | ||
24409 | } or { | ||
24410 | find mustInRelationcontents_reference_Dir(problem,interpretation,source,target); | ||
24411 | } | ||
24412 | /** | ||
24413 | * Matcher for detecting tuples t where []filesystems reference Model(source,target) | ||
24414 | */ | ||
24415 | private pattern mustInRelationfilesystems_reference_Model( | ||
24416 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24417 | source: DefinedElement, target:DefinedElement) | ||
24418 | { | ||
24419 | find interpretation(problem,interpretation); | ||
24420 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
24421 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"filesystems reference Model"); | ||
24422 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
24423 | BinaryElementRelationLink.param1(link,source); | ||
24424 | BinaryElementRelationLink.param2(link,target); | ||
24425 | } | ||
24426 | /** | ||
24427 | * Matcher for detecting tuples t where <>filesystems reference Model(source,target) | ||
24428 | */ | ||
24429 | private pattern mayInRelationfilesystems_reference_Model( | ||
24430 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24431 | source: DefinedElement, target:DefinedElement) | ||
24432 | { | ||
24433 | find interpretation(problem,interpretation); | ||
24434 | // The two endpoint of the link have to exist | ||
24435 | find mayExist(problem, interpretation, source); | ||
24436 | find mayExist(problem, interpretation, target); | ||
24437 | // Type consistency | ||
24438 | find mayInstanceOfModel_class(problem,interpretation,source); | ||
24439 | find mayInstanceOfFileSystem_class(problem,interpretation,target); | ||
24440 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
24441 | // the upper bound of the multiplicity should be considered. | ||
24442 | numberOfExistingReferences == count find mustInRelationfilesystems_reference_Model(problem,interpretation,source,_); | ||
24443 | check(numberOfExistingReferences < 1); | ||
24444 | // The reference is containment, then a new reference cannot be create if: | ||
24445 | // 1. Multiple parents | ||
24446 | neg find mustContains4(problem,interpretation,_,target); | ||
24447 | // 2. Circle in the containment hierarchy | ||
24448 | neg find mustTransitiveContains(source,target); | ||
24449 | } or { | ||
24450 | find mustInRelationfilesystems_reference_Model(problem,interpretation,source,target); | ||
24451 | } | ||
24452 | /** | ||
24453 | * Matcher for detecting tuples t where []otherFSObjects reference Model(source,target) | ||
24454 | */ | ||
24455 | private pattern mustInRelationotherFSObjects_reference_Model( | ||
24456 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24457 | source: DefinedElement, target:DefinedElement) | ||
24458 | { | ||
24459 | find interpretation(problem,interpretation); | ||
24460 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
24461 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"otherFSObjects reference Model"); | ||
24462 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
24463 | BinaryElementRelationLink.param1(link,source); | ||
24464 | BinaryElementRelationLink.param2(link,target); | ||
24465 | } | ||
24466 | /** | ||
24467 | * Matcher for detecting tuples t where <>otherFSObjects reference Model(source,target) | ||
24468 | */ | ||
24469 | private pattern mayInRelationotherFSObjects_reference_Model( | ||
24470 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24471 | source: DefinedElement, target:DefinedElement) | ||
24472 | { | ||
24473 | find interpretation(problem,interpretation); | ||
24474 | // The two endpoint of the link have to exist | ||
24475 | find mayExist(problem, interpretation, source); | ||
24476 | find mayExist(problem, interpretation, target); | ||
24477 | // Type consistency | ||
24478 | find mayInstanceOfModel_class(problem,interpretation,source); | ||
24479 | find mayInstanceOfFSObject_class(problem,interpretation,target); | ||
24480 | // The reference is containment, then a new reference cannot be create if: | ||
24481 | // 1. Multiple parents | ||
24482 | neg find mustContains4(problem,interpretation,_,target); | ||
24483 | // 2. Circle in the containment hierarchy | ||
24484 | neg find mustTransitiveContains(source,target); | ||
24485 | } or { | ||
24486 | find mustInRelationotherFSObjects_reference_Model(problem,interpretation,source,target); | ||
24487 | } | ||
24488 | |||
24489 | ////////// | ||
24490 | // 1.3 Relation Definition Indexers | ||
24491 | ////////// | ||
24492 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test filesystem queries patternContent | ||
24493 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent( | ||
24494 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24495 | var_o1, var_o2) | ||
24496 | { | ||
24497 | find interpretation(problem,interpretation); | ||
24498 | find mustInstanceOfFSObject_class(problem,interpretation,var_o1); | ||
24499 | find mustInstanceOfFSObject_class(problem,interpretation,var_o2); | ||
24500 | // o1 is exported | ||
24501 | // o2 is exported | ||
24502 | find mustInstanceOfDir_class(problem,interpretation,var_o1); | ||
24503 | find mustInRelationcontents_reference_Dir(problem,interpretation,var_o1,var_virtual0); | ||
24504 | find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0); | ||
24505 | var_virtual0 == var_o2; | ||
24506 | } | ||
24507 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent( | ||
24508 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24509 | var_o1, var_o2) | ||
24510 | { | ||
24511 | find interpretation(problem,interpretation); | ||
24512 | find mayInstanceOfFSObject_class(problem,interpretation,var_o1); | ||
24513 | find mayInstanceOfFSObject_class(problem,interpretation,var_o2); | ||
24514 | // o1 is exported | ||
24515 | // o2 is exported | ||
24516 | find mayInstanceOfDir_class(problem,interpretation,var_o1); | ||
24517 | find mayInRelationcontents_reference_Dir(problem,interpretation,var_o1,var_virtual0); | ||
24518 | find mayInstanceOfFSObject_class(problem,interpretation,var_virtual0); | ||
24519 | find mayEquivalent(problem, interpretation, var_virtual0, var_o2); | ||
24520 | } | ||
24521 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent( | ||
24522 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24523 | var_o1, var_o2) | ||
24524 | { | ||
24525 | find interpretation(problem,interpretation); | ||
24526 | find mustInstanceOfFSObject_class(problem,interpretation,var_o1); | ||
24527 | find mustInstanceOfFSObject_class(problem,interpretation,var_o2); | ||
24528 | // o1 is exported | ||
24529 | // o2 is exported | ||
24530 | find mustInstanceOfDir_class(problem,interpretation,var_o1); | ||
24531 | find mustInRelationcontents_reference_Dir(problem,interpretation,var_o1,var_virtual0); | ||
24532 | find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0); | ||
24533 | var_virtual0 == var_o2; | ||
24534 | } | ||
24535 | private pattern twoParam_mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(var_o1, var_o2) { | ||
24536 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(_,_,var_o1, var_o2); | ||
24537 | } | ||
24538 | private pattern twoParam_mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(var_o1, var_o2) { | ||
24539 | find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(_,_,var_o1, var_o2); | ||
24540 | } | ||
24541 | private pattern twoParam_currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(var_o1, var_o2) { | ||
24542 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(_,_,var_o1, var_o2); | ||
24543 | } | ||
24544 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test filesystem queries live | ||
24545 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live( | ||
24546 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24547 | var_this, var_l) | ||
24548 | { | ||
24549 | find interpretation(problem,interpretation); | ||
24550 | find mustInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
24551 | find mustInstanceOfFSObject_class(problem,interpretation,var_l); | ||
24552 | // this is exported | ||
24553 | // l is exported | ||
24554 | find mustInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
24555 | find mustInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0); | ||
24556 | find mustInstanceOfDir_class(problem,interpretation,var_virtual0); | ||
24557 | var_virtual0 == var_l; | ||
24558 | }or{ | ||
24559 | find interpretation(problem,interpretation); | ||
24560 | find mustInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
24561 | find mustInstanceOfFSObject_class(problem,interpretation,var_l); | ||
24562 | // this is exported | ||
24563 | // l is exported | ||
24564 | find mustInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
24565 | find mustInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0); | ||
24566 | find mustInstanceOfDir_class(problem,interpretation,var_virtual0); | ||
24567 | var_virtual0 == var_root; | ||
24568 | find twoParam_mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent+(var_root,var_l); | ||
24569 | } | ||
24570 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live( | ||
24571 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24572 | var_this, var_l) | ||
24573 | { | ||
24574 | find interpretation(problem,interpretation); | ||
24575 | find mayInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
24576 | find mayInstanceOfFSObject_class(problem,interpretation,var_l); | ||
24577 | // this is exported | ||
24578 | // l is exported | ||
24579 | find mayInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
24580 | find mayInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0); | ||
24581 | find mayInstanceOfDir_class(problem,interpretation,var_virtual0); | ||
24582 | find mayEquivalent(problem, interpretation, var_virtual0, var_l); | ||
24583 | }or{ | ||
24584 | find interpretation(problem,interpretation); | ||
24585 | find mayInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
24586 | find mayInstanceOfFSObject_class(problem,interpretation,var_l); | ||
24587 | // this is exported | ||
24588 | // l is exported | ||
24589 | find mayInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
24590 | find mayInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0); | ||
24591 | find mayInstanceOfDir_class(problem,interpretation,var_virtual0); | ||
24592 | find mayEquivalent(problem, interpretation, var_virtual0, var_root); | ||
24593 | find twoParam_mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent+(var_root,var_l); | ||
24594 | } | ||
24595 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live( | ||
24596 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24597 | var_this, var_l) | ||
24598 | { | ||
24599 | find interpretation(problem,interpretation); | ||
24600 | find mustInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
24601 | find mustInstanceOfFSObject_class(problem,interpretation,var_l); | ||
24602 | // this is exported | ||
24603 | // l is exported | ||
24604 | find mustInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
24605 | find mustInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0); | ||
24606 | find mustInstanceOfDir_class(problem,interpretation,var_virtual0); | ||
24607 | var_virtual0 == var_l; | ||
24608 | }or{ | ||
24609 | find interpretation(problem,interpretation); | ||
24610 | find mustInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
24611 | find mustInstanceOfFSObject_class(problem,interpretation,var_l); | ||
24612 | // this is exported | ||
24613 | // l is exported | ||
24614 | find mustInstanceOfFileSystem_class(problem,interpretation,var_this); | ||
24615 | find mustInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0); | ||
24616 | find mustInstanceOfDir_class(problem,interpretation,var_virtual0); | ||
24617 | var_virtual0 == var_root; | ||
24618 | find twoParam_currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent+(var_root,var_l); | ||
24619 | } | ||
24620 | // Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test filesystem queries contentInNotLive | ||
24621 | private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive( | ||
24622 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24623 | var_parent, var_child) | ||
24624 | { | ||
24625 | find interpretation(problem,interpretation); | ||
24626 | find mustInstanceOfDir_class(problem,interpretation,var_parent); | ||
24627 | find mustInstanceOfFSObject_class(problem,interpretation,var_child); | ||
24628 | // parent is exported | ||
24629 | // child is exported | ||
24630 | find mustInstanceOfDir_class(problem,interpretation,var_parent); | ||
24631 | find mustInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0); | ||
24632 | find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0); | ||
24633 | var_virtual0 == var_child; | ||
24634 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_parent); | ||
24635 | }or{ | ||
24636 | find interpretation(problem,interpretation); | ||
24637 | find mustInstanceOfDir_class(problem,interpretation,var_parent); | ||
24638 | find mustInstanceOfFSObject_class(problem,interpretation,var_child); | ||
24639 | // parent is exported | ||
24640 | // child is exported | ||
24641 | find mustInstanceOfDir_class(problem,interpretation,var_parent); | ||
24642 | find mustInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0); | ||
24643 | find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0); | ||
24644 | var_virtual0 == var_child; | ||
24645 | neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_child); | ||
24646 | } | ||
24647 | private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive( | ||
24648 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24649 | var_parent, var_child) | ||
24650 | { | ||
24651 | find interpretation(problem,interpretation); | ||
24652 | find mayInstanceOfDir_class(problem,interpretation,var_parent); | ||
24653 | find mayInstanceOfFSObject_class(problem,interpretation,var_child); | ||
24654 | // parent is exported | ||
24655 | // child is exported | ||
24656 | find mayInstanceOfDir_class(problem,interpretation,var_parent); | ||
24657 | find mayInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0); | ||
24658 | find mayInstanceOfFSObject_class(problem,interpretation,var_virtual0); | ||
24659 | find mayEquivalent(problem, interpretation, var_virtual0, var_child); | ||
24660 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_parent); | ||
24661 | }or{ | ||
24662 | find interpretation(problem,interpretation); | ||
24663 | find mayInstanceOfDir_class(problem,interpretation,var_parent); | ||
24664 | find mayInstanceOfFSObject_class(problem,interpretation,var_child); | ||
24665 | // parent is exported | ||
24666 | // child is exported | ||
24667 | find mayInstanceOfDir_class(problem,interpretation,var_parent); | ||
24668 | find mayInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0); | ||
24669 | find mayInstanceOfFSObject_class(problem,interpretation,var_virtual0); | ||
24670 | find mayEquivalent(problem, interpretation, var_virtual0, var_child); | ||
24671 | neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_child); | ||
24672 | } | ||
24673 | private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive( | ||
24674 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24675 | var_parent, var_child) | ||
24676 | { | ||
24677 | find interpretation(problem,interpretation); | ||
24678 | find mustInstanceOfDir_class(problem,interpretation,var_parent); | ||
24679 | find mustInstanceOfFSObject_class(problem,interpretation,var_child); | ||
24680 | // parent is exported | ||
24681 | // child is exported | ||
24682 | find mustInstanceOfDir_class(problem,interpretation,var_parent); | ||
24683 | find mustInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0); | ||
24684 | find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0); | ||
24685 | var_virtual0 == var_child; | ||
24686 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_parent); | ||
24687 | }or{ | ||
24688 | find interpretation(problem,interpretation); | ||
24689 | find mustInstanceOfDir_class(problem,interpretation,var_parent); | ||
24690 | find mustInstanceOfFSObject_class(problem,interpretation,var_child); | ||
24691 | // parent is exported | ||
24692 | // child is exported | ||
24693 | find mustInstanceOfDir_class(problem,interpretation,var_parent); | ||
24694 | find mustInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0); | ||
24695 | find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0); | ||
24696 | var_virtual0 == var_child; | ||
24697 | neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_child); | ||
24698 | } | ||
24699 | |||
24700 | ////////// | ||
24701 | // 1.4 Containment Indexer | ||
24702 | ////////// | ||
24703 | private pattern mustContains2(source: DefinedElement, target: DefinedElement) { | ||
24704 | find mustContains4(_,_,source,target); | ||
24705 | } | ||
24706 | |||
24707 | private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, | ||
24708 | source: DefinedElement, target: DefinedElement) | ||
24709 | { find mustInRelationroot_reference_FileSystem(problem,interpretation,source,target); }or | ||
24710 | |||
24711 | { find mustInRelationcontents_reference_Dir(problem,interpretation,source,target); }or | ||
24712 | |||
24713 | { find mustInRelationfilesystems_reference_Model(problem,interpretation,source,target); }or | ||
24714 | |||
24715 | { find mustInRelationotherFSObjects_reference_Model(problem,interpretation,source,target); } | ||
24716 | |||
24717 | private pattern mustTransitiveContains(source,target) { | ||
24718 | find mustContains2+(source,target); | ||
24719 | } | ||
24720 | |||
24721 | ////////// | ||
24722 | // 2. Invalidation Indexers | ||
24723 | ////////// | ||
24724 | // 2.1 Invalidated by WF Queries | ||
24725 | ////////// | ||
24726 | pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(problem:LogicProblem, interpretation:PartialInterpretation, | ||
24727 | var_parent, var_child) | ||
24728 | { | ||
24729 | find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(problem,interpretation,var_parent,var_child); | ||
24730 | } | ||
24731 | |||
24732 | ////////// | ||
24733 | // 3. Unfinishedness Indexers | ||
24734 | ////////// | ||
24735 | // 3.1 Unfinishedness Measured by Multiplicity | ||
24736 | ////////// | ||
24737 | pattern unfinishedLowerMultiplicity_root_reference_FileSystem(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
24738 | find interpretation(problem,interpretation); | ||
24739 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
24740 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"root reference FileSystem"); | ||
24741 | find mustInstanceOfFileSystem_class(problem,interpretation,object); | ||
24742 | numberOfExistingReferences == count find mustInRelationroot_reference_FileSystem(problem,interpretation,object,_); | ||
24743 | check(numberOfExistingReferences < 1); | ||
24744 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
24745 | } | ||
24746 | pattern unfinishedLowerMultiplicity_filesystems_reference_Model(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
24747 | find interpretation(problem,interpretation); | ||
24748 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
24749 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"filesystems reference Model"); | ||
24750 | find mustInstanceOfModel_class(problem,interpretation,object); | ||
24751 | numberOfExistingReferences == count find mustInRelationfilesystems_reference_Model(problem,interpretation,object,_); | ||
24752 | check(numberOfExistingReferences < 1); | ||
24753 | missingMultiplicity == eval(1-numberOfExistingReferences); | ||
24754 | } | ||
24755 | |||
24756 | ////////// | ||
24757 | // 3.2 Unfinishedness Measured by WF Queries | ||
24758 | ////////// | ||
24759 | pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(problem:LogicProblem, interpretation:PartialInterpretation, | ||
24760 | var_parent, var_child) | ||
24761 | { | ||
24762 | find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(problem,interpretation,var_parent,var_child); | ||
24763 | } | ||
24764 | |||
24765 | ////////// | ||
24766 | // 4. Refinement Indexers | ||
24767 | ////////// | ||
24768 | // 4.1 Object constructors | ||
24769 | ////////// | ||
24770 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) | ||
24771 | { | ||
24772 | find interpretation(problem,interpretation); | ||
24773 | find mustInstanceOfModel_class(problem,interpretation,root); | ||
24774 | find mustExist(problem, interpretation, root); | ||
24775 | }or{ | ||
24776 | find interpretation(problem,interpretation); | ||
24777 | find mustInstanceOfFile_class(problem,interpretation,root); | ||
24778 | find mustExist(problem, interpretation, root); | ||
24779 | }or{ | ||
24780 | find interpretation(problem,interpretation); | ||
24781 | find mustInstanceOfFSObject_class(problem,interpretation,root); | ||
24782 | find mustExist(problem, interpretation, root); | ||
24783 | }or{ | ||
24784 | find interpretation(problem,interpretation); | ||
24785 | find mustInstanceOfFileSystem_class(problem,interpretation,root); | ||
24786 | find mustExist(problem, interpretation, root); | ||
24787 | }or{ | ||
24788 | find interpretation(problem,interpretation); | ||
24789 | find mustInstanceOfDir_class(problem,interpretation,root); | ||
24790 | find mustExist(problem, interpretation, root); | ||
24791 | }or{ | ||
24792 | find interpretation(problem,interpretation); | ||
24793 | find mustInstanceOfModel_class_DefinedPart(problem,interpretation,root); | ||
24794 | find mustExist(problem, interpretation, root); | ||
24795 | }or{ | ||
24796 | find interpretation(problem,interpretation); | ||
24797 | find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,root); | ||
24798 | find mustExist(problem, interpretation, root); | ||
24799 | } | ||
24800 | pattern createObject_Dir_class_by_root_reference_FileSystem( | ||
24801 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24802 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
24803 | container:DefinedElement) | ||
24804 | { | ||
24805 | find interpretation(problem,interpretation); | ||
24806 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
24807 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class"); | ||
24808 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
24809 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"root reference FileSystem"); | ||
24810 | find mustInstanceOfFileSystem_class(problem,interpretation,container); | ||
24811 | find mayInstanceOfDir_class(problem,interpretation,newObject); | ||
24812 | find mayInRelationroot_reference_FileSystem(problem,interpretation,container,newObject); | ||
24813 | find mustExist(problem, interpretation, container); | ||
24814 | neg find mustExist(problem, interpretation, newObject); | ||
24815 | } | ||
24816 | pattern createObject_Dir_class_by_contents_reference_Dir_with_parent_reference_FSObject( | ||
24817 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24818 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
24819 | container:DefinedElement) | ||
24820 | { | ||
24821 | find interpretation(problem,interpretation); | ||
24822 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
24823 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class"); | ||
24824 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
24825 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"contents reference Dir"); | ||
24826 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
24827 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FSObject"); | ||
24828 | find mustInstanceOfDir_class(problem,interpretation,container); | ||
24829 | find mayInstanceOfDir_class(problem,interpretation,newObject); | ||
24830 | find mayInRelationcontents_reference_Dir(problem,interpretation,container,newObject); | ||
24831 | find mustExist(problem, interpretation, container); | ||
24832 | neg find mustExist(problem, interpretation, newObject); | ||
24833 | } | ||
24834 | pattern createObject_Dir_class_by_otherFSObjects_reference_Model( | ||
24835 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24836 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
24837 | container:DefinedElement) | ||
24838 | { | ||
24839 | find interpretation(problem,interpretation); | ||
24840 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
24841 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class"); | ||
24842 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
24843 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"otherFSObjects reference Model"); | ||
24844 | find mustInstanceOfModel_class(problem,interpretation,container); | ||
24845 | find mayInstanceOfDir_class(problem,interpretation,newObject); | ||
24846 | find mayInRelationotherFSObjects_reference_Model(problem,interpretation,container,newObject); | ||
24847 | find mustExist(problem, interpretation, container); | ||
24848 | neg find mustExist(problem, interpretation, newObject); | ||
24849 | } | ||
24850 | pattern createObject_Dir_class( | ||
24851 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24852 | typeInterpretation:PartialComplexTypeInterpretation) | ||
24853 | { | ||
24854 | find interpretation(problem,interpretation); | ||
24855 | neg find hasElementInContainment(problem,interpretation); | ||
24856 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
24857 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class"); | ||
24858 | find mayInstanceOfDir_class(problem,interpretation,newObject); | ||
24859 | find mayExist(problem, interpretation, newObject); | ||
24860 | neg find mustExist(problem, interpretation, newObject); | ||
24861 | } | ||
24862 | pattern createObject_FileSystem_class_by_filesystems_reference_Model( | ||
24863 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24864 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
24865 | container:DefinedElement) | ||
24866 | { | ||
24867 | find interpretation(problem,interpretation); | ||
24868 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
24869 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FileSystem class"); | ||
24870 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
24871 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"filesystems reference Model"); | ||
24872 | find mustInstanceOfModel_class(problem,interpretation,container); | ||
24873 | find mayInstanceOfFileSystem_class(problem,interpretation,newObject); | ||
24874 | find mayInRelationfilesystems_reference_Model(problem,interpretation,container,newObject); | ||
24875 | find mustExist(problem, interpretation, container); | ||
24876 | neg find mustExist(problem, interpretation, newObject); | ||
24877 | } | ||
24878 | pattern createObject_FileSystem_class( | ||
24879 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24880 | typeInterpretation:PartialComplexTypeInterpretation) | ||
24881 | { | ||
24882 | find interpretation(problem,interpretation); | ||
24883 | neg find hasElementInContainment(problem,interpretation); | ||
24884 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
24885 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FileSystem class"); | ||
24886 | find mayInstanceOfFileSystem_class(problem,interpretation,newObject); | ||
24887 | find mayExist(problem, interpretation, newObject); | ||
24888 | neg find mustExist(problem, interpretation, newObject); | ||
24889 | } | ||
24890 | pattern createObject_Model_class_UndefinedPart( | ||
24891 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24892 | typeInterpretation:PartialComplexTypeInterpretation) | ||
24893 | { | ||
24894 | find interpretation(problem,interpretation); | ||
24895 | neg find hasElementInContainment(problem,interpretation); | ||
24896 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
24897 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Model class UndefinedPart"); | ||
24898 | find mayInstanceOfModel_class_UndefinedPart(problem,interpretation,newObject); | ||
24899 | find mayExist(problem, interpretation, newObject); | ||
24900 | neg find mustExist(problem, interpretation, newObject); | ||
24901 | } | ||
24902 | pattern createObject_File_class_by_contents_reference_Dir_with_parent_reference_FSObject( | ||
24903 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24904 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
24905 | container:DefinedElement) | ||
24906 | { | ||
24907 | find interpretation(problem,interpretation); | ||
24908 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
24909 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"File class"); | ||
24910 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
24911 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"contents reference Dir"); | ||
24912 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
24913 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FSObject"); | ||
24914 | find mustInstanceOfDir_class(problem,interpretation,container); | ||
24915 | find mayInstanceOfFile_class(problem,interpretation,newObject); | ||
24916 | find mayInRelationcontents_reference_Dir(problem,interpretation,container,newObject); | ||
24917 | find mustExist(problem, interpretation, container); | ||
24918 | neg find mustExist(problem, interpretation, newObject); | ||
24919 | } | ||
24920 | pattern createObject_File_class_by_otherFSObjects_reference_Model( | ||
24921 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24922 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, | ||
24923 | container:DefinedElement) | ||
24924 | { | ||
24925 | find interpretation(problem,interpretation); | ||
24926 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
24927 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"File class"); | ||
24928 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
24929 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"otherFSObjects reference Model"); | ||
24930 | find mustInstanceOfModel_class(problem,interpretation,container); | ||
24931 | find mayInstanceOfFile_class(problem,interpretation,newObject); | ||
24932 | find mayInRelationotherFSObjects_reference_Model(problem,interpretation,container,newObject); | ||
24933 | find mustExist(problem, interpretation, container); | ||
24934 | neg find mustExist(problem, interpretation, newObject); | ||
24935 | } | ||
24936 | pattern createObject_File_class( | ||
24937 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24938 | typeInterpretation:PartialComplexTypeInterpretation) | ||
24939 | { | ||
24940 | find interpretation(problem,interpretation); | ||
24941 | neg find hasElementInContainment(problem,interpretation); | ||
24942 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
24943 | PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"File class"); | ||
24944 | find mayInstanceOfFile_class(problem,interpretation,newObject); | ||
24945 | find mayExist(problem, interpretation, newObject); | ||
24946 | neg find mustExist(problem, interpretation, newObject); | ||
24947 | } | ||
24948 | |||
24949 | ////////// | ||
24950 | // 4.2 Type refinement | ||
24951 | ////////// | ||
24952 | pattern refineTypeTo_Dir_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
24953 | find interpretation(problem,interpretation); | ||
24954 | PartialInterpretation.newElements(interpretation,element); | ||
24955 | find mayInstanceOfDir_class(problem,interpretation,element); | ||
24956 | neg find mustInstanceOfDir_class(problem,interpretation,element); | ||
24957 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
24958 | neg find mustInstanceOfFile_class(problem,interpretation,element); | ||
24959 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
24960 | } | ||
24961 | pattern refineTypeTo_FileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
24962 | find interpretation(problem,interpretation); | ||
24963 | PartialInterpretation.newElements(interpretation,element); | ||
24964 | find mayInstanceOfFileSystem_class(problem,interpretation,element); | ||
24965 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
24966 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
24967 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
24968 | } | ||
24969 | pattern refineTypeTo_Model_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
24970 | find interpretation(problem,interpretation); | ||
24971 | PartialInterpretation.newElements(interpretation,element); | ||
24972 | find mayInstanceOfModel_class_UndefinedPart(problem,interpretation,element); | ||
24973 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
24974 | neg find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element); | ||
24975 | neg find mustInstanceOfFSObject_class(problem,interpretation,element); | ||
24976 | } | ||
24977 | pattern refineTypeTo_File_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
24978 | find interpretation(problem,interpretation); | ||
24979 | PartialInterpretation.newElements(interpretation,element); | ||
24980 | find mayInstanceOfFile_class(problem,interpretation,element); | ||
24981 | neg find mustInstanceOfDir_class(problem,interpretation,element); | ||
24982 | neg find mustInstanceOfFileSystem_class(problem,interpretation,element); | ||
24983 | neg find mustInstanceOfFile_class(problem,interpretation,element); | ||
24984 | neg find mustInstanceOfModel_class(problem,interpretation,element); | ||
24985 | } | ||
24986 | |||
24987 | ////////// | ||
24988 | // 4.3 Relation refinement | ||
24989 | ////////// | ||
24990 | pattern refineRelation_live_reference_FileSystem( | ||
24991 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
24992 | relationIterpretation:PartialRelationInterpretation, | ||
24993 | from: DefinedElement, to: DefinedElement) | ||
24994 | { | ||
24995 | find interpretation(problem,interpretation); | ||
24996 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
24997 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"live reference FileSystem"); | ||
24998 | find mustExist(problem, interpretation, from); | ||
24999 | find mustExist(problem, interpretation, to); | ||
25000 | find mustInstanceOfFileSystem_class(problem,interpretation,from); | ||
25001 | find mustInstanceOfFSObject_class(problem,interpretation,to); | ||
25002 | find mayInRelationlive_reference_FileSystem(problem,interpretation,from,to); | ||
25003 | neg find mustInRelationlive_reference_FileSystem(problem,interpretation,from,to); | ||
25004 | } | ||