Fedor Isakov
51606b56c7
Rebuild project.
2020-10-23 12:26:31 +02:00
Grigorii Kirgizov
8bd1ba6590
Fix require statements given restriction of their semantics
...
Also explicitly require classifiers in Hierarchy rule table
2020-10-23 12:26:30 +02:00
Grigorii Kirgizov
9476f4bba5
Revert introduction of 'runtimeType" superterm (fixes MPSCR-74)
2020-10-23 12:26:30 +02:00
Grigorii Kirgizov
544e630ecb
minor fixes in bl typesystem rules
...
Remove spurious input oriigin in dpromote_induction rule.
Remove unneeded CheckAll extends TypeBound.
Drop several unused rules.
2020-10-23 12:26:30 +02:00
Grigorii Kirgizov
d9a35005e2
Fix cycle in coersion of functional type to unknown classifier (fixes MPSCR-72)
...
Use statically built FunctionTypes table in closures for
finding canonical functional type for a given closure.
2020-09-24 11:43:17 +03:00
Fedor Isakov
9886f0ec25
Re-saved models -- update resolve info.
2020-09-10 09:59:42 +02:00
Fedor Isakov
6da0ebee3f
Update coderules/logic type templates (unfinished).
2020-08-20 15:02:54 +02:00
Fedor Isakov
caa13a3533
Minor update: smodel type templates (unfinished).
2020-08-20 15:02:54 +02:00
Fedor Isakov
e4a23ee50f
Keep "types" model from deletion with a placeholder.
2020-08-20 15:02:54 +02:00
Fedor Isakov
89843bfac4
Fix build script for mpscore sample.
2020-08-17 20:30:01 +02:00
Fedor Isakov
c9e4ddccbf
Initial support for baseLanguageInternal types.
2020-08-17 17:19:34 +02:00
Fedor Isakov
8df7783b5b
Typechecking BL: introduce templates for GenericLValueExpression.
2020-08-17 17:19:34 +02:00
Fedor Isakov
54439e255e
Refactor typechecking state/cache subsystem.
...
Refactor whe way TypecheckingResultsCache is updated:
all mutatiting methods extracted to Update subclass, which is
only available to the updater.
Make TypecheckingState a regular container for (unit) caches.
Make TypecheckingService responsible for managing caches.
Extract TypeModuleOwner and TypeModelHandler classes.
Get rid of QueryResultsCache, merge into TypecheckingResultsCache.
TypeModuleOwner to manage "repository" cache.
2020-08-14 16:57:36 +02:00
Fedor Isakov
905e11ac33
Refactor TypecheckingService API: simplify usage, extract Request.
...
Request is to keep all the parameters of a given API call,
whereas TypecheckingService is to handle the state between
calls.
2020-08-14 16:17:23 +02:00
Fedor Isakov
02182f4f2f
Closures lang types: add template for ClosureArgReference concept.
2020-08-12 12:38:51 +02:00
Fedor Isakov
3bac60215e
Rebuild samples.
2020-08-06 17:53:20 +02:00
Grigorii Kirgizov
f138e725f2
minor: provide ConvertsContexts constructors for common scenarios (eg assignment, invocation contexts) (MPSCR-63)
2020-08-04 12:38:24 +03:00
Grigorii Kirgizov
ef2b299124
Refactor unchecked conversion for raw types (MPSCR-63)
...
Now whether unchecked conversion is allowed is controlled
by ConvertsContext.Options of convertsTo relation.
Introduce 'erased()' term to be used in raw type params.
Drop 'uncheckedConversion' parameter in all macros.
Classifier kind:"raw" is now used only for Recover.
Allow unchecked conversions by default. Forbid for sequences.
2020-08-04 12:06:07 +03:00
Grigorii Kirgizov
8c1234519f
minor: substitute several usages of unification-as-inference for optional maybeUni (MPSCR-63)
2020-07-31 17:50:41 +03:00
Grigorii Kirgizov
5257e4e627
minor: rename customizable 'convertsToAlt' to 'convertsTo' (MPSCR-63)
...
convertsTo is now defaultConvertsTo
2020-07-31 12:36:47 +03:00
Grigorii Kirgizov
59da240fd6
Enable back some of the relaxed typechecking tests after fix for MPSCR-63
2020-07-31 11:36:02 +03:00
Grigorii Kirgizov
14130be21f
Relax another test in bl typechecking (Ignore error types)
...
It's unclear for now how exactly this case should be handled
2020-07-31 11:36:02 +03:00
Grigorii Kirgizov
856210a5ba
Migrate langs extending 'convertsTo' handling from blExt types (MPSCR-63)
2020-07-31 11:36:02 +03:00
Grigorii Kirgizov
6fdc42ac78
Add script for migraiting convertsTo relation to use ConvertsContext (MPSCR-63)
2020-07-31 11:36:02 +03:00
Grigorii Kirgizov
42240e4ba7
Relax one test for bl typechecking (ignore error types)
...
Can't properly handle this case now.
To handle this case of no type of initializer in assignment context
need to discern cause of this "no type". If it's because of error --
then can't assign to it any type. If there were no error
(e.g. case of test) -- then type can be inferred from assignment ctx.
Anyway it's not very important corner case, can leave this test relaxed.
2020-07-31 11:36:02 +03:00
Grigorii Kirgizov
e94ea9955c
Refactor primitive conversion with narrowing option and fix var decl checking (MPSCR-63)
...
According to JLS, narrowing is allowed in assignment context,
but forbidden e.g. in invocation context.
2020-07-31 11:36:02 +03:00
Grigorii Kirgizov
e2eb0f4647
Add context options to conversion relation (MPSCR-63)
2020-07-31 11:36:01 +03:00
Fedor Isakov
db78950cf3
Rebuild sample.
2020-07-30 17:39:21 +02:00
Fedor Isakov
fe1df249d5
Reinstate "specific" rules in ExpectType, avoid slowdown.
...
Matching on two constraints without an "anchor" (origin)
is essentialy quadratic. On a large root there may be
many typeof/expectType instances and it slows down the
computation considerably.
2020-07-30 17:14:40 +02:00
Fedor Isakov
3377001494
Avoid recursing into method body when processing signature.
2020-07-30 17:14:40 +02:00
Fedor Isakov
102d13df0a
Typechecking templates: use memo to cache expensive computations.
2020-07-30 17:14:40 +02:00
Fedor Isakov
4f74f192b4
Refactor typechecking state/results API for readability.
...
A bunch of renames:
TypesIndex -> TypecheckingResultsCache,
TypecheckingCache -> TypecheckingState.
Simplify methods that update caches.
2020-07-30 17:14:36 +02:00
Fedor Isakov
301c0993d7
Execute outstanding migrations.
2020-07-30 17:14:32 +02:00
Grigorii Kirgizov
0fd3311c04
minor: upd test model dependencies (import j.m.lang.text)
2020-07-22 15:51:56 +03:00
Fedor Isakov
3c2b3a2ee2
Fix incremental tests by checking for error type.
2020-07-22 15:27:46 +03:00
Fedor Isakov
4fc8e0cc34
Fix tests by disabling checks that fail because of missing features.
...
Error type is produced where there was no type before.
2020-07-22 15:27:45 +03:00
Fedor Isakov
a3a5fca318
Disable "specific" rules in favour of "generic" ones in ExpectType.
...
The generic rules make the code more compact and readable.
2020-07-22 15:27:45 +03:00
Grigorii Kirgizov
5bea95f1ab
Change `convertsToSafe` signature so it isn't considered principal (required for MPSCR-64)
...
Just wrap used 'node'-typed argument in a term constructor.
It's not principal according to incrementality contract described in MPSCR-66
2020-07-22 13:09:52 +03:00
Fedor Isakov
24a471a2c9
Re-save models.
2020-07-21 17:03:41 +02:00
Fedor Isakov
0088532d87
Temporary fix for "raw" types: set allowUncheckedConversion=true in coerceTo query.
...
In with the above flag set to false a conversion of list<T> to list (raw type)
fails, because the latter is represented as list<Object>. (T is any type).
This situation usually arises from queries like coerce(T to concept=ListType).
2020-07-21 17:02:17 +02:00
Fedor Isakov
90e90540dc
Initial support for j.m.lang.typesystem lang's types.
2020-07-21 17:02:17 +02:00
Fedor Isakov
028ddfe93c
Fix typechecking tests.
2020-07-16 10:33:44 +02:00
Fedor Isakov
2119fbc591
Introduce explicit dependency on SRepository, stop trying to recover it from node.
...
TypecheckingService and provider component are explicitly dependent
on SRepository.
The repository instance comes from the first opened project, which
is a dirty hack and is temporary until Typechecking Facade API
is fixed to provide appropriate instance.
2020-07-16 10:33:44 +02:00
Fedor Isakov
d5a259bbde
Re-apply all re-runnable migrations (one fix).
2020-07-11 15:59:51 +02:00
Fedor Isakov
936190bca9
Apply migrations.
2020-07-11 15:13:08 +02:00
Fedor Isakov
2bfcdba6d9
Fix tests for "raw" sequence type and raw Iterator.
...
TBD. This is a temporary fix, still unclear what "raw" sequence is.
2020-07-09 13:41:26 +02:00
Fedor Isakov
42ae077945
Use free var for type parameter when allowUncheckedConversion=true.
...
Drop the obsolete "null" type hack in case allowUncheckedConversion=true.
Ensure the flag doesn't work recursively.
2020-07-09 13:41:26 +02:00
Fedor Isakov
a8907bedf2
Add types for blTypes lang. For the sake of PrimitiveType. Fix mpscore project.
2020-07-09 11:50:16 +02:00
Fedor Isakov
ca973ddc51
Fix test compilation.
2020-07-07 13:50:43 +02:00
Fedor Isakov
8731ca0fce
Fix typechecking baseMethodCall: correctly idenify this type.
2020-07-03 16:23:00 +02:00