Skip to content

Instantly share code, notes, and snippets.

4. Concept Specifications
Our specification language is mostly informal, except for the definition of state components and action signatures. Here, for example, is a specification for a Password authentication concept.
concept Password [U]
purpose
to securely store and validate user credentials
state
password: U -> string
salt: U -> string
rule! {
name: "door_alert",
on: rising(door_sensor),
if: wake_hours,
then:
buzzer = on,
wait: 5s,
buzzer = off;
}
from bs4 import BeautifulSoup
def bs4demo():
html = """
<table>
<tr>
<th>Name</th>
<th>Age</th>
</tr>
<tr>