StrSet
Module
signature STR_SET
structure StrSet
:> STR_SET
This module provides operations on finite sets of Forlan strings, i.e., values of type
that are standard in the sense that they are compatible with Str
.str
Set
.set
Str
.compare
. All values of type Str.str Set.set
will implicitly be assumed/required to be standard.
val memb : Str.str * Str.str Set.set -> bool
val fromList : Str.str list -> Str.str Set.set
val compare : Str.str Set.set Sort.total_ordering
val subset : Str.str Set.set * Str.str Set.set -> bool
val equal : Str.str Set.set * Str.str Set.set -> bool
val map : ('a -> Str.str) -> 'a Set.set -> Str.str Set.set
val mapFromList : ('a -> Str.str) -> 'a list -> Str.str Set.set
val union : Str.str Set.set * Str.str Set.set -> Str.str Set.set
val genUnion : Str.str Set.set list -> Str.str Set.set
val inter : Str.str Set.set * Str.str Set.set -> Str.str Set.set
val genInter : Str.str Set.set list -> Str.str Set.set
val minus : Str.str Set.set * Str.str Set.set -> Str.str Set.set
val inputFromLabToks : (int * Lex.tok) list -> Str.str Set.set * (int * Lex.tok) list
val fromString : string -> Str.str Set.set
val input : string -> Str.str Set.set
val toPP : Str.str Set.set -> PP.pp
val toString : Str.str Set.set -> string
val output : string * Str.str Set.set -> unit
val concat : Str.str Set.set * Str.str Set.set -> Str.str Set.set
val power : Str.str Set.set * int -> Str.str Set.set
val rev : Str.str Set.set -> Str.str Set.set
val prefixes : Str.str -> Str.str Set.set
val suffixes : Str.str -> Str.str Set.set
val substrings : Str.str -> Str.str Set.set
val prefix : Str.str Set.set -> Str.str Set.set
val suffix : Str.str Set.set -> Str.str Set.set
val substring : Str.str Set.set -> Str.str Set.set
val alphabet : Str.str Set.set -> Sym.sym Set.set
val renameAlphabet : Str.str Set.set * SymRel.sym_rel -> Str.str Set.set
memb(x, ys)
x
is a member of ys
.
fromList xs
xs
.
compare
Set
.compare
Str
.compare
.
subset(xs, ys)
xs
is a subset of ys
.
equal(xs, ys)
xs
is equal to ys
.
map f xs
xs
is compatible with a value cmp
of type 'a Sort.total_ordering
, then map
returns the set of all Forlan strings f x
such that x
is a member of xs
.
mapFromList f xs
f x
such that x
is a member of xs
.
union(xs, ys)
xs
and ys
.
genUnion xss
xss
.
inter(xs, ys)
xs
and ys
.
genInter xss
xss
. Issues an error message if xss
is empty.
minus(xs, ys)
xs
and ys
.
inputFromLabToks lts
lts
, consuming as much of lts
as possible, and returning the pair of the set of strings 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 symbol or "%"
(Lex
.Perc
).If, after reading a string, the next element of the labeled token list is ","
(Lex.Comma
), then inputFromLabToks
insists on reading another string, even if this results in failure.
fromString s
s
.
input fil
fil
.
toPP xs
xs
.
toString xs
xs
to a string.
output(fil, xs)
xs
to file fil
.
concat(xs, ys)
xs
and ys
.
power(xs, n)
xs
to the power n
. Issues an error message if n
is negative.
rev xs
xs
.
prefixes x
x
.
suffixes x
x
.
substrings x
x
.
prefix xs
xs
.
suffix xs
xs
. It is defined by
fun suffix xs = rev(prefix(rev xs))
substring xs
xs
. It is defined by
fun substring xs = suffix(prefix xs)
alphabet xs
xs
.
renameAlphabet xs
xs
using the bijection rel
. Issues an error message if rel
is not a bijection from a superset of the alphabet of xs
to some set.
Forlan Version 4.15
Copyright © 2022 Alley Stoughton