Commit Graph

918 Commits

Author SHA1 Message Date
Fedor Isakov 4db818637f Rebuild project 2023-02-22 13:51:02 +01:00
Fedor Isakov 4c847f4d3b Temporarily disable a test that produces too much noise 2022-11-23 14:03:19 +01:00
Fedor Isakov 13da45a973 Fix subtle issues with type inference, introduce more
As type variables are made to be resolved later, some errors may "escape"
their respective scope, such as classifier type definition. This needs to be
addressed separately.
2022-11-23 14:03:19 +01:00
Fedor Isakov 34452407f4 Ignore runtime error type in a test 2022-11-23 14:03:19 +01:00
Fedor Isakov 5d5cea10e6 Update error in test data model to reflect actually reported error 2022-11-23 14:03:19 +01:00
Fedor Isakov 25b82ebfb1 Redo fix of closure param type inference, drop typeScheme/2
The solution for inferring the type of a closure parameter using
auxiliary typeScheme/2 constraint and processing all "inference sites"
doesn't work for some situations, such as closure returning a closure with
untyped (var) parameter.

The new solution uses regular typeOf/2 constraint and calculates the
closure type assuming a variable as the return type. This must not be inferred from the context.

Avoid assigning a type to the closure the 2nd time, which
causes a cascade of typeOf/2 activations.
2022-11-23 14:03:19 +01:00
Fedor Isakov e5c56fbb40 Ensure nothing() is contained in any type 2022-11-23 14:03:18 +01:00
Fedor Isakov d2a68e8fc7 Apply migrations to mpscore sub-project 2022-11-23 14:03:18 +01:00
Fedor Isakov ad3ea9d63d Apply all migrations from 2022.2 2022-11-21 11:25:13 +01:00
Fedor Isakov d9cda646de Bump up plugin versions 2022-11-21 11:25:03 +01:00
Fedor Isakov 071efca420 Update build script 2022-11-21 10:50:00 +01:00
Fedor Isakov 847aa0d925 Update tests to ignore certain errors, avoid failure on correct code 2022-11-21 10:50:00 +01:00
Fedor Isakov fecabe840d Fix closure's parameter type inference, drop hacks
Replace the ad-hoc solution with typeScheme/2 cint to be used
on par with type/2. Type inference sites to be extended
with rules to process typeScheme.
2022-11-21 10:50:00 +01:00
Fedor Isakov b5de53e27f Fix type inference for untyped parameters; minor refactorings
Ensure nothing() type can be converted to any type.
Use the value "site" in capture() term to ensure capture types
don't get matched with `==`.
Also, avoid eagerly dropping resolveVar cint.
2022-11-21 10:50:00 +01:00
Fedor Isakov 876cf75302 Types for j.m.l.kotlinRefs languange 2022-11-21 10:50:00 +01:00
Fedor Isakov 83976afa9d Update and generate build script 2022-11-21 10:50:00 +01:00
Fedor Isakov d33e3148d9 Update virtual folders 2022-11-21 10:50:00 +01:00
Fedor Isakov 2a6d60133b Fix closure's parameter type inference; properly lift function type 2022-11-21 10:50:00 +01:00
Fedor Isakov 497691e9af Fix type inference of expressions in BL, plus few minor issues 2022-11-21 10:50:00 +01:00
Fedor Isakov f1efac2c11 Fix typechecking of function type: varargs and type inference 2022-11-21 10:50:00 +01:00
Fedor Isakov 22fb818142 Simplify typechecking of SNodeTypeCastExpression, drop deprecated stuff 2022-11-21 10:50:00 +01:00
Fedor Isakov 5abf1dbce7 Ensure types extend BL's Type term 2022-11-21 10:50:00 +01:00
Fedor Isakov 9b341c2e2d Ensure types extend BL's Type term 2022-11-21 10:50:00 +01:00
Fedor Isakov 3f722f6fbd Drop creating abstract concept for open type 2022-11-21 10:50:00 +01:00
Fedor Isakov 8c0771769a Update modules.xml for all recently added modules 2022-11-21 10:49:59 +01:00
Fedor Isakov 816dcc5f00 Types for j.m.l.methodReferences languange 2022-11-21 10:49:59 +01:00
Fedor Isakov 0e6a1103c7 Types for j.m.l.extension languange 2022-11-21 10:49:59 +01:00
Fedor Isakov ec0167feba Types for j.m.l.sharedConcepts languange 2022-11-21 10:49:59 +01:00
Fedor Isakov ff1d53a7ab Fix sequence type construction (passing correct unifier) 2022-11-21 10:49:59 +01:00
Fedor Isakov 0cdad6687c Introduce nothing() term, ensure it is assigned by default instead of type() 2022-09-08 14:07:06 +02:00
Fedor Isakov 8c9f3c8afa Fix closure type inference 2022-09-08 14:07:06 +02:00
Fedor Isakov 4aaf66d4cb Support for LocalPropertyReference 2022-09-08 14:07:06 +02:00
Fedor Isakov 35288dc3e5 Fix conversion in smodel lang 2022-09-08 14:07:06 +02:00
Fedor Isakov 7c3c6968b0 Fix type recovery in logic lang 2022-09-08 14:07:06 +02:00
Fedor Isakov ce71b0f987 Rebuild build scripts 2022-09-02 16:42:08 +02:00
Fedor Isakov 4070194d01 Bump up plugin versions 2022-09-02 16:11:00 +02:00
Fedor Isakov 83e273da73 Fix tests by caching Config instance
Tests are launched within a context that is unable
to perform normal MPS classloading, so we resort to
caching the (singleton) instance of Config coming from
an (IDEA) plugin to use it later.
2022-08-27 19:39:14 +02:00
Fedor Isakov 78f847747b Drop unstable hacks, simplify code 2022-08-26 13:58:22 +02:00
Fedor Isakov a40d74c600 Fix project build and loading scheme
Source files for ideaplugin are now compiled externally.
2022-08-26 10:39:20 +02:00
Fedor Isakov 299d9a4fd8 Update build scripts to fix tests launching 2022-08-25 12:59:36 +02:00
Fedor Isakov d2ca45aa02 Extract bootstrap code to idea plugin; CR options to become app-level
CR typechecking options are now application-level.

The solution j.m.c.ideaplugin contains the code responsible
for accessing and setting the options. This solution is loaded
as IDEA plugin on deploy and as regular module in source project.

Also merge code from two modules into j.m.c.typechecking.
2022-08-25 12:59:36 +02:00
Fedor Isakov fe3a38d90f Rebuild project 2022-08-17 11:40:58 +02:00
Fedor Isakov c4a157bf4d Bump up plugin versions 2022-08-16 18:11:49 +02:00
Fedor Isakov 29c9a50fa9 Use built-in BL's intersection type instead of meet type 2022-08-16 18:11:49 +02:00
Fedor Isakov ab2a1b6499 BL Types: Disable overriding methods check, MPSCR-115
This check doesn't belong to the type system, is
currently implemented on top of it as a "check" rule.
2022-08-01 14:11:38 +02:00
Fedor Isakov ba7411abfa Bump up plugin version and rebuild build scripts 2022-07-28 10:37:36 +02:00
Fedor Isakov 451529aa08 Cleanup imports 2022-07-28 10:30:38 +02:00
Fedor Isakov f985db8206 Update and rebuild build scripts 2022-07-28 10:30:38 +02:00
Fedor Isakov 7fe773dcc2 Switch all type aspects in mpscore sample to typechecking terms
This includes dropping of Recover rule table and relying on
the automatic types recovery.
2022-07-28 10:30:38 +02:00
Fedor Isakov e03f8d134b Switch lambdac sample to typechecking queries 2022-07-28 10:30:37 +02:00