{"id":15422505,"url":"https://github.com/baronfel/ilverify-fsharp-error-demo","last_synced_at":"2025-07-25T17:12:40.351Z","repository":{"id":145189549,"uuid":"287054123","full_name":"baronfel/ilverify-fsharp-error-demo","owner":"baronfel","description":null,"archived":false,"fork":false,"pushed_at":"2020-08-12T15:47:19.000Z","size":2,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-29T02:50:32.961Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","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/baronfel.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}},"created_at":"2020-08-12T15:47:06.000Z","updated_at":"2020-08-15T13:31:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"7f434a48-9cf4-4d5f-a8cc-e6af62d4dc23","html_url":"https://github.com/baronfel/ilverify-fsharp-error-demo","commit_stats":{"total_commits":1,"total_committers":1,"mean_commits":1.0,"dds":0.0,"last_synced_commit":"d817a279c4ae0c5e6a2f0ce0713efe2e8847f796"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baronfel%2Filverify-fsharp-error-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baronfel%2Filverify-fsharp-error-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baronfel%2Filverify-fsharp-error-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baronfel%2Filverify-fsharp-error-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/baronfel","download_url":"https://codeload.github.com/baronfel/ilverify-fsharp-error-demo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239646207,"owners_count":19673995,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-01T17:38:47.330Z","updated_at":"2025-02-19T11:25:42.898Z","avatar_url":"https://github.com/baronfel.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ILVerify test harness for c#/f# code difference\n\nThe ilverify tool doesn't like the IL generated by the F# compiler for this function call, but it is fine with that of the C# compiler.\n\nThis repo exists to demonstrate the problem and see what the solution is.\n\n## Test C\\#\n\ncd to `ilver` and run `dotnet build`, then run `ilverify bin/Debug/\u003ctfm\u003e/ilver.dll -r \u003cpath to .net runtime Netcoreapp dll directory\u003e/*.dll`\n\nYou'll get something like\n\n```\n\u003e ilverify bin/Debug/net5.0/ilver.dll -r /usr/local/share/dotnet/shared/Microsoft.NETCore.App/5.0.0-preview.6.20305.6/*.dll -t --statistics\nAll Classes and Methods in /Users/chethusk/scratch/ilverify-check/ilver/bin/Debug/net5.0/ilver.dll Verified.\nTypes found: 2\nTypes verified: 2\nMethods found: 2\nMethods verified: 2\n```\n\n## Test F\\#\n\ncd to `ilverfs` and run `dotnet build`, then run `ilverify bin/Debug/\u003ctfm\u003e/ilverfs.dll -r \u003cpath to .net runtime Netcoreapp dll directory\u003e/*.dll`\n\nYou'll get something like\n\n```\n\u003e ilverify bin/Debug/net5.0/ilverfs.dll -r /usr/local/share/dotnet/shared/Microsoft.NETCore.App/5.0.0-preview.6.20305.6/*.dll -t --statistics\n[IL]: Error [StackUnexpected]: [/Users/chethusk/scratch/ilverify-check/ilverfs/bin/Debug/net5.0/ilverfs.dll : .ilverfs::relative(string)][offset 0x0000000B][found Char] Unexpected type on the stack.\n1 Error(s) Verifying /Users/chethusk/scratch/ilverify-check/ilverfs/bin/Debug/net5.0/ilverfs.dll\nTypes found: 5\nTypes verified: 5\nMethods found: 1\nMethods verified: 1\n```\n\n## IL generated for C\\#\n\n(taken from [sharplab](https://sharplab.io/#v2:C4LglgNgNAJiDUAfAAgJgIwFgBQyDMABGgQMIEDeOB1Rhy6AbAQMrABOYAdgOYFsCmEAIbAwAN34EAFKw48CAZ37cAtv07AAlBSo09yAOyLlajQDoAKhxWshbYFM78A7gG0AuuQDkAei8BfTQBuXWp/HH8gA)):\n\n\n```il\n// Methods\n    .method public hidebysig static \n        string relative (\n            string segment\n        ) cil managed \n    {\n        // Method begins at RVA 0x2050\n        // Code size 23 (0x17)\n        .maxstack 5\n        .locals init (\n            [0] string\n        )\n\n        IL_0000: nop\n        IL_0001: ldarg.0\n        IL_0002: ldc.i4.1\n        IL_0003: newarr [System.Private.CoreLib]System.Char\n        IL_0008: dup\n        IL_0009: ldc.i4.0\n        IL_000a: ldc.i4.s 47\n        IL_000c: stelem.i2\n        IL_000d: callvirt instance string [System.Private.CoreLib]System.String::TrimStart(char[])\n        IL_0012: stloc.0\n        IL_0013: br.s IL_0015\n\n        IL_0015: ldloc.0\n        IL_0016: ret\n    }\n```\n\n## IL generated for F\\#\n\n(taken from [sharplab](https://sharplab.io/#v2:DYLgZgzgNALiCWwoBMQGoA+ACLwCmMWATnsAIYzwBueWAFBHgOYC2eAdoSFhDEfOyYBKLAF4AsACgcMnszacAdABV+LAMowyRQgG1sAcgD0BrBgC6QA=))\n\n```il\n.method public static \n        class [System.Private.CoreLib]System.String relative (\n            class [System.Private.CoreLib]System.String segment\n        ) cil managed \n    {\n        // Method begins at RVA 0x2050\n        // Code size 22 (0x16)\n        .maxstack 8\n\n        IL_0000: ldarg.0\n        IL_0001: ldc.i4.1\n        IL_0002: newarr [System.Private.CoreLib]System.Char\n        IL_0007: dup\n        IL_0008: ldc.i4.0\n        IL_0009: ldc.i4.s 47\n        IL_000b: stelem [System.Private.CoreLib]System.Char\n        IL_0010: callvirt instance string [System.Private.CoreLib]System.String::TrimStart(char[])\n        IL_0015: ret\n    }\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaronfel%2Filverify-fsharp-error-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaronfel%2Filverify-fsharp-error-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaronfel%2Filverify-fsharp-error-demo/lists"}