This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.InputStream; | |
| import java.net.InetSocketAddress; | |
| import java.net.URI; | |
| import java.util.Map; | |
| import com.fasterxml.jackson.databind.MappingIterator; | |
| import com.fasterxml.jackson.databind.ObjectMapper; | |
| import com.fasterxml.jackson.databind.SerializationFeature; | |
| import com.fasterxml.jackson.dataformat.cbor.databind.CBORMapper; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Stack; | |
| import ShuntingYard.Operators; | |
| public class AST { | |
| public interface Node { | |
| public <R> R visit(Visitor<R> visitor); | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from functools import partial | |
| def ContractProperty(name): | |
| return partial(Attribut, name) | |
| class Attribut(object): | |
| DEFAULT_ERROR_MESSAGE = "Error: contract not hold" | |
| def __init__(self, name, fset=None, fget=None, fdel=None, doc=None, contracts=None): | |
| self._name = name | |
| # list of predicates/contracts it should hold |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from ctypes import CDLL, get_errno, create_string_buffer | |
| from ctypes import c_ushort, c_int, c_uint, c_long, c_ulong | |
| from ctypes import c_char_p, c_void_p, POINTER, Structure, cast | |
| # we load the libc. | |
| libc = CDLL("libc.so.6") | |
| # define some consts. | |
| IPC_CREAT = 0o1000 | |
| IPC_EXCL = 0o2000 | |
| IPC_NOWAIT= 0o4000 |