{"id":28526618,"url":"https://github.com/jglrxavpok/abstracttypeinference","last_synced_at":"2026-04-15T22:35:38.892Z","repository":{"id":73265378,"uuid":"84756541","full_name":"jglrxavpok/AbstractTypeInference","owner":"jglrxavpok","description":"A test project to try making abstract type inference","archived":false,"fork":false,"pushed_at":"2018-07-10T15:24:59.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-25T17:07:53.191Z","etag":null,"topics":["calculus","inference","lambda","lambda-calculus","type"],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jglrxavpok.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-03-12T20:51:07.000Z","updated_at":"2022-11-16T20:14:23.000Z","dependencies_parsed_at":"2023-02-26T08:46:15.209Z","dependency_job_id":null,"html_url":"https://github.com/jglrxavpok/AbstractTypeInference","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jglrxavpok/AbstractTypeInference","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jglrxavpok%2FAbstractTypeInference","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jglrxavpok%2FAbstractTypeInference/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jglrxavpok%2FAbstractTypeInference/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jglrxavpok%2FAbstractTypeInference/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jglrxavpok","download_url":"https://codeload.github.com/jglrxavpok/AbstractTypeInference/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jglrxavpok%2FAbstractTypeInference/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31863495,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["calculus","inference","lambda","lambda-calculus","type"],"created_at":"2025-06-09T11:37:55.353Z","updated_at":"2026-04-15T22:35:38.887Z","avatar_url":"https://github.com/jglrxavpok.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"Abstract Type Inference\n=======================\n\nThe goal of this library is to infer the type of a given expression made with simple blocks.\n\nElementary expressions\n======================\nFormat: ```Expression type: KotlinConstructor(args)```\n\n* Opaque expressions: ```OpaqueExpression(name)```\n* Variable expressions: ```Variable(name)``` (similar to OpaqueExpression)\n* Tuple expressions: ```Tuple(elements: Array\u003cExpression\u003e)```, must be used as an argument of a logically multi-argument function\n* Function expressions: ```Function(name, argument: Expression, body: Expression)```\n* Function calls: ```FunctionCall(function, argument)```\n* Literals: ```Literal(userObject: Any, type: TypeDefinition)```, only expression to always have an explicit type\n* Lists: ```List(elements: List\u003cExpression\u003e)```, all elements are of the same type\n\nElementary types\n================\n* Basic (or primitive) types: ```TypeDefinition()```\n* Polymorphic types: ```PolymorphicType()``` (**each** polymorphic type has an UUID assigned on object creation)\n* Function types: ```FunctionType(argument: TypeDefinition, returnType: TypeDefinition)```\n* Tuple types: ```TupleType(elements: Array\u003cTypeDefinition\u003e)```\n* List types: ```ListType(component: TypeDefinition)```\n\nRules for comparing elementary types\n====================================\n1. **All** types are \u003c= than polyformic types.\n2. Let a and b be two primitives types, ```a \u003c= b iif a = b```\n3. Let a and b be two function types, ```a \u003c= b iif argument(a) \u003c= argument(b) AND returnType(a) \u003c= returnType(b)```\n4. Let a and b be two tuple types, ```a \u003c= b iif a and b have the same length AND for any valid index 'i', a(i) \u003c= b(i)```\n5. Let a and b be two list types, ```a \u003c= b iif component(a) \u003c= component(b)```\n6. Anything else is considered impossible comparisons and therefore issues an IllegalArgumentException\n\nDiscriminating types when inferring expressions\n===============================================\nLet 'T' a non-empty list of types. The 'unified' type is ```min(T)``` in respect of comparison rules from *Rules for comparing elementary types*.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjglrxavpok%2Fabstracttypeinference","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjglrxavpok%2Fabstracttypeinference","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjglrxavpok%2Fabstracttypeinference/lists"}