Forlan Manual


The TranRegSet Module


Synopsis

signature TRAN_REG_SET
structure TranRegSet :> TRAN_REG_SET

This module provides operations on finite sets of regular expression transitions, i.e., values of type TranReg.tran_reg Set.set that are standard in the sense that they are compatible with TranReg.compare. All values of type TranReg.tran_reg Set.set will implicitly be assumed/required to be standard.


Interface

val memb : TranReg.tran_reg * TranReg.tran_reg Set.set -> bool
val fromList : TranReg.tran_reg list -> TranReg.tran_reg Set.set
val compare : TranReg.tran_reg Set.set Sort.total_ordering
val subset : TranReg.tran_reg Set.set * TranReg.tran_reg Set.set -> bool
val equal : TranReg.tran_reg Set.set * TranReg.tran_reg Set.set -> bool
val map : ('a -> TranReg.tran_reg) -> 'a Set.set -> TranReg.tran_reg Set.set
val mapFromList : ('a -> TranReg.tran_reg) -> 'a list -> TranReg.tran_reg Set.set
val union : TranReg.tran_reg Set.set * TranReg.tran_reg Set.set
              -> TranReg.tran_reg Set.set
val genUnion : TranReg.tran_reg Set.set list -> TranReg.tran_reg Set.set
val inter : TranReg.tran_reg Set.set * TranReg.tran_reg Set.set
              -> TranReg.tran_reg Set.set
val genInter : TranReg.tran_reg Set.set list -> TranReg.tran_reg Set.set
val minus : TranReg.tran_reg Set.set * TranReg.tran_reg Set.set
              -> TranReg.tran_reg Set.set
val inputFromLabToks : (int * Lex.tok) list
                         -> TranReg.tran_reg Set.set * (int * Lex.tok) list
val fromString : string -> TranReg.tran_reg Set.set
val input : string -> TranReg.tran_reg Set.set
val toPP : TranReg.tran_reg Set.set -> PP.pp
val toString : TranReg.tran_reg Set.set -> string
val output : string * TranReg.tran_reg Set.set -> unit

Description

memb(tran, trans)
tests whether tran is a member of trans.

fromList trans
returns the set whose elements are the elements of trans.

compare
is Set.compare TranReg.compare.

subset(tran1s, tran2s)
tests whether tran1s is a subset of tran2s.

equal(tran1s, tran2s)
tests whether tran1s is equal to tran2s.

map f xs
If xs is compatible with a value cmp of type 'a Sort.total_ordering, then map returns the set of all regular expression transitions f x such that x is a member of xs.

mapFromList f xs
returns the set of all regular expression transitions f x such that x is a member of xs.

union(tran1s, tran2s)
returns the union of tran1s and tran2s.

genUnion transs
returns the generalized union of transs.

inter(tran1s, tran2s)
returns the intersection of tran1s and tran2s.

genInter transs
returns the generalized intersection of transs. Issues an error message if transs is empty.

minus(tran1s, tran2s)
returns the difference of tran1s and tran2s.

inputFromLabToks lts
tries to input a set of regular expression transitions from lts, consuming as much of lts as possible, and returning the pair of the set of regular expression transitions 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. If, after reading a transition, the next element of the labeled token list is "," (Lex.Comma), then inputFromLabToks insists on reading another transition, even if this results in failure.

fromString s
inputs a set of regular expression transitions from s.

input fil
inputs a set of regular expression transitions from the file fil.

toPP trans
returns a pretty-printing expression for trans.

toString trans
pretty-prints trans to a string.

output(fil, trans)
pretty-prints trans to file fil.


[ Top | Parent | Root | Contents | Index ]

Forlan Version 4.12
Copyright © 2019 Alley Stoughton