VarSet
Module
signature VAR_SET
structure VarSet
:> VAR_SET
This module provides operations on finite sets of variables, i.e., values of type
that are standard in the sense that they are compatible with Var
.var
Set
.set
Var
.compare
. All values of type Var.var Set.set
will implicitly be assumed/required to be standard.
val memb : Var.var * Var.var Set.set -> bool
val fromList : Var.var list -> Var.var Set.set
val compare : Var.var Set.set Sort.total_ordering
val subset : Var.var Set.set * Var.var Set.set -> bool
val equal : Var.var Set.set * Var.var Set.set -> bool
val map : ('a -> Var.var) -> 'a Set.set -> Var.var Set.set
val mapFromList : ('a -> Var.var) -> 'a list -> Var.var Set.set
val union : Var.var Set.set * Var.var Set.set -> Var.var Set.set
val genUnion : Var.var Set.set list -> Var.var Set.set
val inter : Var.var Set.set * Var.var Set.set -> Var.var Set.set
val genInter : Var.var Set.set list -> Var.var Set.set
val minus : Var.var Set.set * Var.var Set.set -> Var.var Set.set
val inputFromLabToks : (int * Lex.tok) list -> Var.var Set.set * (int * Lex.tok) list
val fromString : string -> Var.var Set.set
val input : string -> Var.var Set.set
val toPP : Var.var Set.set -> PP.pp
val toString : Var.var Set.set -> string
val output : string * Var.var Set.set -> unit
memb(var, vars)
var
is a member of vars
.
fromList vars
vars
.
compare
Set
.compare
Var
.compare
.
subset(var1s, var2s)
var1s
is a subset of var2s
.
equal(var1s, var2s)
var1s
is equal to var2s
.
map f xs
xs
is compatible with a value cmp
of type 'a Sort.total_ordering
, then map
returns the set of all variables f x
such that x
is a member of xs
.
mapFromList f xs
f x
such that x
is a member of xs
.
union(var1s, var2s)
var1s
and var2s
.
genUnion varss
varss
.
inter(var1s, var2s)
var1s
and var2s
.
genInter varss
varss
. Issues an error message if varss
is empty.
minus(var1s, var2s)
var1s
and var2s
.
inputFromLabToks lts
lts
, consuming as much of lts
as possible, and returning the pair of the set of variables and the rest of lts
. Issues an error message if it fails. Will only return the empty set if lts
doesn't begin with a variable. If, after reading a variable, the next element of the labeled token list is ","
(Lex
.Comma
), then inputFromLabToks
insists on reading another variable, even if this results in failure.
fromString s
s
.
input fil
fil
.
toPP vars
vars
.
toString vars
vars
to a string.
output(fil, vars)
vars
to file fil
.
Forlan Version 4.15
Copyright © 2022 Alley Stoughton