In the Dynamic Biba integrity model, every user and every document is assigned an integrity level, which measures how reliable its information is. Levels change by two rules:
Integrity levels are not plain numbers, because one document may hold very trustworthy information about one topic and less trustworthy information about another at the same time. Each level is an arbitrary label, and the levels are ordered by rules of the form A -> B, read as "level A is at most as trustworthy as level B". This order satisfies:
A -> A always holds and need not be listed in the input.A -> B and B -> A are never both true; it is allowed that neither holds.A -> B and B -> C, then A -> C (even when it is not listed).G = glb(A, B), the greatest lower bound, with G -> A and G -> B; moreover every label L such that L -> A and L -> B also satisfies L -> G.Track the integrity levels of the users and documents as the actions are performed.
x -> y.user reads document sets the user's level to glb(user's current level, document's level).user writes document sets the document's level to glb(user's level, document's current level).For each action, in order, print the new integrity level on its own line: the user's new level for a reads action, or the document's new level for a writes action.