ProB's Prolog Datastructures

Revision as of 13:02, 12 January 2018 by Michael Leuschel (talk | contribs) (Created page with " == Data Values == Integer value: int(Nr) where Nr is an integer Booleans: pred_true pred_false Enumerated or deferred set elements: fd(Nr,Type) where Nr is an integer...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Data Values

Integer value:

int(Nr)

where Nr is an integer

Booleans:

pred_true
pred_false

Enumerated or deferred set elements:

fd(Nr,Type)

where Nr is an integer >= 1 and Type is an atom representing the type of enumerated/deferred set

Strings

string(S)

where S is an atom

Pairs/couples

(Val1,Val2)

where Val1 and Val2 are values


Records

rec(Fields)

where Fields is a list:

field(Name,Val)

where Name is atom representing the field name and Val is a value.

The fields are sorted by name!

Sets

[]
[Val|Set]
avl_set(AVL)
closure(P,T,B)
global_set(GS)
freetype(T)

Freetype values

freeval(Id,Case,Value)

AST (Abstract Syntax Tree)

An AST node has the form:

b(Expr,Type,Infos)

Infos should be a ground list of informations. Some important information fields are:

contains_wd_condition
used_ids(Ids)
nodeid(PositionInfo)
refers_to_old_state(References)

Types are:

integer
boolean
string
global(G)
couple(T1,T2)
record(FieldTypes)
set(Type)
seq(Type)
freetype(F)

where FieldTypes is a list containing:

field(Name,Type)