Grigorii Kirgizov
76c6ee052a
Switch error reporting on arg types from 'origin' to 'convertsToSafe' in method call rules.
...
'origin' works only when wrapping whole ConstraintRule-s, not individual constraint activation statements.
2019-12-18 21:47:06 +03:00
Grigorii Kirgizov
b0c0f1b118
Remove unneded constraint toTypeVariableType
2019-12-18 21:47:06 +03:00
Grigorii Kirgizov
e13ca7ad33
Make TypeVarSubs usage precondition weaker: don't require substs for declared vars to be set. Drop vacuous type var resolution.
2019-12-18 21:47:06 +03:00
Grigorii Kirgizov
2e0feb670e
Fix baseMethodCall rule accroding to instanceMethodCallOperation rule
2019-12-18 21:47:06 +03:00
Grigorii Kirgizov
62d76dea9f
Check type arguments on instanceMethodCall. Rename captureWildcard to captureBound
2019-12-18 21:47:06 +03:00
Grigorii Kirgizov
dc6ffbdbad
Fix forwarding to GenericDeclaration macro by using 'call' instead of expand. Check mismatched num of args in ClassifierType.
2019-12-18 21:47:06 +03:00
Grigorii Kirgizov
a887328d4a
Process case of convertsTo(X,T) when isFree(X) in priority to correctly bind inference vars.
...
Fixes case described in MPSCR-13, but not all tests now pass.
2019-12-18 21:47:06 +03:00
Grigorii Kirgizov
af14f31090
Handle capture for bounds of type var types. Add additional example for that case in Samples_bad2 (MPSCR-13)
2019-12-18 21:47:06 +03:00
Grigorii Kirgizov
6305578b25
Simplify captureWildcard by using tv bounds from type scheme instead of hasBound. Fix inferring bounds for captures.
...
Concerned with MPSCR-13 and MPSCR-16.
Previous decision that bounds on lowerBoundType must be "refined" (see 'capture' rulesList) proved to be wrong.
The source of typesystem errors is that capture isn't performed properly on arguments which has type variable type.
2019-12-18 21:47:06 +03:00
Grigorii Kirgizov
894c727e70
Fix minor bug concerned with CopyUtil
...
CopyUtil didn't correctly map logicals nested inside DataForms which are bound to Logicals.
That's because CopyUtil relies on DataForm:variablesCount() and
LogicalDataForm:variablesCount didn't consider the case when bound value is itself DataForm.
2019-12-18 21:47:06 +03:00
Grigorii Kirgizov
52f708908b
Fix captureWildcard to correctly work with hasBound and type vars. Produce hasBound where needed. (MPSCR-16)
2019-12-18 21:47:06 +03:00
Grigorii Kirgizov
f33d94dead
Add default classifierType macro expansion for ThisExpression. Fix calls to this macro. (MPSCR-16)
2019-12-18 21:47:06 +03:00
Grigorii Kirgizov
99d386c3ef
Switch Capture from using TVSubs to type scheme instantiation. Fix checking clsType. (MPSCR-16)
2019-12-18 21:47:06 +03:00
Grigorii Kirgizov
0604a69789
Remove older versions of rules and macros for generics. Introduce additional Typecheck stage of "checkGenerics". (MPSCR-16)
2019-12-18 21:47:06 +03:00
Grigorii Kirgizov
31dd2a3644
Handle raw & unparameterized classifiers in new macros (MPSCR-16)
2019-12-18 21:47:06 +03:00
Grigorii Kirgizov
6f5746a31d
Extract checks from macros to separate rules. Add notion of typeScheme (genDecl dataform). Remove type inference logic from capture. (MPSCR-16)
2019-12-18 21:47:06 +03:00
Grigorii Kirgizov
78358bfc1c
Partly rework 'capture' given new hasBound semantics. Produce hasBound in typeVariable macro for Object bound too. (MPSCR-16)
2019-12-18 21:47:06 +03:00
Grigorii Kirgizov
8a2aa76252
Allow default type var decl expansion to typeVariableType() in classifierType macro (MPSCR-16)
...
e.g. needed for ThisExpression
2019-12-18 21:47:06 +03:00
Grigorii Kirgizov
c3aba49059
Fix PathHelper to pass a test for SubtypePaths which uses raw types in subclass paths
2019-12-18 21:47:06 +03:00
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