Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Probably wrong definition of subtyping

Aperta
#175 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
1/5
Tempo stimato
Meno di un'ora
Idoneità per principianti
50/100
Tipo di issue
Documentazione
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Ambito
documentation

Direzione di ricerca

Apri website/docs-smtlib/01 - logic/05 - Quantifiers.md alle tre righe collegate e confronta le definizioni dei sottotipi con l'esempio SMT-LIB nell'issue. Verifica i risultati di soddisfacibilità dell'esempio, quindi aggiorna la notazione e conferma che la documentazione renderizzata corrisponda agli assiomi dei sottotipi previsti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

I think = should be => in the following three lines.

https://github.com/microsoft/z3guide/blob/4333097e04327dff31664884ec20b1ee1f85cd7b/website/docs-smtlib/01%20-%20logic/05%20-%20Quantifiers.md?plain=1#L21

https://github.com/microsoft/z3guide/blob/4333097e04327dff31664884ec20b1ee1f85cd7b/website/docs-smtlib/01%20-%20logic/05%20-%20Quantifiers.md?plain=1#L27

https://github.com/microsoft/z3guide/blob/4333097e04327dff31664884ec20b1ee1f85cd7b/website/docs-smtlib/01%20-%20logic/05%20-%20Quantifiers.md?plain=1#L30

Otherwise, the specification prohibits the existence of non-root types. Specifically, the following program (where the only interesting lines are the last three lines) prints sat unsat.

(declare-sort Type)
(declare-fun subtype (Type Type) Bool)
(declare-fun array-of (Type) Type)
(assert (forall ((x Type)) (subtype x x)))
(assert (forall ((x Type) (y Type) (z Type))
          (= (and (subtype x y) (subtype y z)) 
              (subtype x z)))) 
(assert (forall ((x Type) (y Type))
          (= (and (subtype x y) (subtype y x)) 
              (= x y))))
(assert (forall ((x Type) (y Type) (z Type))
          (= (and (subtype x y) (subtype x z)) 
              (or (subtype y z) (subtype z y))))) 
(assert (forall ((x Type) (y Type))
          (= (subtype x y) 
              (subtype (array-of x) (array-of y)))))
(declare-const root-type Type)
(assert (forall ((x Type)) (subtype x root-type)))
(check-sat)
(declare-const another-type Type)
(assert (not (= root-type another-type)))
(check-sat)
Lingua principale
JavaScript
Stelle
123
Fork
34
Merge medio
3h 48m
PR unite (30g)
4

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/z3guide

Tutte le issue di microsoft/z3guide

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.