Commit Graph

2069 Commits

Author SHA1 Message Date
Grigorii Kirgizov 0e4e6fe8df Redefine typeVariableDeclaration macro. Use TypeVariableSubstitution more consistently (MPSCR-16). Fix SubclassPaths.
'typeVariableDeclaration' now returns substituted vars or creates new subst.
Earlier it created created a new susbst which led to infinite recursion in specific cases.
Now macro expects tvdecl to be declared in TypeVariableSubstitution.
Accordingly modify usages of TypeVariableSubstitution.

Also fix (apparently broken?) SubclassPaths rulesList (used in lub relation)
and switch 'dpromote' implementation to use it
2019-12-18 21:47:06 +03:00
Grigorii Kirgizov 0bc053fe63 Fix classifierType macro condition, fix typeVariable macro & add tmp forwarding macros (MPSCR-16)
Macros currently don't handle subconcepts expansions.
2019-12-18 21:47:06 +03:00
Grigorii Kirgizov 2a71743895 Handle cases when inference variables must be instantiated into typeVariableType (MPSCR-16) 2019-12-18 21:47:05 +03:00
Grigorii Kirgizov c8d1b9415b Clean rules in hasBound rulesList (MPSCR-16)
Most of the rules were duplicating rules from convertsTo
2019-12-18 21:47:05 +03:00
Grigorii Kirgizov 9fbda2b26d Change subset of calls to ClassifierType macro to expansion of Classifier macro (MPSCR-16) 2019-12-18 21:47:05 +03:00
Grigorii Kirgizov 0b3354cf24 Move 'cls==null' case to Classifier macro from ClassifierType macro (MPSCR-16) 2019-12-18 21:47:05 +03:00
Grigorii Kirgizov 9a31800dfa Refactor classifierType macro in ReferenceTypes macro table (MPSCR-16) 2019-12-18 21:47:05 +03:00
Grigorii Kirgizov 13de18ae90 Change calls to typeVariable macro to macro expansions (of TypeVariableDeclaration) (MPSCR-16) 2019-12-18 21:47:05 +03:00
Grigorii Kirgizov 749ac192aa Begin work on MPSCR-16: rewrite macros for TypeVariableDeclaration & TypeVariableReference
Remove duplicated processing of auxiliary bounds in type var declarations.
TypeVariableDeclaration macro now plays a role of instantiating type variables.
hasBound constraint is produced more consistently, on any expansion of TypeVariableDeclaration.
It will work mainly through reactivation due to changes to its arguments.
2019-12-18 21:47:05 +03:00
Grigorii Kirgizov fa129f5937 Add test case for capture & containment. One case fails. 2019-12-18 21:47:05 +03:00
Fedor Isakov dfecccfb86 Fixup ArgumentsCollector: include forgotten model changes, fix the build. 2019-12-11 12:00:51 +01:00
Fedor Isakov 603dab6797 Refactor RuleBuilder: extract RuleImpl as standalone class. 2019-12-11 11:42:31 +01:00
Fedor Isakov f83ac4b692 Clearer contract for building rule's uniqueTag. Drop ArgumentsCollector.
ArgumentsCollector used in tests only, move it there.
2019-12-10 17:21:33 +01:00
Fedor Isakov e926b86bcd Minor refactoring in program producing code.
Reorganize and cleanup code.
2019-12-10 11:58:26 +01:00
Fedor Isakov 0af0d0152d Ensure typechecking cache is cleared on closing session. Closes MPSCR-23 2019-12-09 14:15:16 +01:00
Fedor Isakov 7c781a7f87 Add javadocExt language to the build script.
Rename javadocExt language's location.
2019-12-08 21:36:51 +01:00
Fedor Isakov eb50ce7f86 Typechecking BL: optimize matching list with arguments.
Checking for triggering condition in guard is ineffective.
Pattern matching is faster.
2019-12-08 17:51:41 +01:00
Fedor Isakov 271df160bb Optimize rete rule matcher for dropping occurrences.
Introduce a reactive scheme: alpha node has "dependent" nodes which
it can invalidate transitively. Drop block initiates invalidation,
intro block actually drops the nodes.
2019-12-08 17:48:01 +01:00
Fedor Isakov 2199905ea2 Enhance profiler to report actual time spent at probe locations.
Instead of just reporting the times each probe has been called,
collect and calculate the actual time taken by each probe location from
the whole backtrace pool.
2019-12-08 16:28:31 +01:00
Fedor Isakov 4eb93f20f9 Re-organize places in reactor to gather profiling information. 2019-12-08 15:44:36 +01:00
Fedor Isakov 5d63ec31e1 Remember probes for activated occurrences, optimize drop time.
Avoid searching for matching rules again when discarding occurrence.
2019-12-08 15:37:56 +01:00
Fedor Isakov 1f621bfda8 Refactor query-running code in typechecking provider. Show time spent in query.
Only show messages for queries that took more than 10 ms. to complete.
2019-12-02 11:33:49 +01:00
Fedor Isakov b182cf60d7 Revert "Temporarily ignore failing tests."
This reverts commit 7776f97fe7.
2019-11-26 23:09:40 +01:00
Fedor Isakov 818d1a4dbc Fix linked list implementation. Fixes MPSCR-18
New implementation enables the previously failing tests to pass.
2019-11-26 23:07:42 +01:00
Fedor Isakov 65daa76c6b Remove droppedTrail. Optimize operation with consumed signatures. Restore test.
It appears the feature that tracks the occurrences that have been
dropped
requires too much memory.
2019-11-26 11:26:42 +01:00
Fedor Isakov 85674ef077 Add explicit "test" facets to test solutions. 2019-11-24 17:58:15 +01:00
Fedor Isakov 7776f97fe7 Temporarily ignore failing tests.
The tests presumably fail because of a broken contract that is used
in the typesystem implementation, namey that a logical variable
contained by an constraint argument-term (as opposed to being an
argument itself) reactivates the constraint on ground/parent change
event. This assumption is false, thereby the implementation needs
to be adjusted keep compatibility with the contract.
2019-11-24 13:34:59 +01:00
Fedor Isakov 9fab2e9d34 Refactor and redesign ReteRuleMatcher for better memory footprint.
Drop layer prototype, make layer mutable.
Keep nodes in a layer in a linked list with fail-safe iterator.
Introduce update queue for update blocks.
Update blocks run incrementally unless reset.
Maintain trail of introduced and dropped occurrences.
Generation iterates over nodes in the last (final) layer incrementally,
unless reset.
Introduce new test.
2019-11-24 13:34:59 +01:00
Fedor Isakov 96fbab18b4 Fix dependencies of blExt and javadocExt langs.
The dependency on j.m.l.typechecking lang must be kept on the module level.
2019-11-24 13:34:59 +01:00
Fedor Isakov 65f7b493be Revert "Add ReactivateBlock in Rete Matcher to correctly handle reactivation. Fixes MPSCR-17"
This reverts commit f96155496f.
I need to revert this commit to avoid merging problems. Going to reapply
it later if necessary.
2019-11-24 13:34:07 +01:00
Grigorii Kirgizov f96155496f Add ReactivateBlock in Rete Matcher to correctly handle reactivation. Fixes MPSCR-17 2019-11-19 15:43:15 +03:00
Grigorii Kirgizov 32a1ef77c9 Add test (fails now) for a new bug MPSCR-17 in Rete Matcher concerned with reactivation 2019-11-19 15:43:15 +03:00
Grigorii Kirgizov e7b374ce50 Fix calls to trace.reactivate (there were extra calls in some exec paths) 2019-11-19 15:43:15 +03:00
Fedor Isakov 8fdd80c54e Restore accidentally remove language import. Fix the tests. 2019-11-11 16:58:00 +01:00
Fedor Isakov dbc5154491 Reload and re-generate build scripts. 2019-11-11 15:28:23 +01:00
Fedor Isakov bfbf4840fa Fix language imports. 2019-11-11 14:49:07 +01:00
Fedor Isakov 5bce04eb71 Fix language imports. 2019-11-11 14:49:01 +01:00
Fedor Isakov 69bc34e8f9 Drop language j.m.l.smodel.types containing SNodeTypeOp that is no longer used. 2019-11-11 14:37:41 +01:00
Fedor Isakov de84b88b2c Replace instances of SNodeTypeOp with regular method invocation. 2019-11-11 14:27:57 +01:00
Fedor Isakov ecd2594fed Drop deprecated Reporting interface and all its usages.
Remove runtime solution that contained only Reporting.
2019-11-11 13:53:41 +01:00
Fedor Isakov f92148094a Drop long deprecated concepts with zero instances. 2019-11-11 13:53:41 +01:00
Fedor Isakov 96f45c6e37 Drop commented out code. 2019-11-11 12:20:12 +01:00
Fedor Isakov fb8e995c88 Fix NPE in event processing, closes MPSCR-12. 2019-11-11 11:11:55 +01:00
Fedor Isakov 036f8393b5 Avoid null-ifying Config fields on dispose. Fix stupid bug in TypecheckingOptions. Fixes MPSCR-8. 2019-11-11 10:58:49 +01:00
Grigorii Kirgizov 53ddcb8492 Small cleanup of TraceTool for incremental processing 2019-11-07 17:15:56 +03:00
Grigorii Kirgizov 716e285c0c Small cleanup of EvaluationTrace usage 2019-11-07 17:14:40 +03:00
Grigorii Kirgizov f80371e148 MPSCR-14: Correctly trace incrementally reactivated occurrences. Fixes the bug. 2019-11-07 15:43:02 +03:00
Grigorii Kirgizov ea309d05e7 MPSCR-14: Remove unnecessary & failing call to tracer.restored() for incrementally preserved occurrences 2019-11-07 15:43:02 +03:00
Fedor Isakov 1e068abe13 Repackage typechecking tests to separate module.
All test data (code) to be contained in j.m.blExt.test module.
The samples are to be kept separately with generation on to demonstrate fewer false negatives
of the new typechecker.
2019-11-06 21:14:12 +01:00
Grigorii Kirgizov 45df4d845f Minor cleanup: remove DependentRulesSpec and its usages in RulesDiff
for historical documentation purposes, why it was needed:
It was used for specifying and handling rules which must be simply removed
without all related incremental invalidation machinery.
Long time ago some of these dependencies weren't captured
and such "simply dependent" rules must have been handled separately.
Currently it's handled by general invalidation case.
2019-11-06 19:10:29 +03:00