René's URL Explorer Experiment


Title: Sanity Checker · Issue #73 · rowscript/rowscript · GitHub

Open Graph Title: Sanity Checker · Issue #73 · rowscript/rowscript

X Title: Sanity Checker · Issue #73 · rowscript/rowscript

Description: Let's have sth like: use std::collections::HashMap; use crate::theory::abs::data::{MetaKind, Term}; use crate::theory::{Name, Var}; pub struct UnusedParamAnalyzer<'a> { parameters: HashMap, unused: Vec<(Name, &'a ...

Open Graph Description: Let's have sth like: use std::collections::HashMap; use crate::theory::abs::data::{MetaKind, Term}; use crate::theory::{Name, Var}; pub struct UnusedParamAnalyzer<'a> { parameters: HashMap

X Description: Let's have sth like: use std::collections::HashMap; use crate::theory::abs::data::{MetaKind, Term}; use crate::theory::{Name, Var}; pub struct UnusedParamAnalyzer<'a> { parameters: Ha...

Opengraph URL: https://github.com/rowscript/rowscript/issues/73

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Sanity Checker","articleBody":"Let's have sth like:\r\n```rust\r\nuse std::collections::HashMap;\r\nuse crate::theory::abs::data::{MetaKind, Term};\r\nuse crate::theory::{Name, Var};\r\n\r\npub struct UnusedParamAnalyzer\u003c'a> {\r\n    parameters: HashMap\u003cName, (&'a Term, bool)>,\r\n    unused: Vec\u003c(Name, &'a Term)>,\r\n}\r\n\r\nimpl\u003c'a> UnusedParamAnalyzer\u003c'a> {\r\n    pub fn new() -> Self {\r\n        UnusedParamAnalyzer {\r\n            parameters: HashMap::new(),\r\n            unused: Vec::new(),\r\n        }\r\n    }\r\n\r\n    pub fn with_binding\u003cF>(&mut self, name: Name, term: &'a Term, mut continuation: F) where F: FnMut(&mut Self) {\r\n        let backup = self.parameters.insert(name.clone(), (term, false));\r\n        continuation(self);\r\n        let released = if let Some(backup) = backup {\r\n            self.parameters.insert(name.clone(), backup)\r\n        } else {\r\n            self.parameters.remove(&name)\r\n        };\r\n        match released {\r\n            Some((term, flag)) => {\r\n                if !flag {\r\n                    self.unused.push((name, term));\r\n                }\r\n            },\r\n            _ => unreachable!(\"must have been inserted in this scope\"),\r\n        }\r\n    }\r\n\r\n    pub fn mark_used(&mut self, name: Name) {\r\n        if let Some((_, flag)) = self.parameters.get_mut(&name) {\r\n            *flag = true;\r\n        }\r\n    }\r\n    // term is the term that binds the variable\r\n    pub fn analyze(&mut self, term: &'a Term) {\r\n        match term {\r\n            Term::Ref(var) => {\r\n                self.mark_used(var.name.clone());\r\n            }\r\n            Term::Qualified(_, _) => {\r\n                // qualified does not contribute to local used variables\r\n            }\r\n            Term::Extern(_) => {}\r\n            Term::MetaRef(kind, y, z) => {\r\n                // TODO: check if this is correct\r\n                if let MetaKind::UserMeta = kind {\r\n                    self.mark_used(y.name.clone());\r\n                }\r\n                for (_, t) in z {\r\n                    self.analyze(t);\r\n                }\r\n            }\r\n            Term::Undef(_var) => {\r\n                // undef does not contribute to used variables\r\n            }\r\n            Term::Let(param, val, body) => {\r\n                self.analyze(¶m.typ);\r\n                self.analyze(val);\r\n                self.with_binding(param.var.name.clone(), term, |this| {\r\n                    this.analyze(body);\r\n                });\r\n            }\r\n            Term::Univ => {}\r\n            Term::Pi(param, body) => {\r\n                self.analyze(¶m.typ);\r\n                self.with_binding(param.var.name.clone(), term, |this| {\r\n                    this.analyze(body);\r\n                });\r\n            }\r\n            Term::Lam(param, body) => {\r\n                self.analyze(¶m.typ);\r\n                self.with_binding(param.var.name.clone(), term, |this| {\r\n                    this.analyze(body);\r\n                });\r\n            }\r\n            Term::App(x, _, y) => {\r\n                self.analyze(x);\r\n                self.analyze(y);\r\n            }\r\n            Term::Sigma(param, body) => {\r\n                self.analyze(¶m.typ);\r\n                self.with_binding(param.var.name.clone(), term, |this| {\r\n                    this.analyze(body);\r\n                });\r\n            }\r\n            Term::Tuple(x, y) => {\r\n                self.analyze(x);\r\n                self.analyze(y);\r\n            }\r\n            Term::TupleLet(x, y, expr, body) => {\r\n                self.analyze(&x.typ);\r\n                self.analyze(&y.typ);\r\n                self.analyze(expr);\r\n                // can be dependent tuple\r\n                self.with_binding(x.var.name.clone(), term, |this| {\r\n                    this.with_binding(y.var.name.clone(), term, |this| {\r\n                        this.analyze(body);\r\n                    });\r\n                });\r\n            }\r\n            Term::Unit => {}\r\n            Term::TT => {}\r\n            Term::UnitLet(_, body) => {\r\n                self.analyze(body);\r\n            }\r\n            Term::Boolean => {}\r\n            Term::False => {}\r\n            Term::True => {}\r\n            Term::If(x, y, z) => {\r\n                self.analyze(x);\r\n                self.analyze(y);\r\n                self.analyze(z);\r\n            }\r\n            Term::String => {\r\n            }\r\n            Term::Str(_) => {}\r\n            Term::Number => {}\r\n            Term::Num(_) => {}\r\n            Term::NumAdd(x, y) => {\r\n                self.analyze(x);\r\n                self.analyze(y);\r\n            }\r\n            Term::NumSub(x, y) => {\r\n                self.analyze(x);\r\n                self.analyze(y);\r\n            }\r\n            Term::BigInt => {}\r\n            Term::Big(_) => {}\r\n            Term::Row => {}\r\n            Term::Fields(x) => {\r\n                for (_, t) in x {\r\n                    self.analyze(t);\r\n                }\r\n            }\r\n            Term::Combine(x, y) => {\r\n                self.analyze(x);\r\n                self.analyze(y);\r\n            }\r\n            Term::RowOrd(x, _, y) => {\r\n                self.analyze(x);\r\n                self.analyze(y);\r\n            }\r\n            Term::RowSat => {}\r\n            Term::RowEq(x, y) => {\r\n                self.analyze(x);\r\n                self.analyze(y);\r\n            }\r\n            Term::RowRefl => {}\r\n            Term::Object(x) => {\r\n                self.analyze(x);\r\n            }\r\n            Term::Obj(x) => {\r\n                self.analyze(x);\r\n            }\r\n            Term::Concat(x, y) => {\r\n                self.analyze(x);\r\n                self.analyze(y);\r\n            }\r\n            Term::Access(x, _) => {\r\n                self.analyze(x);\r\n            }\r\n            Term::Downcast(x, y) => {\r\n                self.analyze(x);\r\n                self.analyze(y);\r\n            }\r\n            Term::Enum(x) => {\r\n                self.analyze(x);\r\n            }\r\n            Term::Variant(x) => {\r\n                self.analyze(x);\r\n            }\r\n            Term::Upcast(x, y) => {\r\n                self.analyze(x);\r\n                self.analyze(y);\r\n            }\r\n            Term::Switch(x, map) => {\r\n                self.analyze(x);\r\n                for (_, (var, body)) in map {\r\n                    self.with_binding(var.name.clone(), term, |this| {\r\n                        this.analyze(body);\r\n                    });\r\n                }\r\n            }\r\n            Term::Vptr(var, terms) => {\r\n                self.mark_used(var.name.clone());\r\n                for t in terms {\r\n                    self.analyze(t);\r\n                }\r\n            }\r\n            Term::Vp(_, terms) => {\r\n                for t in terms {\r\n                    self.analyze(t);\r\n                }\r\n            }\r\n            Term::Lookup(x) => {\r\n                self.analyze(x);\r\n            }\r\n            Term::Find(x, a, b) => {\r\n                self.mark_used(a.name.clone());\r\n                self.mark_used(b.name.clone());\r\n                self.analyze(x);\r\n            }\r\n            Term::ImplementsOf(x, var) => {\r\n                self.mark_used(var.name.clone());\r\n                self.analyze(x);\r\n            }\r\n            Term::ImplementsSat => {\r\n            }\r\n        }\r\n    }\r\n    pub fn finalize(self) -> Vec\u003c(Name, &'a Term)> {\r\n        self.unused\r\n    }\r\n}\r\n```","author":{"url":"https://github.com/SchrodingerZhu","@type":"Person","name":"SchrodingerZhu"},"datePublished":"2023-04-30T01:56:52Z","url":"https://github.com/rowscript/rowscript/issues/73"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:eb891b12-b6fd-5bc6-60c7-e289b5b153e1
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id86B4:230846:FE6BED:166E26A:6AFA1145
html-safe-noncea42b9e54db1332d16c55a254d0eecb8483bb589ea7ca4cb19405be342e9776ac
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NkI0OjIzMDg0NjpGRTZCRUQ6MTY2RTI2QTo2QUZBMTE0NSIsInZpc2l0b3JfaWQiOiIzNTU3NjQ0Nzc3NDE3MjE2MzI1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacdd13c9c29db0275212d44c842f5796bd7d3b0ec7f3e8b09e810f724e2d2a0d5e
hovercard-subject-tagissue:1689746209
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/rowscript/rowscript/73/issue_layout
twitter:imagehttps://opengraph.githubassets.com/76223b9bf81e8d12ba4e00d09c1190291b7ec7d550995a4ec21cf0d0e7266b08/rowscript/rowscript/issues/73
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/76223b9bf81e8d12ba4e00d09c1190291b7ec7d550995a4ec21cf0d0e7266b08/rowscript/rowscript/issues/73
og:image:altLet's have sth like: use std::collections::HashMap; use crate::theory::abs::data::{MetaKind, Term}; use crate::theory::{Name, Var}; pub struct UnusedParamAnalyzer<'a> { parameters: HashMap
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameSchrodingerZhu
hostnamegithub.com
expected-hostnamegithub.com
None612d3e6ffd693e7ea8d9fcf452370995872baef31d825b1fedef704cd3d24ac7
turbo-cache-controlno-preview
go-importgithub.com/rowscript/rowscript git https://github.com/rowscript/rowscript.git
octolytics-dimension-user_id87884599
octolytics-dimension-user_loginrowscript
octolytics-dimension-repository_id388972006
octolytics-dimension-repository_nworowscript/rowscript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id388972006
octolytics-dimension-repository_network_root_nworowscript/rowscript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release072e34035c13c31543fba9f025cbbbda4210dae4
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/rowscript/rowscript/issues/73#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Frowscript%2Frowscript%2Fissues%2F73
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Frowscript%2Frowscript%2Fissues%2F73
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=rowscript%2Frowscript
Reloadhttps://github.com/rowscript/rowscript/issues/73
Reloadhttps://github.com/rowscript/rowscript/issues/73
Reloadhttps://github.com/rowscript/rowscript/issues/73
rowscripthttps://github.com/rowscript
rowscripthttps://github.com/rowscript/rowscript
Codehttps://github.com/rowscript/rowscript
Issues19 (19)https://github.com/rowscript/rowscript/issues
Pull requestshttps://github.com/rowscript/rowscript/pulls
Discussionshttps://github.com/rowscript/rowscript/discussions
Actionshttps://github.com/rowscript/rowscript/actions
Projectshttps://github.com/rowscript/rowscript/projects
Security and qualityhttps://github.com/rowscript/rowscript/security
Insightshttps://github.com/rowscript/rowscript/pulse
https://github.com/rowscript/rowscript
New issuehttps://github.com/login?return_to=https://github.com/rowscript/rowscript/issues/73
New issuehttps://github.com/login?return_to=https://github.com/rowscript/rowscript/issues/73
Sanity Checkerhttps://github.com/rowscript/rowscript/issues/73#top
enhancementNew feature or requesthttps://github.com/rowscript/rowscript/issues?q=state%3Aopen%20label%3A%22enhancement%22
good first issueGood for newcomershttps://github.com/rowscript/rowscript/issues?q=state%3Aopen%20label%3A%22good%20first%20issue%22
x-concConcrete syntaxhttps://github.com/rowscript/rowscript/issues?q=state%3Aopen%20label%3A%22x-conc%22
https://github.com/SchrodingerZhu
SchrodingerZhuhttps://github.com/SchrodingerZhu
on Apr 30, 2023https://github.com/rowscript/rowscript/issues/73#issue-1689746209
SchrodingerZhuhttps://github.com/SchrodingerZhu
anqurhttps://github.com/anqur
QuarticCathttps://github.com/QuarticCat
anqurhttps://github.com/anqur
QuarticCathttps://github.com/QuarticCat
on Apr 30, 2023https://github.com/rowscript/rowscript/issues/73#event-9131532834
https://github.com/SchrodingerZhu
SchrodingerZhuhttps://github.com/SchrodingerZhu
on Apr 30, 2023https://github.com/rowscript/rowscript/issues/73#issuecomment-1528919698
@QuarticCathttps://github.com/QuarticCat
https://github.com/anqur
anqurhttps://github.com/anqur
on Apr 30, 2023https://github.com/rowscript/rowscript/issues/73#issuecomment-1528925746
anqurhttps://github.com/anqur
enhancementNew feature or requesthttps://github.com/rowscript/rowscript/issues?q=state%3Aopen%20label%3A%22enhancement%22
good first issueGood for newcomershttps://github.com/rowscript/rowscript/issues?q=state%3Aopen%20label%3A%22good%20first%20issue%22
x-concConcrete syntaxhttps://github.com/rowscript/rowscript/issues?q=state%3Aopen%20label%3A%22x-conc%22
on Apr 30, 2023https://github.com/rowscript/rowscript/issues/73#event-9131634750
https://github.com/QuarticCat
QuarticCathttps://github.com/QuarticCat
on Apr 30, 2023https://github.com/rowscript/rowscript/issues/73#issuecomment-1528945436
https://github.com/anqur
anqurhttps://github.com/anqur
on Apr 30, 2023https://github.com/rowscript/rowscript/issues/73#issuecomment-1528968493
https://github.com/SchrodingerZhu
SchrodingerZhuhttps://github.com/SchrodingerZhu
on Apr 30, 2023https://github.com/rowscript/rowscript/issues/73#issuecomment-1529047394
@QuarticCathttps://github.com/QuarticCat
anqurhttps://github.com/anqur
on May 26, 2023https://github.com/rowscript/rowscript/issues/73#event-9349279631
Sign up for freehttps://github.com/signup?return_to=https://github.com/rowscript/rowscript/issues/73
Sign in to commenthttps://github.com/login?return_to=https://github.com/rowscript/rowscript/issues/73
enhancementNew feature or requesthttps://github.com/rowscript/rowscript/issues?q=state%3Aopen%20label%3A%22enhancement%22
good first issueGood for newcomershttps://github.com/rowscript/rowscript/issues?q=state%3Aopen%20label%3A%22good%20first%20issue%22
x-concConcrete syntaxhttps://github.com/rowscript/rowscript/issues?q=state%3Aopen%20label%3A%22x-conc%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.